mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-28 04:04:31 +00:00
(test) passing max_retries
This commit is contained in:
parent
756f356897
commit
a8919a12a8
1 changed files with 22 additions and 1 deletions
|
@ -49,4 +49,25 @@ def test_completion_with_num_retries():
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# test_completion_with_num_retries()
|
# test_completion_with_num_retries()
|
||||||
|
def test_completion_with_0_num_retries():
|
||||||
|
try:
|
||||||
|
litellm.set_verbose=False
|
||||||
|
print("making request")
|
||||||
|
|
||||||
|
# Use the completion function
|
||||||
|
response = completion(
|
||||||
|
model="gpt-3.5-turbo",
|
||||||
|
messages=[{"gm": "vibe", "role": "user"}],
|
||||||
|
max_retries=4
|
||||||
|
)
|
||||||
|
|
||||||
|
print(response)
|
||||||
|
|
||||||
|
# print(response)
|
||||||
|
except Exception as e:
|
||||||
|
print("exception", e)
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Call the test function
|
||||||
|
test_completion_with_0_num_retries()
|
Loading…
Add table
Add a link
Reference in a new issue