When the LLM returned zero text tokens (e.g. it was interrupted before producing tokens or about to push tokens), push_aggregation() returned an empty string and on_assistant_turn_stopped was never emitted. This left consumers waiting for an event that would never arrive. Now on_assistant_turn_stopped always fires, with an empty content string when the LLM produced no text tokens. Fixes #4292
41 KiB
41 KiB