better timeouts

This commit is contained in:
ishaan-jaff 2023-07-31 17:45:39 -07:00
parent d2e29ea0ca
commit e60b911b61
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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