When to Use
- •AI Foundry resource management
- •Model deployment operations
- •OpenAI API interactions
- •RAG pipeline configuration
Prerequisites
- •Azure CLI authenticated
- •AI Foundry workspace access
- •OpenAI resource access
Commands
AI Foundry Resources
bash
# List AI Foundry workspaces az ml workspace list -o table # Show workspace details az ml workspace show --name <workspace> --resource-group <rg> # List compute resources az ml compute list --workspace-name <workspace> --resource-group <rg>
OpenAI Deployments
bash
# List Cognitive Services accounts az cognitiveservices account list -o table # Show OpenAI account az cognitiveservices account show --name <account> --resource-group <rg> # List deployments az cognitiveservices account deployment list --name <account> --resource-group <rg> -o table # Check quota az cognitiveservices usage list --location eastus2 -o table
Model Testing
bash
# Test chat completion
curl -X POST "https://<endpoint>.openai.azure.com/openai/deployments/<deployment>/chat/completions?api-version=2024-02-15-preview" \
-H "Content-Type: application/json" \
-H "api-key: $OPENAI_API_KEY" \
-d '{"messages":[{"role":"user","content":"Hello"}]}'
Best Practices
- •Configure content safety filters
- •Implement rate limiting
- •Use managed identity for authentication
- •Monitor token usage and costs
- •Enable logging for compliance
Output Format
- •Command executed
- •Resource status
- •Deployment details
- •Recommendations
Integration with Agents
Used by: @ai-foundry, @mlops-pipeline