From e60b911b617c36ca317ac966bc53a55b1c131c70 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 31 Jul 2023 17:45:39 -0700 Subject: [PATCH] better timeouts --- litellm/main.py | 2 +- litellm/tests/test_model_fallback.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index 9de92a372..831ad0a4e 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -128,7 +128,7 @@ def get_optional_params( ####### COMPLETION ENDPOINTS ################ ############################################# @client -@func_set_timeout(120, allowOverride=True) ## https://pypi.org/project/func-timeout/ - timeouts, in case calls hang (e.g. Azure) +@func_set_timeout(180, allowOverride=True) ## https://pypi.org/project/func-timeout/ - timeouts, in case calls hang (e.g. Azure) def completion( model, messages, # required params # Optional OpenAI params: see https://platform.openai.com/docs/api-reference/chat/create diff --git a/litellm/tests/test_model_fallback.py b/litellm/tests/test_model_fallback.py index cdb4bffa2..8710465eb 100644 --- a/litellm/tests/test_model_fallback.py +++ b/litellm/tests/test_model_fallback.py @@ -20,6 +20,6 @@ for model in model_fallback_list: print(response) if response != None: break - except: + except Exception as e: print(f"error occurred: {traceback.format_exc()}") - pass + raise e