(feat) add BadRequestError for Azure

This commit is contained in:
ishaan-jaff 2023-12-15 09:53:56 +05:30
parent 191c1d2887
commit 4fd59c5847

View file

@ -5002,6 +5002,14 @@ def exception_type(
model=model,
response=original_exception.response
)
elif "DeploymentNotFound" in error_str:
exception_mapping_worked = True
raise BadRequestError(
message=f"AzureException - {original_exception.message}",
llm_provider="azure",
model=model,
response=original_exception.response
)
elif hasattr(original_exception, "status_code"):
exception_mapping_worked = True
if original_exception.status_code == 401: