set timeout on predibase test

This commit is contained in:
Ishaan Jaff 2024-09-18 17:13:13 -07:00
parent c60f6f496a
commit a22e473636

View file

@ -302,12 +302,14 @@ async def test_completion_predibase():
model="predibase/llama-3-8b-instruct", model="predibase/llama-3-8b-instruct",
tenant_id="c4768f95", tenant_id="c4768f95",
api_key=os.getenv("PREDIBASE_API_KEY"), api_key=os.getenv("PREDIBASE_API_KEY"),
messages=[{"role": "user", "content": "What is the meaning of life?"}], messages=[{"role": "user", "content": "who are u?"}],
max_tokens=10, max_tokens=10,
timeout=5,
) )
print(response) print(response)
except litellm.Timeout as e: except litellm.Timeout as e:
print("got a timeout error from predibase")
pass pass
except litellm.ServiceUnavailableError as e: except litellm.ServiceUnavailableError as e:
pass pass