Add Prediction field (#970)

* Add Prediction field to ChatCompletionRequest

* Include prediction tokens in response
This commit is contained in:
Daniel Peng
2025-04-29 06:38:27 -07:00
committed by GitHub
parent 6836cf6a6f
commit 93a611cf4f
2 changed files with 11 additions and 2 deletions

View File

@@ -13,8 +13,10 @@ type Usage struct {
// CompletionTokensDetails Breakdown of tokens used in a completion.
type CompletionTokensDetails struct {
AudioTokens int `json:"audio_tokens"`
ReasoningTokens int `json:"reasoning_tokens"`
AudioTokens int `json:"audio_tokens"`
ReasoningTokens int `json:"reasoning_tokens"`
AcceptedPredictionTokens int `json:"accepted_prediction_tokens"`
RejectedPredictionTokens int `json:"rejected_prediction_tokens"`
}
// PromptTokensDetails Breakdown of tokens used in the prompt.