google / google/adk-python

A before_agent_callback which changes the state results in an empty Event being returned

Aperta
#7,078 11 commenti 0 reazioni 1 assegnatario Rivendicata da @surajksharma07 Vedi su GitHub
agent engine request clarification
Lingua principale
Python
Stelle
21.5k
Fork
4k
Merge medio
1g 14h
PR unite (30g)
37

Descrizione

[This code](https://github.com/google/adk-python/blob/54274cdeba42a46e4346f48589c84fe2ebcc0da2/src/google/adk/agents/base_agent.py#L559) forces the end of the turn and results in an empty event being returned if there are state changes.

This prevents these callbacks from doing any kind of processing that result in state changes. It's not clear what's the purpose of this logic. This behavior is [not documented](https://adk.dev/callbacks/types-of-callbacks/#before-agent-callback).

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.