fix: some time in the anthropicmsgs.py mesg_dcit["content"] is str can not append

This commit is contained in:
Dong_master
2025-08-12 11:15:17 +08:00
parent 0607a0fa5c
commit 6d35fc408c

View File

@@ -259,7 +259,8 @@ class AnthropicMessages(requester.ProviderAPIRequester):
},
}
msg_dict['content'][i] = alter_image_ele
if isinstance(msg_dict['content'], str) and msg_dict['content'] == '':
msg_dict['content'] = [] # 这里不知道为什么会莫名有个空导致content为字符
if m.tool_calls:
for tool_call in m.tool_calls:
msg_dict['content'].append(