From 5b5bd597830c6beb305ff85bbb36383d9bdf2639 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 31 Jul 2023 17:20:07 -0700 Subject: [PATCH] inc timeout --- litellm/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index e9148414f..658ce9996 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -128,7 +128,7 @@ def get_optional_params( ####### COMPLETION ENDPOINTS ################ ############################################# @client -@func_set_timeout(60, allowOverride=True) ## https://pypi.org/project/func-timeout/ - timeouts, in case calls hang (e.g. Azure) +@func_set_timeout(120, 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 @@ -136,7 +136,7 @@ def completion( temperature=1, top_p=1, n=1, stream=False, stop=None, max_tokens=float('inf'), presence_penalty=0, frequency_penalty=0, logit_bias={}, user="", # Optional liteLLM function params - azure=False, logger_fn=None, verbose=False + *, forceTimeout=60, azure=False, logger_fn=None, verbose=False ): try: # check if user passed in any of the OpenAI optional params