From 41c4636dd236b05430cf03bd0e100bd74a8333ba Mon Sep 17 00:00:00 2001 From: Jason Liu Date: Thu, 12 Oct 2023 20:02:05 -0400 Subject: [PATCH] Change max retries to 1 --- instructor/patch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instructor/patch.py b/instructor/patch.py index 4635e1b..3833225 100644 --- a/instructor/patch.py +++ b/instructor/patch.py @@ -103,7 +103,7 @@ def wrap_chatcompletion(func: Callable) -> Callable: @wraps(func) async def new_chatcompletion_async( - response_model=None, validation_context=None, *args, max_retries=0, **kwargs + response_model=None, validation_context=None, *args, max_retries=1, **kwargs ): response_model, new_kwargs = handle_response_model(response_model, kwargs) # type: ignore response, error = await retry_async( @@ -120,7 +120,7 @@ def wrap_chatcompletion(func: Callable) -> Callable: @wraps(func) def new_chatcompletion_sync( - response_model=None, validation_context=None, *args, max_retries=0, **kwargs + response_model=None, validation_context=None, *args, max_retries=1, **kwargs ): response_model, new_kwargs = handle_response_model(response_model, kwargs) # type: ignore response, error = retry_sync(