Run more texts through the embeddings and add to the vector store.
The Links present in the metadata field links will be extracted to create
the Node links.
Eg if nodes a and b are connected over a hyperlink https://some-url, the
function call would look like:
.. code-block:: python
await store.aadd_texts(
ids=["a", "b"],
texts=["some text a", "some text b"],
metadatas=[
{
"links": [
Link.incoming(kind="hyperlink", tag="https://some-url")
]
},
{
"links": [
Link.outgoing(kind="hyperlink", tag="https://some-url")
]
},
],
)
aadd_texts(
self,
texts: Iterable[str],
metadatas: Optional[Iterable[dict]] = None,
*,
ids: Optional[Iterable[str]] = None,
**kwargs: Any = {}
) -> list[str]| Name | Type | Description |
|---|---|---|
texts* | Iterable[str] | Iterable of strings to add to the vector store. |
metadatas | Optional[Iterable[dict]] | Default: NoneOptional list of metadatas associated with the texts.
The metadata key |
ids | Optional[Iterable[str]] | Default: NoneOptional list of IDs associated with the texts. |
**kwargs | Any | Default: {}vector store specific parameters. |