diff --git a/src/api/controllers/chat.ts b/src/api/controllers/chat.ts index 582322e..e657fca 100644 --- a/src/api/controllers/chat.ts +++ b/src/api/controllers/chat.ts @@ -361,7 +361,7 @@ function messagesPrepare(messages: any[], refs: any[] = []) { return (content += `<|im_start|>${message.role || "user"}\n${ message.content }<|im_end|>\n`); - }, "").replace(/\!\[.+\]\(.+\)/g, ""); + }, "").replace(/\!\[.*\]\(.+\)/g, ""); logger.info("\n对话合并:\n" + content); return [ {