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

create_sql_agent ImportError: cannot import name 'ToolsRenderer' from 'langchain_core.tools' #25413

Closed
5 tasks done
codenamics opened this issue Aug 14, 2024 · 2 comments · Fixed by #25416
Closed
5 tasks done
Assignees
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: core Related to langchain-core investigate

Comments

@codenamics
Copy link

codenamics commented Aug 14, 2024

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

agent_executor = create_sql_agent(llm, db=db, agent_type="openai-tools", top_k=50)

### Error Message and Stack Trace (if applicable)


File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\tools\render.py", line 9, in <module>

    from langchain_core.tools import (

ImportError: cannot import name 'ToolsRenderer' from 'langchain_core.tools' (C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain_core\tools\__init__.py)
 
agent_executor = create_sql_agent(llm, db=db, agent_type="openai-tools", top_k=50)

Description

Latest langchain version and when i want to invoke

agent_executor = create_sql_agent(llm, db=db, agent_type="openai-tools", top_k=50)

i get File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\tools\render.py", line 9, in <module>

    from langchain_core.tools import (

ImportError: cannot import name 'ToolsRenderer' from 'langchain_core.tools' (C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain_core\tools\__init__.py)

System Info

python 3.11

windows 10

i ran all langchain updates

@langcarl langcarl bot added the investigate label Aug 14, 2024
@dosubot dosubot bot added Ɑ: core Related to langchain-core 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Aug 14, 2024
@ccurme ccurme self-assigned this Aug 14, 2024
@ccurme ccurme closed this as completed in 1050e89 Aug 14, 2024
@ccurme
Copy link
Collaborator

ccurme commented Aug 14, 2024

Release of langchain 0.2.14 in progress, this should be fixed if you upgrade. We're also yanking version of langchain-core that introduced this. Thanks for flagging.

@codenamics
Copy link
Author

codenamics commented Aug 15, 2024

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: core Related to langchain-core investigate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants