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" }