Ever since OpenAI announced their language model ChatGPT, it has been making headlines in the AI world on a daily basis. ChatGPT is being used as t...
For further actions, you may consider blocking this person and/or reporting abuse
I installed all dependencies followed the steps.
When I try to run, that occurs these errors.
How can I fix this error?
Please use
llama_index
instead ofgpt_index
.gpt_index
is slowly being deprecated, this error is fixed inllama_index
I updated the code and the demo.pdf is in the same directory with main.py
But now I had another issue.
How can I fix that?
I followed the steps you outlined, exactly, and when I run:
python3 c:\projects\ChatWithTheDoc\main.py
I am getting:
ImportError: cannot import name 'BaseLanguageModel' from 'langchain.schema' (C:\Users\Dev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\schema.py)
Can you please explain why it does not work?
Hi @securigy, can you please try upgrading your version of langchain. Try
pip3 install -U langchain
I just did and got at the end:
Successfully installed langchain-0.0.178
However, when trying to run main.py again, I am still getting this:
*ImportError: cannot import name 'BaseLanguageModel' from 'langchain.schema' (C:\Users\Dev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\schema.py)
*
Bump your version of llama_index as well. Uninstall gpt_index and use llama_index alone
I did:
pip uninstall gpt_index
then:
pip install --upgrade llama_index
and then:
python3 c:\projects\ChatWithTheDoc\main.py
and got this:
C:\Windows\System32>python3 c:\projects\ChatWithTheDoc\main.py
Traceback (most recent call last):
File "c:\projects\ChatWithTheDoc\main.py", line 1, in
from gpt_index import download_loader, SimpleDirectoryReader, GPTSimpleVectorIndex, LLMPredictor, PromptHelper
ImportError: cannot import name 'download_loader' from 'gpt_index' (unknown location)
Intriguing
Help me!!!
thanks! Waiting for the next one!
Hi, Thanks for your kind comment. The next one is up. Please give it a read here and share your thoughts.