Return docs selected using the maximal marginal relevance.
search(query, search_type, **kwargs)
Return docs most similar to query using specified search type.
similarity_search(query[, k])
Run similarity search on query
similarity_search_by_vector(embedding[, k])
Run similarity search on query embedding
similarity_search_with_relevance_scores(query)
Run similarity search synchronously and return relevance scores
similarity_search_with_score(query[, k])
Run similarity search synchronously and return distance scores
__init__(embedding_function: Embeddings, **kwargs: Any) → None[source]¶
async aadd_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documents through the embeddings and add to the vectorstore.
Parameters
(List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added texts.
Return type
List[str]
async aadd_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str][source]¶
Add list of text along with embeddings to the vector store asynchronously
Parameters
texts (Iterable[str]) – collection of text to add to the database
Returns
List of ids for the newly inserted documents
add_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documents through the embeddings and add to the vectorstore.
Parameters
(List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added texts.
Return type
List[str]
add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str][source]¶
Add list of text along with embeddings to the vector store
Parameters