----------------------
To get all nodes from a document store asynchronously, you can use the
aget_nodes
method from the
BasePydanticVectorStore
class in LlamaIndex. This method allows you to asynchronously retrieve nodes from the vector store. Here is an example of how you can use it:
from llama_index.core.vector_stores.types import BasePydanticVectorStore
# Assuming you have an instance of BasePydanticVectorStore
vector_store = BasePydanticVectorStore()
# Get nodes asynchronously
nodes = await vector_store.aget_nodes(node_ids, filters)
In the code above,
node_ids
is an optional list of node IDs to retrieve, and
filters
is an optional instance of
MetadataFilters
to apply.
However, please note that this method is for getting nodes from a vector store, not a document store. The provided knowledge sources do not contain information on how to asynchronously get all nodes from a document store. For more detailed information, you may want to refer to the
LlamaIndex documentation ().
Source:
LlamaIndex Documentation ()
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------