Find answers from the community

Updated 3 months ago

Hi I use document summary index as

Hi I use document summary index as follws:
doc_summary_index = DocumentSummaryIndex(
nodes=nodes,
service_context=service_context,
storage_context=storage_context,
response_synthesizer=response_synthesizer,
show_progress=True,
)
But got error:
Exception has occurred: ValueError
One of nodes, objects, or index_struct must be provided.
File "/home/csgrad/yhu/projs/SLPChatbot/docSummaryIndex.py", line 156, in getDocumentIndex
index_store=SimpleIndexStore.from_persist_dir(persist_dir=persistent_path)
FileNotFoundError: [Errno 2] No such file or directory: '/home/csgrad/yhu/projs/SLPChatbot/documentSumStore/index_storage/slp_doc_sum/index_store.json'

During handling of the above exception, another exception occurred:

File "/home/csgrad/yhu/projs/SLPChatbot/docSummaryIndex.py", line 168, in getDocumentIndex
doc_summary_index = DocumentSummaryIndex(
File "/home/csgrad/yhu/projs/SLPChatbot/docSummaryIndex.py", line 183, in <module>
doc_summary_index = getDocumentIndex(data_path, persistent_path)
ValueError: One of nodes, objects, or index_struct must be provided.
L
1 comment
What is inside the nodes value? If it is None, then it will fail
Add a reply
Sign up and join the conversation on Discord