From eddd2c39433e61af627f7bb58fc23b4099e5611c Mon Sep 17 00:00:00 2001 From: Asankilp Date: Sun, 26 Jan 2025 00:57:51 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E4=BF=AE=E5=A4=8D=E6=84=8F?= =?UTF-8?q?=E5=A4=96=E5=AE=8C=E6=88=90=E5=8E=9F=E5=9B=A0=E7=9A=84=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E6=96=B9=E5=BC=8F=EF=BC=8C=E5=B9=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?OpenAI=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_plugin_marshoai/marsho.py | 4 ++-- pyproject.toml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nonebot_plugin_marshoai/marsho.py b/nonebot_plugin_marshoai/marsho.py index 44742b2a..cbbe339b 100644 --- a/nonebot_plugin_marshoai/marsho.py +++ b/nonebot_plugin_marshoai/marsho.py @@ -412,9 +412,9 @@ async def marsho( else: await UniMessage(str(choice.message.content)).send(reply_to=True) else: - await marsho_cmd.finish(f"意外的完成原因:{choice['finish_reason']}") + await marsho_cmd.finish(f"意外的完成原因:{choice.finish_reason}") else: - await marsho_cmd.finish(f"意外的完成原因:{choice['finish_reason']}") + await marsho_cmd.finish(f"意外的完成原因:{choice.finish_reason}") except Exception as e: await UniMessage(str(e) + suggest_solution(str(e))).send() traceback.print_exc() diff --git a/pyproject.toml b/pyproject.toml index a51d1d41..89d6ed6f 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,8 @@ dependencies = [ "sumy>=0.11.0", "azure-ai-inference>=1.0.0b6", "watchdog>=6.0.0", - "nonebot-plugin-apscheduler>=0.5.0" + "nonebot-plugin-apscheduler>=0.5.0", + "openai>=1.58.1" ] license = { text = "MIT, Mulan PSL v2" }