From aadfa14d59a531757c9c4bcc9fcac7358766de65 Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Fri, 17 May 2024 09:46:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20claude=20=E8=AF=B7=E6=B1=82=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/provider/modelmgr/apis/anthropicmsgs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/provider/modelmgr/apis/anthropicmsgs.py b/pkg/provider/modelmgr/apis/anthropicmsgs.py index ee2c51a5..6c18bf51 100644 --- a/pkg/provider/modelmgr/apis/anthropicmsgs.py +++ b/pkg/provider/modelmgr/apis/anthropicmsgs.py @@ -69,7 +69,7 @@ class AnthropicMessages(api.LLMAPIRequester): elif isinstance(m.content, list): # 删除m.content中的type!=text的元素 m.content = [ - c for c in m.content if c.get("type") == "text" + c for c in m.content if c.type == "text" ] if len(m.content) > 0: