fix: correct thinking time calculation for deepseek r1

This commit is contained in:
Fadouse 2025-02-09 16:39:51 +08:00 committed by 亢奋猫
parent c900a186b7
commit 81d4accacf

View File

@ -233,7 +233,8 @@ export default class OpenAIProvider extends BaseProvider {
time_first_token_millsec = new Date().getTime() - start_time_millsec
}
if (time_first_content_millsec == 0 && chunk.choices[0]?.delta?.content) {
//修复逻辑判断当content为</think>时time_first_content_millsec才会被赋值原有代码无意义.
if (time_first_content_millsec == 0 && chunk.choices[0]?.delta?.content == '</think>') {
time_first_content_millsec = new Date().getTime()
}