buildResponsesSSE constructs an SSE event for the Responses API. Format: "event: type\ndata: {...}" (handler adds surrounding newlines).
(eventType string, data map[string]any)
| 307 | // buildResponsesSSE constructs an SSE event for the Responses API. |
| 308 | // Format: "event: type\ndata: {...}" (handler adds surrounding newlines). |
| 309 | func buildResponsesSSE(eventType string, data map[string]any) []byte { |
| 310 | dataJSON, _ := json.Marshal(data) |
| 311 | return []byte(fmt.Sprintf("event: %s\ndata: %s", eventType, dataJSON)) |
| 312 | } |
| 313 | |
| 314 | // isResponsesCompleted returns true if the chunk contains a response.completed event. |
| 315 | func isResponsesCompleted(chunk []byte) bool { |
no outgoing calls
no test coverage detected