mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
try / except rate limit errors
This commit is contained in:
parent
1e3b034529
commit
289b468aa1
1 changed files with 42 additions and 34 deletions
|
@ -133,6 +133,7 @@ async def test_create_fine_tune_jobs_async():
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_azure_create_fine_tune_jobs_async():
|
async def test_azure_create_fine_tune_jobs_async():
|
||||||
|
try:
|
||||||
verbose_logger.setLevel(logging.DEBUG)
|
verbose_logger.setLevel(logging.DEBUG)
|
||||||
file_name = "azure_fine_tune.jsonl"
|
file_name = "azure_fine_tune.jsonl"
|
||||||
_current_dir = os.path.dirname(os.path.abspath(__file__))
|
_current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
@ -148,7 +149,9 @@ async def test_azure_create_fine_tune_jobs_async():
|
||||||
api_base="https://my-endpoint-sweden-berri992.openai.azure.com/",
|
api_base="https://my-endpoint-sweden-berri992.openai.azure.com/",
|
||||||
)
|
)
|
||||||
|
|
||||||
print("response from litellm.create_fine_tuning_job=", create_fine_tuning_response)
|
print(
|
||||||
|
"response from litellm.create_fine_tuning_job=", create_fine_tuning_response
|
||||||
|
)
|
||||||
|
|
||||||
assert create_fine_tuning_response.id is not None
|
assert create_fine_tuning_response.id is not None
|
||||||
assert create_fine_tuning_response.model == "gpt-35-turbo-1106"
|
assert create_fine_tuning_response.model == "gpt-35-turbo-1106"
|
||||||
|
@ -175,3 +178,8 @@ async def test_azure_create_fine_tune_jobs_async():
|
||||||
|
|
||||||
assert response.status == "cancelled"
|
assert response.status == "cancelled"
|
||||||
assert response.id == create_fine_tuning_response.id
|
assert response.id == create_fine_tuning_response.id
|
||||||
|
except openai.RateLimitError:
|
||||||
|
pass
|
||||||
|
except Exception as e:
|
||||||
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue