mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 04:10:15 +01:00
🛠️ fix: getStreamUsage Method in OpenAIClient (#4133)
This commit is contained in:
parent
5f28682314
commit
3ea2d908e0
2 changed files with 69 additions and 1 deletions
|
|
@ -923,7 +923,9 @@ ${convo}
|
|||
this.usage &&
|
||||
typeof this.usage === 'object' &&
|
||||
'completion_tokens_details' in this.usage &&
|
||||
typeof this.usage.completion_tokens_details === 'object'
|
||||
this.usage.completion_tokens_details &&
|
||||
typeof this.usage.completion_tokens_details === 'object' &&
|
||||
'reasoning_tokens' in this.usage.completion_tokens_details
|
||||
) {
|
||||
const outputTokens = Math.abs(
|
||||
this.usage.completion_tokens_details.reasoning_tokens - this.usage[this.outputTokensKey],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue