joaomdmoura / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
15.34k stars 2.04k forks source link

how to resolve this error - langchain-openai package and should be used instead? #251

Open arijus303 opened 3 months ago

arijus303 commented 3 months ago

/home/AI_tools/creaw/lib/python3.8/site-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: The class langchain_community.chat_models.openai.ChatOpenAI was deprecated in langchain-community 0.0.10 and will be removed in 0.2.0. An updated version of the class exists in the langchain-openai package and should be used instead. To use it run pip install -U langchain-openai and import as from langchain_openai import ChatOpenAI. warn_deprecated( Traceback (most recent call last): File "new.py", line 32, in research_task = Task( File "/home/avx/Desktop/AI_tools/creaw/lib/python3.8/site-packages/pydantic/v1/main.py", line 341, in init raise validation_error pydantic.v1.error_wrappers.ValidationError: 1 validation error for Task tools -> 0 init() missing 1 required positional argument: 'func' (type=type_error)

SuchitG04 commented 3 months ago

Did you try updating the langchain-openai as per the suggestion in the error?

OpenAI updated their SDK recently and IIRC langchain-openai has also been updated to reflect the same.