joshpxyne / gpt-migrate

Easily migrate your codebase from one framework or language to another.
https://gpt-migrate.com
MIT License
6.87k stars 485 forks source link

Langchain / OpenAI Dependencies #50

Open teamcoltra opened 9 months ago

teamcoltra commented 9 months ago

I'm getting:

/home/teamcoltra/.local/lib/python3.10/site-packages/langchain/chat_models/__init__.py:31: 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/teamcoltra/gpt-migrate-main/gpt_migrate/main.py", line 7, in <module>
    from ai import AI
  File "/home/teamcoltra/gpt-migrate-main/gpt_migrate/ai.py", line 6, in <module>
    from litellm import completion
  File "/home/teamcoltra/.local/lib/python3.10/site-packages/litellm/__init__.py", line 28, in <module>
    from .timeout import timeout
  File "/home/teamcoltra/.local/lib/python3.10/site-packages/litellm/timeout.py", line 11, in <module>
    from openai.error import Timeout
ModuleNotFoundError: No module named 'openai.error'

I don't know if you want to update the code to be up-to-date with the modern langchain version or set a version number in requirements.