cluster_metadata (Optional[Dict]) – Metadata associated with the
Bagel cluster. Defaults to None.
Returns
Bagel vectorstore.
Return type
Bagel
classmethod from_texts(texts: List[str], embedding: Optional[Embeddings] = None, metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, cluster_name: str = 'langchain', client_settings: Optional[bagel.config.Settings] = None, cluster_metadata: Optional[Dict] = None, client: Optional[bagel.Client] = None, text_embeddings: Optional[List[List[float]]] = None, **kwargs: Any) → Bagel[source]¶
Create and initialize a Bagel instance from list of texts.
Parameters
texts (List[str]) – List of text content to be added.
cluster_name (str) – The name of the BagelDB cluster.
client_settings (Optional[bagel.config.Settings]) – Client settings.
cluster_metadata (Optional[Dict]) – Metadata of the cluster.
embeddings (Optional[Embeddings]) – List of embedding.
metadatas (Optional[List[dict]]) – List of metadata.
ids (Optional[List[str]]) – List of unique ID. Defaults to None.
client (Optional[bagel.Client]) – Bagel client instance.
Returns
Bagel vectorstore.
Return type
Bagel
get(ids: Optional[OneOrMany[ID]] = None, where: Optional[Where] = None, limit: Optional[int] = None, offset: Optional[int] = None, where_document: Optional[WhereDocument] = None, include: Optional[List[str]] = None) → Dict[str, Any][source]¶
Gets the collection.