streaming: implement provider→agent→telegram token streaming pipeline

This commit is contained in:
DBT
2026-02-26 12:51:50 +00:00
parent ad9ee0d10d
commit 818408962d
4 changed files with 261 additions and 11 deletions

View File

@@ -50,6 +50,11 @@ type LLMProvider interface {
GetDefaultModel() string
}
// StreamingLLMProvider is an optional capability interface for token-level streaming.
type StreamingLLMProvider interface {
ChatStream(ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]interface{}, onDelta func(string)) (*LLMResponse, error)
}
// ResponsesCompactor is an optional capability interface.
// Providers that support OpenAI /v1/responses/compact can implement this.
type ResponsesCompactor interface {