mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
style: Apply linter formatting to sendchat.py and test_sendchat.py
This commit is contained in:
parent
14d02bc843
commit
d0e85d9c2c
2 changed files with 2 additions and 4 deletions
|
@ -71,7 +71,7 @@ def simple_send_with_retries(model_name, messages, extra_params=None):
|
||||||
}
|
}
|
||||||
|
|
||||||
_hash, response = send_completion(**kwargs)
|
_hash, response = send_completion(**kwargs)
|
||||||
if not response or not hasattr(response, 'choices') or not response.choices:
|
if not response or not hasattr(response, "choices") or not response.choices:
|
||||||
return None
|
return None
|
||||||
return response.choices[0].message.content
|
return response.choices[0].message.content
|
||||||
except litellm_ex.exceptions_tuple() as err:
|
except litellm_ex.exceptions_tuple() as err:
|
||||||
|
|
|
@ -85,9 +85,7 @@ class TestSendChat(unittest.TestCase):
|
||||||
mock.status_code = 400
|
mock.status_code = 400
|
||||||
|
|
||||||
mock_completion.side_effect = litellm.InvalidRequestError(
|
mock_completion.side_effect = litellm.InvalidRequestError(
|
||||||
message="Invalid request",
|
message="Invalid request", llm_provider="test_provider", model="test_model"
|
||||||
llm_provider="test_provider",
|
|
||||||
model="test_model"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
result = simple_send_with_retries(self.mock_model, self.mock_messages)
|
result = simple_send_with_retries(self.mock_model, self.mock_messages)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue