You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
fix: Exclude thought parts when merging agent output
PiperOrigin-RevId: 850500329
This commit is contained in:
committed by
Copybara-Service
parent
a364388d97
commit
07bb164758
@@ -188,7 +188,9 @@ class AgentTool(BaseTool):
|
||||
|
||||
if not last_content:
|
||||
return ''
|
||||
merged_text = '\n'.join(p.text for p in last_content.parts if p.text)
|
||||
merged_text = '\n'.join(
|
||||
p.text for p in last_content.parts if p.text and not p.thought
|
||||
)
|
||||
if isinstance(self.agent, LlmAgent) and self.agent.output_schema:
|
||||
tool_result = self.agent.output_schema.model_validate_json(
|
||||
merged_text
|
||||
|
||||
Reference in New Issue
Block a user