Merge pull request #96 from doringeman/openai-recorder
Implement Flusher interface for responseRecorder
This commit is contained in:
commit
24299c17e9
|
|
@ -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"`
|
||||
|
|
|
|||
Loading…
Reference in New Issue