MCPcopy
hub / github.com/docker/docker-agent / StreamAdapter

Struct StreamAdapter

pkg/model/provider/gemini/adapter.go:24–32  ·  view source on GitHub ↗

StreamAdapter adapts the Gemini streaming iterator to chat.MessageStream

Source from the content-addressed store, hash-verified

22
23// StreamAdapter adapts the Gemini streaming iterator to chat.MessageStream
24type StreamAdapter struct {
25 iter func(func(*genai.GenerateContentResponse, error) bool)
26 ch chan result
27 done chan struct{}
28 startOnce sync.Once
29 closeOnce sync.Once
30 model string
31 trackUsage bool
32}
33
34type result struct {
35 resp *genai.GenerateContentResponse

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected