perf: 优化 AI 参数

This commit is contained in:
kuaifan
2025-02-22 11:13:16 +08:00
parent a8f3b02ee7
commit 154e0039d1
4 changed files with 20 additions and 0 deletions

View File

@@ -665,6 +665,9 @@ class WebSocketDialogMsg extends AbstractModel
if (!$text) return '';
if ($msgData['type'] === 'md') {
$text = preg_replace("/:::\s*reasoning[\s\S]*?:::/", "", $text);
if (preg_match('/:::\s*reasoning\s+/', $text)) {
return Doo::translate('思考中...');
}
$text = Base::markdown2html($text);
$text = self::previewConvertTaskList($text);
}