Add the given texts and embeddings to the store.
add_embeddings(
self,
text_embeddings: Iterable[Tuple[str, List[float]]],
metadatas: Optional[List[dict]] = None,
ids: Optional[List[str]] = None,
refresh_indices: bool = True,
create_index_if_not_exists: bool = True,
bulk_kwargs: Optional[Dict] = None,
**kwargs: Any = {}
) -> List[str]| Name | Type | Description |
|---|---|---|
text_embeddings* | Iterable[Tuple[str, List[float]]] | Iterable pairs of string and embedding to add to the store. |
metadatas | Optional[List[dict]] | Default: NoneOptional list of metadatas associated with the texts. |
ids | Optional[List[str]] | Default: NoneOptional list of unique IDs. |
refresh_indices | bool | Default: TrueWhether to refresh the Elasticsearch indices after adding the texts. |
create_index_if_not_exists | bool | Default: TrueWhether to create the Elasticsearch index if it doesn't already exist. |
*bulk_kwargs | Optional[Dict] | Default: NoneAdditional arguments to pass to Elasticsearch bulk.
|