-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodel.go
43 lines (38 loc) · 1.18 KB
/
model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package main
type ProxyRequest struct {
CustomID string `json:"custom_id"`
Method string `json:"method"`
Endpoint string `json:"url"`
Body interface{} `json:"body"`
}
type BatchResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Status string `json:"status"`
OutputFileID *string `json:"output_file_id"`
ErrorFileID *string `json:"error_file_id"`
RequestCounts RequestCounts `json:"request_counts"`
Error *OpenAiError `json:"error"`
}
type OpenAiError struct {
Code string `json:"code"`
Message string `json:"message"`
Type string `json:"type,omitempty"`
Param string `json:"param,omitempty"`
Line *int `json:"line,omitempty"`
}
type RequestCounts struct {
Total int `json:"total"`
Completed int `json:"completed"`
Failed int `json:"failed"`
}
type BatchRequestResponse struct {
ID string `json:"id"`
CustomID string `json:"custom_id"`
Response struct {
StatusCode int `json:"status_code"`
RequestID string `json:"request_id"`
Body interface{} `json:"body"`
} `json:"response"`
Error *OpenAiError `json:"error"`
}