fix: Handle None response and update InvalidRequestError test

This commit is contained in:
Paul Gauthier (aider) 2024-11-08 10:02:48 -08:00
parent b79c09cf58
commit 14d02bc843
2 changed files with 5 additions and 1 deletions

View file

@ -85,7 +85,9 @@ class TestSendChat(unittest.TestCase):
mock.status_code = 400
mock_completion.side_effect = litellm.InvalidRequestError(
"Invalid request", response=mock, llm_provider="test_provider", model="test_model"
message="Invalid request",
llm_provider="test_provider",
model="test_model"
)
result = simple_send_with_retries(self.mock_model, self.mock_messages)