From 0648226c48fcb57b1d5779e6e87ef1709927f74a Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Sat, 13 Jan 2024 15:13:37 -0800 Subject: [PATCH] (docs) azure with vision enhancements --- docs/my-website/docs/providers/azure.md | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/docs/my-website/docs/providers/azure.md b/docs/my-website/docs/providers/azure.md index 9e799bc7c61..291f8f3a31d 100644 --- a/docs/my-website/docs/providers/azure.md +++ b/docs/my-website/docs/providers/azure.md @@ -116,6 +116,48 @@ response = completion( ``` +#### Usage - with Azure Vision enhancements + +```python +import os +from litellm import completion + +os.environ["AZURE_API_KEY"] = "your-api-key" + +# azure call +response = completion( + model = "azure/", + messages=[ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "What’s in this image?" + }, + { + "type": "image_url", + "image_url": { + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg" + } + } + ] + } + ], + enhancements = {"ocr": {"enabled": True}, "grounding": {"enabled": True}}, + dataSources = [ + { + "type": "AzureComputerVision", + "parameters": { + "endpoint": "", + "key": "", + }, + } + ], +) +``` + + ## Advanced ### Azure API Load-Balancing