This sample shows how to use the Azure OpenAI Service .NET SDK to generate embeddings and classify GitHub issues from the .NET Runtime repo by area label.
- .NET 7 SDK
- Azure Subscription
- Azure OpenAI Service
- Open AI Model Deployed (text-similarity-curie-001).
-
Set the following environment variables using information from your Azure Open AI service resource:
- OPENAI_ENDPOINT - Azure OpenAI service endpoint.
- OPENAI_KEY - Azure OpenAI service access key.
- OPENAI_DEPLOYMENT - The name of the model deployment.
-
Build the project
dotnet build -
Run the project
dotnet run
If successful, you should see output similar to the following:
Title: Refine the memory pressure expiration algorithm | Actual Area: area-Extensions-Caching | Predicted Area: area-Extensions-Caching
Title: Quaternion operator overloads should be using the respective methods | Actual Area: area-System.Numerics | Predicted Area: area-System.Runtime.InteropServices