Extends #445 to other providers which many provides deepseek

This commit is contained in:
Tiger Kaovilai
2025-04-11 12:50:16 -04:00
parent 60a7650e1c
commit f5c6c313fc
8 changed files with 62 additions and 24 deletions
+8 -1
View File
@@ -52,7 +52,14 @@ export class AzureEngine implements AiEngine {
if (message?.content === null) {
return undefined;
}
return message?.content;
let content = message?.content;
if (content && content.includes('<think>')) {
return content.replace(/<think>[\s\S]*?<\/think>/g, '').trim();
}
return content;
} catch (error) {
outro(`${chalk.red('✖')} ${this.config.model}`);