-
how do I load VectorStoreIndex from StorageContext that I persisted? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
To load a from llama_index.core import VectorStoreIndex
from llama_index.core.storage.storage_context import StorageContext
from llama_index.core.indices.loading import load_index_from_storage
# Load storage context from persisted directory
storage_context = StorageContext.from_defaults(persist_dir="./path_to_persisted_storage")
# Load your index from the storage context
index = load_index_from_storage(storage_context=storage_context) Make sure that the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
To check if data is persisted on your disk and create a vector index only if the data is missing using
DeepLakeVectorStore
andVectorStoreIndex
, you can use the following code: