Remove the <think></think> tags in qwen3 too.

This commit is contained in:
mcz
2025-04-29 19:49:14 +08:00
parent 77c6102de7
commit 1d92421960

View File

@@ -323,7 +323,8 @@ export const apiTranslate = async ({
case OPT_TRANS_OLLAMA: case OPT_TRANS_OLLAMA:
case OPT_TRANS_OLLAMA_2: case OPT_TRANS_OLLAMA_2:
case OPT_TRANS_OLLAMA_3: case OPT_TRANS_OLLAMA_3:
if (res?.model.startsWith('deepseek-r1')) { const deepModels = ['deepseek-r1', 'qwen3'];
if (deepModels.some(model => res?.model?.startsWith(model))) {
trText = res?.response.replace(/<think>[\s\S]*<\/think>/i, ''); trText = res?.response.replace(/<think>[\s\S]*<\/think>/i, '');
}else{ }else{
trText = res?.response; trText = res?.response;