Lantern(
self,
connection_string: str,
embedding_function: Embeddings,
distance_strategy: DistanceStrategy Postgres with the lantern extension as a vector store.
lantern uses sequential scan by default. but you can create a HNSW index using the create_hnsw_index method.
connection_string is a postgres connection string.embedding_function any embedding function implementing
langchain.embeddings.base.Embeddings interface.collection_name is the name of the collection to use. (default: langchain)
distance_strategy is the distance strategy to use. (default: EUCLIDEAN)
EUCLIDEAN is the euclidean distance.COSINE is the cosine distance.HAMMING is the hamming distance.pre_delete_collection if True, will delete the collection if it exists.
(default: False)