From 1b8e028b83343bd43f4972ed1e978ee2214e4be2 Mon Sep 17 00:00:00 2001 From: taylor <=> Date: Mon, 14 Oct 2024 13:58:36 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=A2=9E=E5=8A=A0=E5=88=87=E6=8D=A2ai?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- maubot_llmplus/aibot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/maubot_llmplus/aibot.py b/maubot_llmplus/aibot.py index 143bb85..64bccc7 100644 --- a/maubot_llmplus/aibot.py +++ b/maubot_llmplus/aibot.py @@ -146,18 +146,17 @@ class AiBotPlugin(AbsExtraConfigPlugin): @command.argument("argus") async def model(self, event: MessageEvent, argus: str): # 如果是list表示查看当前可以使用的模型列表 - if argus == '#list': + if argus == 'list': platform = self.get_ai_platform() models = await platform.list_models() await event.reply("\n".join(models), markdown=True) - @ai_command.subcommand(help="") @command.argument("argus") async def use(self, event: MessageEvent, argus: str): platform = self.get_ai_platform() # 获取模型列表,判断使用的模型是否存在于列表中 - models = platform.list_models() + models = await platform.list_models() if f"- {argus}" in models: self.log.debug(f"switch model: {argus}") self.config._cur_model = argus