Create and initialize a Bagel instance from list of texts.
from_texts(
cls: Type[Bagel],
texts: List[str],
embedding: Optional[Embeddings] = None,
metadatas: Optional[List[dict]] = None,
ids: Optional[List[str]] = None,
cluster_name: str = _LANGCHAIN_DEFAULT_CLUSTER_NAME,
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| Name | Type | Description |
|---|---|---|
texts* | List[str] | List of text content to be added. |
cluster_name | str | Default: _LANGCHAIN_DEFAULT_CLUSTER_NAMEThe name of the Bagel cluster. |
client_settings | Optional[bagel.config.Settings] | Default: NoneClient settings. |
cluster_metadata | Optional[Dict] | Default: NoneMetadata of the cluster. |
embeddings* | Optional[Embeddings] | List of embedding. |
metadatas | Optional[List[dict]] | Default: NoneList of metadata. |
ids | Optional[List[str]] | Default: NoneList of unique ID. Defaults to None. |
client | Optional[bagel.Client] | Default: NoneBagel client instance. |