Compétences Azure.AI.OpenAI (.NET)
📦

Azure.AI.OpenAI (.NET)

Sûr

Build AI apps with Azure OpenAI and .NET

Developers struggle to integrate Azure OpenAI into .NET applications efficiently. This skill provides complete code examples for chat, embeddings, DALL-E, Whisper, and advanced features like RAG and function calling.

Prend en charge: Claude Codex Code(CC)
🥉 73 Bronze
1

Télécharger le ZIP du skill

2

Importer dans Claude

Allez dans Paramètres → Capacités → Skills → Importer un skill

3

Activez et commencez Ă  utiliser

Tester

Utilisation de "Azure.AI.OpenAI (.NET)". User asks for a basic chat client setup

Résultat attendu:

CompleteAsync pattern with AzureOpenAIClient, DefaultAzureCredential, and GetChatClient for gpt-4o-mini deployment with streaming and non-streaming options

Utilisation de "Azure.AI.OpenAI (.NET)". User needs embeddings for document similarity

Résultat attendu:

EmbeddingClient setup with GenerateEmbeddingAsync for single text or batch processing, returning float vectors ready for cosine similarity calculations

Utilisation de "Azure.AI.OpenAI (.NET)". User wants audio transcription from uploaded file

Résultat attendu:

AudioClient with TranscribeAudioAsync, supporting MP3/WAV formats with language detection and verbose output including segment timestamps

Audit de sécurité

Sûr
v1 • 2/24/2026

This is a documentation-only skill with no executable code. Static analysis scanned 0 files with 0 risk factors detected. The SKILL.md contains code examples demonstrating legitimate Azure OpenAI SDK usage patterns including authentication, chat completions, embeddings, image generation, and audio transcription. No malicious patterns or security concerns identified.

0
Fichiers analysés
0
Lignes analysées
0
résultats
1
Total des audits
Aucun problème de sécurité trouvé
Audité par: claude

Score de qualité

38
Architecture
100
Maintenabilité
87
Contenu
50
Communauté
100
Sécurité
83
Conformité aux spécifications

Ce que vous pouvez construire

Enterprise Chat Application

Build secure chat applications using Azure OpenAI with Entra ID authentication for production deployments with proper credential management.

Document Search with RAG

Create Retrieval Augmented Generation solutions combining Azure AI Search with Azure OpenAI for enterprise document Q&A systems.

Multimedia AI Processing

Process audio files with Whisper transcription and generate images with DALL-E for content creation and accessibility features.

Essayez ces prompts

Basic Chat Setup
Create a basic chat application using Azure.AI.OpenAI SDK. I have my AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_API_KEY configured. Use the gpt-4o-mini deployment.
Structured JSON Response
Show me how to use structured outputs with JSON schema in Azure OpenAI .NET SDK. I need the response to follow a specific format with validation for a math tutoring app.
RAG with Azure AI Search
I need to build a document Q&A system using Azure AI Search as a data source with Azure OpenAI. Show me how to configure the chat data source and handle citations.
Function Calling Implementation
Demonstrate function calling in Azure OpenAI .NET for a weather service. I need to define the function schema, handle tool calls, and execute the function with proper validation.

Bonnes pratiques

  • Use DefaultAzureCredential with Entra ID for production instead of API keys to avoid credential exposure
  • Reuse AzureOpenAIClient instances across requests rather than creating new clients for each operation
  • Implement exponential backoff retry policies for handling 429 rate limit responses from the API

Éviter

  • Hardcoding API keys or endpoints directly in source code instead of using environment variables or Azure Key Vault
  • Creating new client instances inside request handlers causing connection pool exhaustion and performance degradation
  • Not validating function tool call arguments before executing external code which could lead to injection vulnerabilities

Foire aux questions

How do I authenticate with Azure OpenAI in production?
Use DefaultAzureCredential for Entra ID authentication instead of API keys. This enables managed identities in Azure and provides better security posture with automatic token refresh.
What is the difference between Azure.AI.OpenAI and OpenAI packages?
Azure.AI.OpenAI is the official Azure SDK with Azure-specific features like Entra ID auth and Azure AI Search integration. The OpenAI package works with Azure endpoints using BearerTokenPolicy but lacks Azure-specific integrations.
How do I handle streaming responses in .NET?
Use CompleteChatStreamingAsync and iterate with await foreach over StreamingChatCompletionUpdate. Check ContentUpdate for text chunks and accumulate for complete response.
Can I use reasoning models like o1 with this SDK?
Yes. Use ChatCompletionOptions with ReasoningEffortLevel property set to Low, Medium, or High. Note that reasoning models use DeveloperChatMessage instead of SystemChatMessage.
How do I implement retry logic for rate limits?
Catch RequestFailedException with Status 429 and implement exponential backoff. Read the Retry-After header from the exception response for accurate retry timing.
What deployment name should I use for chat completions?
Use the deployment name you created in your Azure OpenAI resource, not the model name. For example, deploy GPT-4o-mini and reference it as GetChatClient("your-deployment-name").

Détails du développeur

Structure de fichiers

đź“„ SKILL.md