feat: support cached input token billing
This commit is contained in:
@@ -294,9 +294,19 @@ type ChatCompletionChoiceMessage struct {
|
||||
}
|
||||
|
||||
type ChatCompletionUsage struct {
|
||||
PromptTokens int `json:"prompt_tokens,omitempty" example:"12"`
|
||||
CompletionTokens int `json:"completion_tokens,omitempty" example:"8"`
|
||||
TotalTokens int `json:"total_tokens,omitempty" example:"20"`
|
||||
PromptTokens int `json:"prompt_tokens,omitempty" example:"12"`
|
||||
CompletionTokens int `json:"completion_tokens,omitempty" example:"8"`
|
||||
TotalTokens int `json:"total_tokens,omitempty" example:"20"`
|
||||
PromptTokensDetails *ChatPromptTokensDetails `json:"prompt_tokens_details,omitempty"`
|
||||
InputTokensDetails *ChatInputTokensDetails `json:"input_tokens_details,omitempty"`
|
||||
}
|
||||
|
||||
type ChatPromptTokensDetails struct {
|
||||
CachedTokens int `json:"cached_tokens,omitempty" example:"4"`
|
||||
}
|
||||
|
||||
type ChatInputTokensDetails struct {
|
||||
CachedTokens int `json:"cached_tokens,omitempty" example:"4"`
|
||||
}
|
||||
|
||||
type NetworkProxyConfigResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user