diff --git a/langchain_glm/callbacks/agent_callback_handler.py b/langchain_glm/callbacks/agent_callback_handler.py index df5c1b3..64482e8 100644 --- a/langchain_glm/callbacks/agent_callback_handler.py +++ b/langchain_glm/callbacks/agent_callback_handler.py @@ -131,7 +131,7 @@ async def on_tool_start( async def on_tool_end( self, - output: str, + output: Any, *, run_id: UUID, parent_run_id: Optional[UUID] = None, @@ -143,7 +143,7 @@ async def on_tool_end( "run_id": str(run_id), "status": AgentStatus.tool_end, "tool": kwargs["name"], - "tool_output": output, + "tool_output": str(output), } self.queue.put_nowait(dumps(data))