From 4e936b35b29bb517b55f6e746f4e423faaa2ac68 Mon Sep 17 00:00:00 2001 From: taylor Date: Sun, 13 Oct 2024 18:06:02 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E6=B7=BB=E5=8A=A0ollama=E8=B0=83?= =?UTF-8?q?=E7=94=A8AI=20chat=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- maubot_llmplus/local_paltform.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maubot_llmplus/local_paltform.py b/maubot_llmplus/local_paltform.py index d56adb0..fbd9e09 100644 --- a/maubot_llmplus/local_paltform.py +++ b/maubot_llmplus/local_paltform.py @@ -28,8 +28,8 @@ class Ollama(Platform): if self.api_key is not None: headers['Authorization'] = self.api_key plugin.log.debug(f"{json.dumps(req_body)}") - async with self.http.post(endpoint, headers=headers, data=json.dumps(req_body)) as response: - plugin.log.debug(f"响应内容:{response.status}, {await response.json()}") + async with self.http.post(endpoint, headers=headers, json=req_body) as response: + # plugin.log.debug(f"响应内容:{response.status}, {await response.json()}") if response.status != 200: return ChatCompletion( message={},