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

This commit is contained in:
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:
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()