ResponseStreamAdapter adapts the OpenAI responses stream to our interface. It works with any responseEventStream implementation (SSE or WebSocket).
| 19 | // ResponseStreamAdapter adapts the OpenAI responses stream to our interface. |
| 20 | // It works with any responseEventStream implementation (SSE or WebSocket). |
| 21 | type ResponseStreamAdapter struct { |
| 22 | stream responseEventStream |
| 23 | trackUsage bool |
| 24 | itemCallIDMap map[string]string |
| 25 | itemHasContent map[string]bool |
| 26 | pendingArgs map[string]string |
| 27 | } |
| 28 | |
| 29 | func newResponseStreamAdapter(stream responseEventStream, trackUsage bool) *ResponseStreamAdapter { |
| 30 | return &ResponseStreamAdapter{ |
nothing calls this directly
no outgoing calls
no test coverage detected