diff --git a/config/config.example.json b/config/config.example.json index f46f6a670..0d0fb1fe3 100644 --- a/config/config.example.json +++ b/config/config.example.json @@ -56,7 +56,10 @@ "allow_from": [ "YOUR_USER_ID" ], - "reasoning_channel_id": "" + "reasoning_channel_id": "", + "streaming": { + "enabled": true + } }, "discord": { "enabled": false, diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index cb972764c..6597b913f 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -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 && opts.SendResponse && !constants.IsInternalChannel(opts.Channel) { + if providerCanStream && !opts.NoHistory && !constants.IsInternalChannel(opts.Channel) { streamer, _ = al.bus.GetStreamer(ctx, opts.Channel, opts.ChatID) } diff --git a/pkg/config/defaults.go b/pkg/config/defaults.go index 6f65dd469..f9bcadd59 100644 --- a/pkg/config/defaults.go +++ b/pkg/config/defaults.go @@ -58,6 +58,7 @@ func DefaultConfig() *Config { Enabled: true, Text: "Thinking... 💭", }, + Streaming: StreamingConfig{Enabled: true}, }, Feishu: FeishuConfig{ Enabled: false,