langchain.vectorstores.bageldb.Bagel¶
class langchain.vectorstores.bageldb.Bagel(cluster_name: str = 'langchain', client_settings: Optional[bagel.config.Settings] = None, embedding_function: Optional[Embeddings] = None, cluster_metadata: Optional[Dict] = None, client: Optional[bagel.Client] = None, relevance_score_fn: Optional[Callable[[float], float]] = None)[source]¶
BagelDB.ai vector store.
To use, you should have the betabageldb python package installed.
Example
from langchain.vectorstores import Bagel
vectorstore = Bagel(cluster_name="langchain_store")
Initialize with bagel client
Attributes
embeddings
Access the query embedding object if available.
Methods
__init__([cluster_name, client_settings, ...])
Initialize with bagel client
aadd_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
aadd_texts(texts[, metadatas])
Run more texts through the embeddings and add to the vectorstore.
add_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
add_texts(texts[, metadatas, ids, embeddings])
Add texts along with their corresponding embeddings and optional metadata to the BagelDB cluster.
afrom_documents(documents, embedding, **kwargs)
Return VectorStore initialized from documents and embeddings.
afrom_texts(texts, embedding[, metadatas])
Return VectorStore initialized from texts and embeddings.
amax_marginal_relevance_search(query[, k, ...])
Return docs selected using the maximal marginal relevance.
amax_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.