fix: allow error returns None

This commit is contained in:
MeteorSky 2025-03-04 00:08:49 +08:00
parent c7d4d2e41f
commit a01ef6cfa0

View File

@ -149,7 +149,7 @@ async def generate_direct_chat_completion(
}
)
if "error" in res:
if "error" in res and res["error"]:
raise Exception(res["error"])
return res