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