@@ -41,16 +41,16 @@ func (rr *responseRecorder) Flush() {
4141}
4242
4343type RequestResponsePair struct {
44- ID string `json:"id"`
45- Model string `json:"model"`
46- Method string `json:"method"`
47- URL string `json:"url"`
48- Request string `json:"request"`
49- Response string `json:"response,omitempty"`
50- Error string `json:"error,omitempty"`
51- Timestamp time. Time `json:"timestamp"`
52- StatusCode int `json:"status_code"`
53- UserAgent string `json:"user_agent,omitempty"`
44+ ID string `json:"id"`
45+ Model string `json:"model"`
46+ Method string `json:"method"`
47+ URL string `json:"url"`
48+ Request string `json:"request"`
49+ Response string `json:"response,omitempty"`
50+ Error string `json:"error,omitempty"`
51+ Timestamp int64 `json:"timestamp"`
52+ StatusCode int `json:"status_code"`
53+ UserAgent string `json:"user_agent,omitempty"`
5454}
5555
5656type ModelData struct {
@@ -108,7 +108,7 @@ func (r *OpenAIRecorder) RecordRequest(model string, req *http.Request, body []b
108108 Method : req .Method ,
109109 URL : req .URL .Path ,
110110 Request : string (body ),
111- Timestamp : time .Now (),
111+ Timestamp : time .Now (). Unix () ,
112112 UserAgent : req .UserAgent (),
113113 }
114114
0 commit comments