From 6786394b7988181213afa672cf4e105e7c1f9e08 Mon Sep 17 00:00:00 2001 From: taylor Date: Sun, 13 Oct 2024 16:23:26 +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/platforms.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/maubot_llmplus/platforms.py b/maubot_llmplus/platforms.py index 3dbdc82..719f1f2 100644 --- a/maubot_llmplus/platforms.py +++ b/maubot_llmplus/platforms.py @@ -8,8 +8,6 @@ from maubot import Plugin from mautrix.types import MessageEvent, EncryptedEvent from mautrix.util.config import BaseProxyConfig -import maubot_llmplus.aibot - """ AI响应对象 """ @@ -59,7 +57,7 @@ class Platform: -async def get_context(plugin: maubot_llmplus.aibot.AiBotPlugin, evt: MessageEvent) -> deque: +async def get_context(plugin: Plugin, evt: MessageEvent) -> deque: # 创建系统提示词上下文 system_context = deque() # 生成当前时间 @@ -122,7 +120,7 @@ async def get_context(plugin: maubot_llmplus.aibot.AiBotPlugin, evt: MessageEven -async def generate_context_messages(plugin: maubot_llmplus.aibot.AiBotPlugin, evt: MessageEvent) -> Generator[MessageEvent, None, None]: +async def generate_context_messages(plugin: Plugin, evt: MessageEvent) -> Generator[MessageEvent, None, None]: yield evt if plugin.config['reply_in_thread']: while evt.content.relates_to.in_reply_to: