mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
log error message on bad api response (#243)
This commit is contained in:
parent
b4207162ff
commit
8e2089b6c0
1 changed files with 3 additions and 0 deletions
|
|
@ -139,6 +139,9 @@ class AsyncModelEvaluator:
|
|||
params["extra_body"] = {"provider": {"order": [self.config.provider], "allow_fallbacks": False}}
|
||||
|
||||
completion = await self.client.chat.completions.create(**params)
|
||||
if completion.error:
|
||||
raise Exception(completion.error["message"])
|
||||
|
||||
response = completion.choices[0].message.content
|
||||
|
||||
if self.verbose:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue