Skip to content
New issue

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

llama_index api has changed, and the GPTtrace cannot be used. #15

Open
a1liz opened this issue Oct 15, 2024 · 1 comment
Open

llama_index api has changed, and the GPTtrace cannot be used. #15

a1liz opened this issue Oct 15, 2024 · 1 comment

Comments

@a1liz
Copy link

a1liz commented Oct 15, 2024

Hello, I just download GPTtrace with pip and try it with python3 -m GPTtrace -h.

It seems that the llama_index modules has been updated.

Here is the error info.

/home/liz/anaconda3/lib/python3.12/site-packages/langchain/chat_models/init.py:33: LangChainDeprecationWarning: Importing chat models from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.chat_models import ChatOpenAI.

To install langchain-community run pip install -U langchain-community.
warnings.warn(
/home/liz/anaconda3/lib/python3.12/site-packages/langchain/chat_models/init.py:33: LangChainDeprecationWarning: Importing chat models from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.chat_models import ChatOpenAI.

To install langchain-community run pip install -U langchain-community.
warnings.warn(
/home/liz/anaconda3/lib/python3.12/site-packages/langchain/init.py:30: UserWarning: Importing ConversationChain from langchain root module is no longer supported. Please use langchain.chains.ConversationChain instead.
warnings.warn(
/home/liz/anaconda3/lib/python3.12/site-packages/langchain/init.py:30: UserWarning: Importing OpenAI from langchain root module is no longer supported. Please use langchain_community.llms.OpenAI instead.
warnings.warn(
/home/liz/anaconda3/lib/python3.12/site-packages/langchain/init.py:30: UserWarning: Importing ConversationChain from langchain root module is no longer supported. Please use langchain.chains.ConversationChain instead.
warnings.warn(
/home/liz/anaconda3/lib/python3.12/site-packages/langchain/chat_models/init.py:33: LangChainDeprecationWarning: Importing chat models from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.chat_models import ChatOpenAI.

To install langchain-community run pip install -U langchain-community.
warnings.warn(
Traceback (most recent call last):
File "/home/liz/GPTtrace/gpttrace/GPTtrace.py", line 6, in
from gpttrace.cmd import cmd
File "/home/liz/anaconda3/lib/python3.12/site-packages/gpttrace/init.py", line 1, in
from gpttrace.GPTtrace import main
File "/home/liz/anaconda3/lib/python3.12/site-packages/gpttrace/GPTtrace.py", line 7, in
from gpttrace.execute import execute
File "/home/liz/anaconda3/lib/python3.12/site-packages/gpttrace/execute.py", line 5, in
from gpttrace.utils.common import get_doc_content_for_query, init_conversation
File "/home/liz/anaconda3/lib/python3.12/site-packages/gpttrace/utils/common.py", line 10, in
from llama_index import LLMPredictor, ServiceContext, StorageContext, VectorStoreIndex, SimpleDirectoryReader, load_index_from_storage
ImportError: cannot import name 'LLMPredictor' from 'llama_index' (unknown location)

Copy link

Thanks for using eunomia-bpf! We appreciate your help and we’ll take care of this as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant