-
Checked other resources
Commit to Help
Example Codefrom langchain_experimental.agents import create_pandas_dataframe_agent
from langchain.agents.agent_types import AgentType
import os
import pandas as pd
agent = create_pandas_dataframe_agent(
llm,
df,
agent_type="openai-tools",
verbose=True,
return_intermediate_steps=True,
allow_dangerous_code=True,
allow_dangerous_requests=True,
) DescriptionWhile I am running above code, I am getting this error. But I am still getting the desired output. How I fix this? please help.
System InfoName: langchain Name: pydantic |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
To fix the Here is the relevant part of the code with the fix: run_manager = await cm.on_chain_start(
{"name": group_name}, inputs or {}, run_id=run_id
) This ensures that if |
Beta Was this translation helpful? Give feedback.
-
@dosu found that 'verbose=True,' is causing the error in the query with new pydantic version |
Beta Was this translation helpful? Give feedback.
The
verbose=True
parameter causing the error with the new Pydantic version suggests that the verbose logging might be interacting poorly with the callback handlers. You can try removing or settingverbose=False
to avoid this issue:This should prevent the
AttributeError
from occurring. If you still need verbose output, consider implementing custom logging or debugging mechanisms.To continue talking to Dosu, mention @dosu.