feat(azure.py): support health checking azure deployments

Fixes https://github.com/BerriAI/litellm/issues/5279
This commit is contained in:
Krrish Dholakia 2024-08-22 16:11:14 -07:00
parent 63cd94c32a
commit d7d3eee349
4 changed files with 42 additions and 3 deletions

View file

@ -1970,6 +1970,8 @@ class AzureChatCompletion(BaseLLM):
input=prompt, # type: ignore
voice="alloy",
)
elif mode == "batch":
completion = await client.batches.with_raw_response.list(limit=1) # type: ignore
else:
raise Exception("mode not set")
response = {}