From bcd802b6e97ac90ca882452f6714b867b7c1e64a Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 30 Jul 2024 12:23:41 -0300 Subject: [PATCH] Add retry support for `litellm.InternalServerError` in the `send_with_retries` function in `aider/sendchat.py`. --- aider/sendchat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/sendchat.py b/aider/sendchat.py index b5f05e578..7dfcbf145 100644 --- a/aider/sendchat.py +++ b/aider/sendchat.py @@ -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)