fix haha
This commit is contained in:
@@ -54,7 +54,9 @@ const createMessageFromCurrentBuffer = (
|
||||
tool_calls: tools.length > 0 ? tools : undefined,
|
||||
// 补全其他必填字段的默认值(根据你的类型定义)
|
||||
hide: false,
|
||||
token: 0, // 需要实际的token计算逻辑
|
||||
token: calculate_token_length(
|
||||
chunkMessages.join("") + reasoningChunks.join("")
|
||||
), // 需要实际的token计算逻辑
|
||||
example: false,
|
||||
audio: null,
|
||||
logprobs: null,
|
||||
@@ -284,7 +286,7 @@ export default function ChatBOX() {
|
||||
token: data.usage?.completion_tokens_details
|
||||
? data.usage.completion_tokens -
|
||||
data.usage.completion_tokens_details.reasoning_tokens
|
||||
: (data.usage.completion_tokens ?? calculate_token_length(msg.content)),
|
||||
: data.usage.completion_tokens ?? calculate_token_length(msg.content),
|
||||
example: false,
|
||||
audio: null,
|
||||
logprobs: data.choices[0]?.logprobs,
|
||||
|
||||
Reference in New Issue
Block a user