From 39ce5646f6e0e1c2298a0b82209826a20a22797a Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Mon, 24 Jun 2024 17:04:50 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20content=E5=85=83=E7=B4=A0=E6=8B=BC?= =?UTF-8?q?=E6=8E=A5=E6=97=B6=E4=BD=BF=E7=94=A8=E6=8D=A2=E8=A1=8C=E7=AC=A6?= =?UTF-8?q?=E9=97=B4=E9=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/provider/modelmgr/apis/chatcmpl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/provider/modelmgr/apis/chatcmpl.py b/pkg/provider/modelmgr/apis/chatcmpl.py index cc33ad0d..3f1cfb32 100644 --- a/pkg/provider/modelmgr/apis/chatcmpl.py +++ b/pkg/provider/modelmgr/apis/chatcmpl.py @@ -110,7 +110,7 @@ class OpenAIChatCompletions(api.LLMAPIRequester): # 检查 content 列表中是否每个部分都是文本 if all(isinstance(part, dict) and part.get("type") == "text" for part in content): # 将所有文本部分合并为一个字符串 - msg_dict["content"] = "".join(part["text"] for part in content) + msg_dict["content"] = "\n".join(part["text"] for part in content) req_messages.append(msg_dict) try: