You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CompletionUsage represents Usage of CompletionResponse
47
+
typeCompletionUsagestruct {
48
+
PromptTokensint`json:"prompt_tokens"`
49
+
CompletionTokensint`json:"completion_tokens"`
50
+
TotalTokensint`json:"total_tokens"`
51
+
}
52
+
50
53
// CompletionResponse represents a response structure for completion API
51
54
typeCompletionResponsestruct {
52
-
IDstring`json:"id"`
53
-
Objectstring`json:"object"`
54
-
Createduint64`json:"created"`
55
-
Modelstring`json:"model"`
56
-
Choices []Choice`json:"choices"`
55
+
IDstring`json:"id"`
56
+
Objectstring`json:"object"`
57
+
Createduint64`json:"created"`
58
+
Modelstring`json:"model"`
59
+
Choices []Choice`json:"choices"`
60
+
UsageCompletionUsage`json:"usage"`
57
61
}
58
62
59
63
// CreateCompletion — API call to create a completion. This is the main endpoint of the API. Returns new text as well as, if requested, the probabilities over each alternative token at each position.
0 commit comments