Skip to content

Commit

Permalink
#477 Mark tokens as estimated
Browse files Browse the repository at this point in the history
  • Loading branch information
alxmiron committed Mar 29, 2023
1 parent dd6b457 commit 7cd6e06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/chatgpt-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ export class ChatGPTAPI {
message.detail.usage = {
prompt_tokens: promptTokens,
completion_tokens: completionTokens,
total_tokens: promptTokens + completionTokens
total_tokens: promptTokens + completionTokens,
estimated: true
}
}
return this._upsertMessage(message).then(() => message)
Expand Down

0 comments on commit 7cd6e06

Please sign in to comment.