Merge pull request #96 from doringeman/openai-recorder

Implement Flusher interface for responseRecorder
This commit is contained in:
Dorin-Andrei Geman 2025-06-27 17:27:35 +03:00 committed by GitHub
commit 24299c17e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,12 @@ func (rr *responseRecorder) WriteHeader(statusCode int) {
rr.ResponseWriter.WriteHeader(statusCode)
}
func (rr *responseRecorder) Flush() {
if flusher, ok := rr.ResponseWriter.(http.Flusher); ok {
flusher.Flush()
}
}
type RequestResponsePair struct {
ID string `json:"id"`
Model string `json:"model"`