Find answers from the community

Updated 2 months ago

hello an error when i use

hello, an error when i use GPTIndexChatMemory:<class 'gpt_index.indices.list.base.GPTListIndex'>
Traceback (most recent call last):
File "/Users/apple/Desktop/AI/chatbot.py", line 107, in <module>
memory = GPTIndexChatMemory(
^^^^^^^^^^^^^^^^^^^
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 1 validation error for GPTIndexChatMemory
index
instance of BaseGPTIndex expected (type=type_error.arbitrary_type; expected_arbitrary_type=BaseGPTIndex)
I am so puzzled, how can i fix it? hope anyone can help...thks
L
J
8 comments
I've seen this before on github. Did you install llama_index or gpt_index? Try installing llama_index and changing your imports accordingly
@Logan M thank u so much, I give a try....
@Logan M I really really appreciate ur help..... fixed it!!
@Jack2020 Awesome!! Glad it works πŸ’ͺ
@Logan M if it's not too much trouble, may I ask one more question? Could you kindly provide me with some guidance on how to modify the code in the article "How to Build a Chatbot" to use Pinecone instead? I would greatly appreciate your help. Thank you very much!
@Logan M I tried first search out the similar text from pinecone, then build them into indices, but chat bot doesn't build answers from these indices.. I do not know why..
Try replacing the GPTSimpleVectorIndex's with the pinecone index, using this notebook as an example: https://github.com/jerryjliu/llama_index/blob/main/examples/vector_indices/PineconeIndexDemo.ipynb

Then in your query configs, use "index_struct_type": "pinecone", instead of "index_struct_type": "simple_dict",

I don't have much experience with pinecone inside graphs yet though
@Logan M thank u so much for ur time....πŸ‘
Add a reply
Sign up and join the conversation on Discord