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: