Skip to content

Commit

Permalink
feat(ark-context): update prompt token details
Browse files Browse the repository at this point in the history
  • Loading branch information
liuminghao committed Dec 17, 2024
1 parent ea91b35 commit fd9d7a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions service/arkruntime/model/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ const (
ErrorRetryMaxDelay = 8 * time.Second
)

type TokensDetail struct {
type PromptTokensDetail struct {
CachedTokens int `json:"cached_tokens"`
}

type Usage struct {
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
PromptTokensDetails *TokensDetail `json:"prompt_tokens_details,omitempty"`
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
PromptTokensDetails PromptTokensDetail `json:"prompt_tokens_details"`
}

type Response interface {
Expand Down

0 comments on commit fd9d7a6

Please sign in to comment.