From b934cd399b9fd1dac69ac5d8333d2a997c7cdeff Mon Sep 17 00:00:00 2001 From: taylor Date: Sun, 13 Oct 2024 19:12:52 +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 --- base-config.yaml | 2 +- maubot_llmplus/local_paltform.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base-config.yaml b/base-config.yaml index 162d861..554a448 100644 --- a/base-config.yaml +++ b/base-config.yaml @@ -13,7 +13,7 @@ system_prompt: "" platforms: local_ai: type: ollama - url: http://localhost:11434 + url: http://192.168.32.162:11434 api_key: model: llama3.2 max_words: 1000 diff --git a/maubot_llmplus/local_paltform.py b/maubot_llmplus/local_paltform.py index 5e4e452..08702de 100644 --- a/maubot_llmplus/local_paltform.py +++ b/maubot_llmplus/local_paltform.py @@ -47,7 +47,7 @@ class Ollama(Platform): if response.status != 200: return [] response_data = await response.json() - return [f"{i + 1}: {model['name']}" for i, model in response_data['models']] + return [f"{i + 1}: {model['name']}" for i, model in enumerate(response_data['models'])] def get_type(self) -> str: return "local_ai"