Only getting content attribute from AIMessageChunk populated in on_agent_action callback the first time is called #30214
illera88
announced in
Ask Dosu (Archived)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
When using
AgentExecutor
with acreate_tool_calling_agent
with tools I need to get an explanation of the tools that are going to be used every time a tool is used. The first time the agent calls a tool it correctly fills thecontent
attribute ofAIMessageChunk
in the callbackon_agent_action
. The problem is that consecutive use of tools and its respective callbacks toon_agent_action
provide a AIMessageChunk whosecontent
attribute is empty.The correct action would be to always filled up the
content
attribute.System Info
langchain==0.3.20
langchain-anthropic==0.3.7
langchain-community==0.3.17
langchain-core==0.3.43
langchain-deepseek==0.1.2
langchain-experimental==0.3.4
langchain-google-genai==2.0.10
langchain-google-vertexai==2.0.14
langchain-openai==0.3.6
langchain-text-splitters==0.3.6
langchain-xai==0.2.1
Windows
Python 3.13.0
Beta Was this translation helpful? Give feedback.
All reactions