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

[BUG] Latest langchain-core 0.2.31 release breaks Crew execution w Agent #1191

Closed
andrewpap22 opened this issue Aug 14, 2024 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@andrewpap22
Copy link

Description
Provide a clear and concise description of what the bug is.

ImportError: cannot import name 'ToolsRenderer' from 'langchain_core.tools'

This specific error message means that the code is trying to import ToolsRenderer from the langchain_core.tools module, but it can't find ToolsRenderer in that module the reason is that in their latest release of 0.2.31 they removed the ToolsRendered from `libs/langchain/langchain/tools/render.py` 

Steps to Reproduce
Provide a step-by-step process to reproduce the behavior:

Use Python version >= 3.11 and upgrade, crewai[tools], langchain-community, langchain-core packages to latest versions and simply run a Crew execution (you need to be importing somewhere in your app usage an Agent from Crewai --> from crewai import Agent) and you'll get:

from langchain.tools.render import render_text_description
  File "/foo/bar/buzz/venv/lib/python3.11/site-packages/langchain/tools/render.py", line 9, in <module>
    from langchain_core.tools import (
ImportError: cannot import name 'ToolsRenderer' from 'langchain_core.tools' (/Users/foo/bar/buzz/venv/lib/python3.11/site-packages/langchain_core/tools/__init__.py)

Expected behavior
A clear and concise description of what you expected to happen.

Crew execution shall not break.

Screenshots/Code snippets
If applicable, add screenshots or code snippets to help explain your problem.

from langchain.tools.render import render_text_description
  File "/foo/bar/buzz/venv/lib/python3.11/site-packages/langchain/tools/render.py", line 9, in <module>
    from langchain_core.tools import (
ImportError: cannot import name 'ToolsRenderer' from 'langchain_core.tools' (/Users/foo/bar/buzz/venv/lib/python3.11/site-packages/langchain_core/tools/__init__.py)

I've addressed the issue also to the corresponding PR on langchain-core 👉🏻 link

Environment Details:

  • Operating System: Artix Linux
  • Python Version: 3.11.4
  • crewAI Version: latest
  • crewAI Tools Version: latest

Logs
Include relevant logs or error messages if applicable.

Included above.

Possible Solution
Have a solution in mind? Please suggest it here, or write "None".

Currently downgraded the langchain-core package to avoid the error.

Additional context
Add any other context about the problem here.

@andrewpap22 andrewpap22 added the bug Something isn't working label Aug 14, 2024
@pythonbyte
Copy link
Collaborator

Thanks @andrewpap22 for the Bug Report. We are now understanding the issue and fixing it.

@joaomdmoura
Copy link
Collaborator

Screenshot 2024-08-14 at 21 01 59 langchain fixed it :)

@andrewpap22
Copy link
Author

Yep they were pretty quick! 🙏🏻 👍🏻 --> related_fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants