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: Filter out thought parts when saving agent output to state
PiperOrigin-RevId: 806478056
This commit is contained in:
committed by
Copybara-Service
parent
4c00b86e33
commit
bb148002f8
@@ -462,7 +462,9 @@ class LlmAgent(BaseAgent):
|
||||
):
|
||||
|
||||
result = ''.join(
|
||||
[part.text if part.text else '' for part in event.content.parts]
|
||||
part.text
|
||||
for part in event.content.parts
|
||||
if part.text and not part.thought
|
||||
)
|
||||
if self.output_schema:
|
||||
# If the result from the final chunk is just whitespace or empty,
|
||||
|
||||
Reference in New Issue
Block a user