Fix another count issue

This commit is contained in:
Webifi 2023-06-08 15:49:19 -05:00
parent 5e86b302fc
commit c6510a31dc
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ export class ChatCompletionResponse {
} as Usage } as Usage
message.usage.completion_tokens += response.usage.completion_tokens message.usage.completion_tokens += response.usage.completion_tokens
message.usage.prompt_tokens = response.usage.prompt_tokens + (this.offsetTotals?.prompt_tokens || 0) message.usage.prompt_tokens = response.usage.prompt_tokens + (this.offsetTotals?.prompt_tokens || 0)
message.usage.total_tokens += response.usage.total_tokens + (this.offsetTotals?.total_tokens || 0) message.usage.total_tokens = response.usage.total_tokens + (this.offsetTotals?.total_tokens || 0)
} else { } else {
message.content = choice.message.content message.content = choice.message.content
message.usage = response.usage message.usage = response.usage