修复意外完成原因的访问方式,并添加OpenAI依赖

This commit is contained in:
Asankilp 2025-01-26 00:57:51 +08:00
parent 736a881071
commit eddd2c3943
2 changed files with 4 additions and 3 deletions

View File

@ -412,9 +412,9 @@ async def marsho(
else: else:
await UniMessage(str(choice.message.content)).send(reply_to=True) await UniMessage(str(choice.message.content)).send(reply_to=True)
else: else:
await marsho_cmd.finish(f"意外的完成原因:{choice['finish_reason']}") await marsho_cmd.finish(f"意外的完成原因:{choice.finish_reason}")
else: else:
await marsho_cmd.finish(f"意外的完成原因:{choice['finish_reason']}") await marsho_cmd.finish(f"意外的完成原因:{choice.finish_reason}")
except Exception as e: except Exception as e:
await UniMessage(str(e) + suggest_solution(str(e))).send() await UniMessage(str(e) + suggest_solution(str(e))).send()
traceback.print_exc() traceback.print_exc()

View File

@ -27,7 +27,8 @@ dependencies = [
"sumy>=0.11.0", "sumy>=0.11.0",
"azure-ai-inference>=1.0.0b6", "azure-ai-inference>=1.0.0b6",
"watchdog>=6.0.0", "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" } license = { text = "MIT, Mulan PSL v2" }