File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,8 @@ type ChatCompletionRequest struct {
273
273
ReasoningEffort string `json:"reasoning_effort,omitempty"`
274
274
// Metadata to store with the completion.
275
275
Metadata map [string ]string `json:"metadata,omitempty"`
276
+ // Configuration for a predicted output.
277
+ Prediction * Prediction `json:"prediction,omitempty"`
276
278
}
277
279
278
280
type StreamOptions struct {
@@ -340,6 +342,11 @@ type LogProbs struct {
340
342
Content []LogProb `json:"content"`
341
343
}
342
344
345
+ type Prediction struct {
346
+ Content string `json:"content"`
347
+ Type string `json:"type"`
348
+ }
349
+
343
350
type FinishReason string
344
351
345
352
const (
Original file line number Diff line number Diff line change @@ -13,8 +13,10 @@ type Usage struct {
13
13
14
14
// CompletionTokensDetails Breakdown of tokens used in a completion.
15
15
type CompletionTokensDetails struct {
16
- AudioTokens int `json:"audio_tokens"`
17
- ReasoningTokens int `json:"reasoning_tokens"`
16
+ AudioTokens int `json:"audio_tokens"`
17
+ ReasoningTokens int `json:"reasoning_tokens"`
18
+ AcceptedPredictionTokens int `json:"accepted_prediction_tokens"`
19
+ RejectedPredictionTokens int `json:"rejected_prediction_tokens"`
18
20
}
19
21
20
22
// PromptTokensDetails Breakdown of tokens used in the prompt.
You can’t perform that action at this time.
0 commit comments