Get instance of an existing Lantern store.This method will return the instance of the store without inserting any new embeddings
Postgres connection string is required
"Either pass it as connection_string parameter
or set the LANTERN_CONNECTION_STRING environment variable.
connection_string is a postgres connection string.embedding is :class:Embeddings that will be used for
embedding the text sent. If none is sent, then the
multilingual Tensorflow Universal Sentence Encoder will be used.collection_name is the name of the collection to use. (default: langchain)
ids row ids to insert into collection.pre_delete_collection if True, will delete the collection if it exists.
(default: False)
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.from_existing_index(
cls: Type[Lantern],
embedding: Embeddings,
collection_name: str = _LANGCHAIN_DEFAULT_COLLECTION_NAME,
pre_delete_collection: bool = False,
distance_strategy: DistanceStrategy = DEFAULT_DISTANCE_STRATEGY,
**kwargs: Any = {}
) -> Lantern