fix(streaming): skip streamer acquisition when SendResponse is false
Heartbeat messages set SendResponse=false but the streaming path was unconditionally acquiring a streamer, causing HEARTBEAT_OK to leak to Telegram via streamer.Finalize().
This commit is contained in:
parent
79111425b0
commit
6b90fe48ce
1 changed files with 1 additions and 1 deletions
|
|
@ -803,7 +803,7 @@ func (al *AgentLoop) runLLMIteration(
|
|||
// Check if both the provider and channel support streaming
|
||||
streamProvider, providerCanStream := agent.Provider.(providers.StreamingProvider)
|
||||
var streamer bus.Streamer
|
||||
if providerCanStream && !constants.IsInternalChannel(opts.Channel) {
|
||||
if providerCanStream && opts.SendResponse && !constants.IsInternalChannel(opts.Channel) {
|
||||
streamer, _ = al.bus.GetStreamer(ctx, opts.Channel, opts.ChatID)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue