File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,8 @@ type ChatCompletionRequest struct {
273273 ReasoningEffort string `json:"reasoning_effort,omitempty"`
274274 // Metadata to store with the completion.
275275 Metadata map [string ]string `json:"metadata,omitempty"`
276+ // Configuration for a predicted output.
277+ Prediction * Prediction `json:"prediction,omitempty"`
276278}
277279
278280type StreamOptions struct {
@@ -340,6 +342,11 @@ type LogProbs struct {
340342 Content []LogProb `json:"content"`
341343}
342344
345+ type Prediction struct {
346+ Content string `json:"content"`
347+ Type string `json:"type"`
348+ }
349+
343350type FinishReason string
344351
345352const (
Original file line number Diff line number Diff line change @@ -13,8 +13,10 @@ type Usage struct {
1313
1414// CompletionTokensDetails Breakdown of tokens used in a completion.
1515type 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"`
1820}
1921
2022// PromptTokensDetails Breakdown of tokens used in the prompt.
You can’t perform that action at this time.
0 commit comments