Created
January 29, 2025 03:13
-
-
Save dat-boris/dc07e92862b8454499f19b397dd7e8da to your computer and use it in GitHub Desktop.
A sample CURL command for testing Azure AI service (not to be confused with serverless API)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example URL: https://ai-useast2hub770089131882.services.ai.azure.com/models/chat/completions?api-version=2024-05-01-preview | |
# - Note the `services.ai.azure.com` domain name, which use `api-key` for auth | |
# - instead of the `models.ai.azure.com` - which will use `Token bearer` | |
curl -X POST "${AZURE_SERVICE_URL}" \ | |
-H "Content-Type: application/json" \ | |
-H "api-key: ${AZURE_SERVICE_KEY}" \ | |
-d '{ | |
"messages": [ | |
{ | |
"role": "user", | |
"content": "What is the airspeed velocity of an unladen swallow?" | |
} | |
], | |
"model": "Llama-3.2-90B-Vision-Instruct", | |
"max_tokens": 2048, | |
"temperature": 0.8, | |
"top_p": 0.1, | |
"presence_penalty": 0, | |
"frequency_penalty": 0 | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment