mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
fix: incorrect type assignment when the agent send an image (#4050)
This commit is contained in:
@@ -188,7 +188,8 @@ class ToolLoopAgentRunner(BaseAgentRunner[TContext]):
|
||||
if isinstance(result, list):
|
||||
tool_call_result_blocks = result
|
||||
elif isinstance(result, MessageChain):
|
||||
result.type = "tool_call_result"
|
||||
if result.type is None:
|
||||
result.type = "tool_call_result"
|
||||
yield AgentResponse(
|
||||
type="tool_call_result",
|
||||
data=AgentResponseData(chain=result),
|
||||
|
||||
Reference in New Issue
Block a user