mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
fix: Handle None response and update InvalidRequestError test
This commit is contained in:
parent
b79c09cf58
commit
14d02bc843
2 changed files with 5 additions and 1 deletions
|
@ -71,6 +71,8 @@ def simple_send_with_retries(model_name, messages, extra_params=None):
|
|||
}
|
||||
|
||||
_hash, response = send_completion(**kwargs)
|
||||
if not response or not hasattr(response, 'choices') or not response.choices:
|
||||
return None
|
||||
return response.choices[0].message.content
|
||||
except litellm_ex.exceptions_tuple() as err:
|
||||
ex_info = litellm_ex.get_ex_info(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue