mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
test(test_langfuse.py): handle timeouts
This commit is contained in:
parent
1ba32368ef
commit
7d70bf84a7
4 changed files with 151 additions and 15 deletions
|
@ -25,14 +25,16 @@ def test_sync_response():
|
|||
# test_sync_response()
|
||||
|
||||
def test_sync_response_anyscale():
|
||||
litellm.set_verbose = True
|
||||
litellm.set_verbose = False
|
||||
user_message = "Hello, how are you?"
|
||||
messages = [{"content": user_message, "role": "user"}]
|
||||
try:
|
||||
response = completion(model="anyscale/mistralai/Mistral-7B-Instruct-v0.1", messages=messages, timeout=5)
|
||||
response = completion(model="anyscale/mistralai/Mistral-7B-Instruct-v0.1", messages=messages)
|
||||
except Exception as e:
|
||||
pytest.fail(f"An exception occurred: {e}")
|
||||
|
||||
test_sync_response()
|
||||
print(f"STARTING ANYSCALE RESPONSE")
|
||||
test_sync_response_anyscale()
|
||||
# test_sync_response_anyscale()
|
||||
|
||||
def test_async_response_openai():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue