From 6f957b155e7653cb1b50b6f6a02c136f47b6a79f Mon Sep 17 00:00:00 2001 From: taylor Date: Sun, 13 Oct 2024 19:01:15 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E6=B7=BB=E5=8A=A0=E5=91=BD=E4=BB=A4ai?= =?UTF-8?q?=20model=20list=E7=9A=84=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 200b7d0..f61b376 100644 --- a/maubot_llmplus/local_paltform.py +++ b/maubot_llmplus/local_paltform.py @@ -46,8 +46,8 @@ class Ollama(Platform): async with self.http.get(full_url) as response: if response.status != 200: return [] - response_data = json.loads(await response.json()) - return [model['name'] for model in response_data] + response_data = await response.json() + return [model['name'] for model in response_data['models']] def get_type(self) -> str: return "local_ai"