mirror of
https://github.com/cline/cline.git
synced 2026-09-15 04:14:34 +08:00
Fixing Xai Pricing
This commit is contained in:
@@ -58,10 +58,10 @@ export class XAIHandler implements ApiHandler {
|
||||
if (chunk.usage) {
|
||||
yield {
|
||||
type: "usage",
|
||||
inputTokens: 0,
|
||||
inputTokens: chunk.usage.prompt_tokens || 0,
|
||||
outputTokens: chunk.usage.completion_tokens || 0,
|
||||
// @ts-ignore-next-line
|
||||
cacheReadTokens: chunk.usage.prompt_cache_hit_tokens || 0,
|
||||
cacheReadTokens: chunk.usage.prompt_tokens_details.cached_tokens || 0,
|
||||
// @ts-ignore-next-line
|
||||
cacheWriteTokens: chunk.usage.prompt_cache_miss_tokens || 0,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user