mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
fix: count reasoning content into token estimation (#2276)
This commit is contained in:
parent
041360825c
commit
bc76c26181
@ -64,7 +64,8 @@ export async function estimateMessageUsage(message: Message): Promise<Completion
|
||||
}
|
||||
}
|
||||
|
||||
const tokens = estimateTextTokens(message.content)
|
||||
const combinedContent = [message.content, message.reasoning_content].filter((s) => s !== undefined).join(' ')
|
||||
const tokens = estimateTextTokens(combinedContent)
|
||||
|
||||
return {
|
||||
prompt_tokens: tokens,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user