Soph
Soph

Reputation: 11

cannot import name 'create_tool_calling_agent' from 'langchain.agents' too many values to unpack

My code was already working with:

from langchain.agents import create_sql_agent
from langchain.agents import create_sql_agent
agent = create_sql_agent(
                llm=LLM,
                verbose=True,
                toolkit=SQLDatabaseToolkit(db=db, llm=LLM),
                agent_executor_kwargs={'handle_parsing_errors': True})
answer = agent.invoke(agent_prompt)

This was working with no issues and now I suddenly get the error:

cannot import name 'create_tool_calling_agent' from 'langchain.agents' too many values to unpack

after accessing the agent. Can someone tell me what has changed within Langchain to cause this?

I have tried:

from langchain_community.agent_toolkits import create_sql_agent

as well but get the same error I do not have anywhere in my code 'create_tool_calling_agent'

Upvotes: 1

Views: 726

Answers (0)

Related Questions