Replies: 1 comment 2 replies
-
Hey @ox1234! 👋 I'm here to help you with any bugs, questions, or contributions you have in mind. Let's squash those bugs together! I couldn't find specific information on how to add an agent's tool call response to the chat history in Langflow. However, I can provide some insights based on the general structure of Langflow's chat history management. Langflow uses the For example, when a tool response is generated, you can encapsulate it in a def update(self):
if self.chat_cache.current_client_id in self.active_connections:
self.last_cached_object_dict = self.chat_cache.get_last()
# Add a new ChatResponse with the data
chat_response = FileResponse(
message=None,
type="file",
data=self.last_cached_object_dict["obj"],
data_type=self.last_cached_object_dict["type"],
)
self.chat_history.add_message(self.chat_cache.current_client_id, chat_response) This code shows how a To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other | Bug Report |
Beta Was this translation helpful? Give feedback.
-
What i building: I build a log analysis agent, which can call the tools to get some different log.
Question: How can i add the agent's tool call response to the chat history, i found the chat history only contains the user and agent's conversation. I also want to add the tool call response(the log raw content) to the chat history. How can i do that?
Here is my graph:

Beta Was this translation helpful? Give feedback.
All reactions