update: 修改anthropic请求体

This commit is contained in:
taylor
2024-10-14 17:38:46 +08:00
parent 2fd5394773
commit 5506fb83bb
2 changed files with 5 additions and 6 deletions

View File

@@ -83,11 +83,10 @@ class Anthropic(Platform):
async def create_chat_completion(self, plugin: AbsExtraConfigPlugin, evt: MessageEvent) -> ChatCompletion:
full_chat_context = []
chat_context = await maubot_llmplus.platforms.get_chat_context(plugin, self, evt)
full_chat_context.extend(list(chat_context))
full_system_context = []
system_context = await maubot_llmplus.platforms.get_system_context(plugin, self, evt)
full_system_context = []
chat_context = await maubot_llmplus.platforms.get_chat_context(system_context, plugin, self, evt)
full_chat_context.extend(list(chat_context))
full_system_context.extend(list(system_context))
endpoint = f"{self.url}/v1/messages"