We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index.storage_context.persist() is not storing the vector_store and creating thevector_store.json file
index.storage_context.persist()
vector_store.json
When I try to load from disk and run sc2 = StorageContext.from_defaults(persist_dir='./storage'), i get the following error:
sc2 = StorageContext.from_defaults(persist_dir='./storage')
No existing llama_index.vector_stores.simple found at ./storage/vector_store.json, skipping load.
I only have 1 document in my documents directory... Your example had 2. I wonder if that has soemthing to do with the issue?
Full Code:
with open('KPMGOutlook/kpmgoutlook.text', 'w') as file: file.write(kpmg_text)
documents = SimpleDirectoryReader('KPMGOutlook').load_data()
vector_store = ChromaVectorStore(chroma_collection) storage_context = StorageContext.from_defaults(vector_store=vector_store,persist_dir='storage')
index = GPTVectorStoreIndex.from_documents(documents, storage_context=storage_context)
query_engine = index.as_query_engine()
#Querying document. this works fine r = query_engine.query("Which economy has the most positive outlook?") print(r)
#This line gives me the error sc2 = StorageContext.from_defaults(persist_dir='./storage')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
index.storage_context.persist()
is not storing the vector_store and creating thevector_store.json
fileWhen I try to load from disk and run
sc2 = StorageContext.from_defaults(persist_dir='./storage')
, i get the following error:No existing llama_index.vector_stores.simple found at ./storage/vector_store.json, skipping load.
I only have 1 document in my documents directory... Your example had 2. I wonder if that has soemthing to do with the issue?
Full Code:
with open('KPMGOutlook/kpmgoutlook.text', 'w') as file: file.write(kpmg_text)
documents = SimpleDirectoryReader('KPMGOutlook').load_data()
vector_store = ChromaVectorStore(chroma_collection)
storage_context = StorageContext.from_defaults(vector_store=vector_store,persist_dir='storage')
index = GPTVectorStoreIndex.from_documents(documents, storage_context=storage_context)
index.storage_context.persist()
query_engine = index.as_query_engine()
#Querying document. this works fine
r = query_engine.query("Which economy has the most positive outlook?")
print(r)
#This line gives me the error
sc2 = StorageContext.from_defaults(persist_dir='./storage')
The text was updated successfully, but these errors were encountered: