From 342eae6464ea365d751663f515787c99ee87270c Mon Sep 17 00:00:00 2001 From: taylor Date: Sun, 13 Oct 2024 16:17:27 +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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maubot_llmplus/local_paltform.py b/maubot_llmplus/local_paltform.py index 8f16d25..dbfbe97 100644 --- a/maubot_llmplus/local_paltform.py +++ b/maubot_llmplus/local_paltform.py @@ -3,7 +3,8 @@ import json from mautrix.types import MessageEvent from mautrix.util.config import BaseProxyConfig -from maubot_llmplus import platforms +import maubot_llmplus +import maubot_llmplus.platforms from maubot_llmplus.platforms import Platform, ChatCompletion @@ -16,7 +17,7 @@ class Ollama(Platform): async def create_chat_completion(self, evt: MessageEvent) -> ChatCompletion: full_context = [] - context = platforms.get_context(evt) + context = maubot_llmplus.platforms.get_context(evt) full_context.extend(list(context)) endpoint = f"{self.url}/api/chat"