Add retry support for litellm.InternalServerError in the send_with_retries function in aider/sendchat.py.

This commit is contained in:
Paul Gauthier (aider) 2024-07-30 12:23:41 -03:00
parent cba53bfc22
commit bcd802b6e9

View file

@ -48,7 +48,7 @@ def lazy_litellm_retry_decorator(func):
giveup=should_giveup,
max_time=60,
on_backoff=lambda details: print(
f"{details.get('exception','Exception')}\nRetry in {details['wait']:.1f} seconds."
f"{details.get('exception', 'Exception')}\nRetry in {details['wait']:.1f} seconds."
),
)(func)
return decorated_func(*args, **kwargs)