You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Remove thoughts from contents in llm requests
Merge https://github.com/google/adk-python/pull/2320 Fix #843 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/2320 from CAROLZXYZXY:cazheng/fix-843 5b4a4b256928cb766a44a3e18d4300b7ee5f779f PiperOrigin-RevId: 790592793
This commit is contained in:
committed by
Copybara-Service
parent
90b9193a20
commit
d620bcb384
@@ -322,7 +322,8 @@ def _convert_foreign_event(event: Event) -> Event:
|
||||
content.role = 'user'
|
||||
content.parts = [types.Part(text='For context:')]
|
||||
for part in event.content.parts:
|
||||
if part.text:
|
||||
# Exclude thoughts from the context.
|
||||
if part.text and not part.thought:
|
||||
content.parts.append(
|
||||
types.Part(text=f'[{event.author}] said: {part.text}')
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user