fix: calculate usage if not given in non-stream mode (#352)
This commit is contained in:
1 parent
7c3a1e90f1
commit
b1329a3a6f
3 files changed
+17
-4
No files matched your search
+3
-2
@@ -81,8 +81,9 @@ type OpenAIErrorWithStatusCode struct {
|
||||
}
|
||||
|
||||
type TextResponse struct {
|
||||
Usage `json:"usage"`
|
||||
Error OpenAIError `json:"error"`
|
||||
Choices []OpenAITextResponseChoice `json:"choices"`
|
||||
Usage `json:"usage"`
|
||||
Error OpenAIError `json:"error"`
|
||||
}
|
||||
|
||||
type OpenAITextResponseChoice struct {
|
||||
|
||||
Reference in new issue
Block a user