Find answers from the community

Updated 2 years ago

Hi Everyone I built a knowledge graph

Hi Everyone, I built a knowledge graph index and the build process worked fine, but now I am running into errors when trying to run a query. I am doing basically the same thing as the example, but I am using the default davinci-003 llm rather than davinci-002 as shown in the example as I assumed it wouldnt matter. If anyone has any insight they could share on this error message, I would be grateful!
Error:
File "/root/myproject/myproject/d2v/t5/testq.py", line 4, in <module>
index = GPTSimpleVectorIndex.load_from_disk('testindex.json')
File "/usr/local/lib/python3.10/dist-packages/llama_index/indices/base.py", line 477, in load_from_disk
return cls.load_from_string(file_contents, kwargs) File "/usr/local/lib/python3.10/dist-packages/llama_index/indices/base.py", line 453, in load_from_string return cls.load_from_dict(result_dict, kwargs)
File "/usr/local/lib/python3.10/dist-packages/llama_index/indices/vector_store/base.py", line 242, in load_from_dict
return super().load_from_dict(result_dict, config_dict, kwargs)
File "/usr/local/lib/python3.10/dist-packages/llama_index/indices/base.py", line 424, in load_from_dict
docstore = DocumentStore.load_from_dict(
File "/usr/local/lib/python3.10/dist-packages/llama_index/docstore.py", line 59, in load_from_dict
raise ValueError(
ValueError: doc_type kg not found in type_to_struct. Make sure that it was registered in the index registry.
L
a
3 comments
It looks like you are loading the saved index with GPTSimpleVectorIndex rather than GPTKnowledgeGraphIndex πŸ‘
AHHHHHH oversight! Thank you so much! If you ever make it out to Las Vegas, I owe you a beer!
hahaha sounds good 🍻
Add a reply
Sign up and join the conversation on Discord