Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/ai/conceptual/data-ingestion.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The library provides several chunking strategies to fit different use cases:
These chunking strategies build on the Microsoft.ML.Tokenizers library to intelligently split text into appropriately sized pieces that work well with large language models. The right chunking strategy depends on your document types and how you plan to retrieve information.

```csharp
Tokenizer tokenizer = TiktokenTokenizer.CreateForModel("gpt-4");
Tokenizer tokenizer = TiktokenTokenizer.CreateForModel("gpt-5");
IngestionChunkerOptions options = new(tokenizer)
{
MaxTokensPerChunk = 2000,
Expand Down
5 changes: 2 additions & 3 deletions docs/ai/evaluation/evaluate-ai-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ In this quickstart, you create an MSTest app to evaluate the quality of a chat r

## Configure the AI service

To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. In the "Deploy a model" step, select the `gpt-4o` model.
To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. In the "Deploy a model" step, select the `gpt-5` model.

## Create the test app

Complete the following steps to create an MSTest project that connects to the `gpt-4o` AI model.
Complete the following steps to create an MSTest project that connects to an AI model.

1. In a terminal window, navigate to the directory where you want to create your app, and create a new MSTest app with the `dotnet new` command:

Expand All @@ -49,7 +49,6 @@ Complete the following steps to create an MSTest project that connects to the `g
```bash
dotnet user-secrets init
dotnet user-secrets set AZURE_OPENAI_ENDPOINT <your-Azure-OpenAI-endpoint>
dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4o
dotnet user-secrets set AZURE_TENANT_ID <your-tenant-ID>
```

Expand Down
3 changes: 1 addition & 2 deletions docs/ai/evaluation/evaluate-safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In this tutorial, you create an MSTest app to evaluate the *content safety* of a

## Configure the AI service

To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. In the "Deploy a model" step, select the `gpt-4o` model.
To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. In the "Deploy a model" step, select the `gpt-5` model.
Comment thread
gewarren marked this conversation as resolved.

> [!TIP]
> The previous configuration step is only required to fetch the response to be evaluated. To evaluate the safety of a response you already have in hand, you can skip this configuration.
Expand Down Expand Up @@ -56,7 +56,6 @@ Complete the following steps to create an MSTest project.
```bash
dotnet user-secrets init
dotnet user-secrets set AZURE_OPENAI_ENDPOINT <your-Azure-OpenAI-endpoint>
dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4o
dotnet user-secrets set AZURE_TENANT_ID <your-tenant-ID>
dotnet user-secrets set AZURE_SUBSCRIPTION_ID <your-subscription-ID>
dotnet user-secrets set AZURE_RESOURCE_GROUP <your-resource-group>
Expand Down
5 changes: 2 additions & 3 deletions docs/ai/evaluation/evaluate-with-reporting.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ In this tutorial, you create an MSTest app to evaluate the chat response of an O

## Configure the AI service

To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. In the "Deploy a model" step, select the `gpt-4o` model.
To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. In the "Deploy a model" step, select the `gpt-5` model.

## Create the test app

Complete the following steps to create an MSTest project that connects to the `gpt-4o` AI model.
Complete the following steps to create an MSTest project that connects to an AI model.

1. In a terminal window, navigate to the directory where you want to create your app, and create a new MSTest app with the `dotnet new` command:

Expand All @@ -47,7 +47,6 @@ Complete the following steps to create an MSTest project that connects to the `g
```bash
dotnet user-secrets init
dotnet user-secrets set AZURE_OPENAI_ENDPOINT <your-Azure-OpenAI-endpoint>
dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4o
dotnet user-secrets set AZURE_TENANT_ID <your-tenant-ID>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ private static ChatConfiguration GetAzureOpenAIChatConfiguration()
IConfigurationRoot config = new ConfigurationBuilder().AddUserSecrets<MyTests>().Build();

string endpoint = config["AZURE_OPENAI_ENDPOINT"];
string model = config["AZURE_OPENAI_GPT_NAME"];
string tenantId = config["AZURE_TENANT_ID"];
string model = "gpt-5";

// Get a chat client for the Azure OpenAI endpoint.
Comment thread
gewarren marked this conversation as resolved.
AzureOpenAIClient azureClient =
Expand Down
2 changes: 1 addition & 1 deletion docs/ai/evaluation/snippets/evaluate-safety/MyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ private static IChatClient GetAzureOpenAIChatClient()
.Build();

string endpoint = config["AZURE_OPENAI_ENDPOINT"];
string model = config["AZURE_OPENAI_GPT_NAME"];
string tenantId = config["AZURE_TENANT_ID"];
string model = "gpt-5";

// Get an instance of Microsoft.Extensions.AI's <see cref="IChatClient"/>
Comment thread
gewarren marked this conversation as resolved.
// interface for the selected LLM endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ private static ChatConfiguration GetAzureOpenAIChatConfiguration()
IConfigurationRoot config = new ConfigurationBuilder().AddUserSecrets<MyTests>().Build();

string endpoint = config["AZURE_OPENAI_ENDPOINT"];
string model = config["AZURE_OPENAI_GPT_NAME"];
string tenantId = config["AZURE_TENANT_ID"];
string model = "gpt-5";

// Get an instance of Microsoft.Extensions.AI's <see cref="IChatClient"/>
Comment thread
gewarren marked this conversation as resolved.
// interface for the selected LLM endpoint.
Expand Down
2 changes: 1 addition & 1 deletion docs/ai/how-to/snippets/access-data/ArgumentsExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static async Task UseFICC()

string endpoint = config["AZURE_OPENAI_ENDPOINT"];
string apiKey = config["AZURE_OPENAI_API_KEY"];
string model = config["AZURE_OPENAI_GPT_NAME"];
string model = "gpt-5";

// <SnippetUseAdditionalProperties>
FunctionInvokingChatClient client = new FunctionInvokingChatClient(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static async Task Main()
string? key = config["OpenAIKey"];

// <BasicInvoker>
IChatClient chatClient = new OpenAIClient(key).GetChatClient(model ?? "gpt-4o").AsIChatClient();
IChatClient chatClient = new OpenAIClient(key).GetChatClient(model ?? "gpt-5").AsIChatClient();

var functionInvokingClient = new FunctionInvokingChatClient(chatClient)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static async Task Main()
string? key = config["OpenAIKey"];

IChatClient client = new ChatClientBuilder(
new OpenAIClient(key).GetChatClient(model ?? "gpt-4o").AsIChatClient())
new OpenAIClient(key).GetChatClient(model ?? "gpt-5").AsIChatClient())
.UseFunctionInvocation()
.Build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ static async Task Main()
string? model = config["ModelName"];
string? key = config["OpenAIKey"];

// Ensure your model configuration uses a compatible version (e.g., gpt-4o-2024-08-06 or later).
// Ensure your model configuration uses a compatible version.
IChatClient client = new ChatClientBuilder(
new OpenAIClient(key).GetChatClient(model ?? "gpt-4o").AsIChatClient())
new OpenAIClient(key).GetChatClient(model ?? "gpt-5").AsIChatClient())
.UseFunctionInvocation()
.Build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public static void Run()
private static void BasicUsage()
{
// <TiktokenBasic>
// Initialize the tokenizer for the gpt-4o model.
Tokenizer tokenizer = TiktokenTokenizer.CreateForModel("gpt-4o");
// Initialize the tokenizer for the gpt-5 model.
Tokenizer tokenizer = TiktokenTokenizer.CreateForModel("gpt-5");

string source = "Text tokenization is the process of splitting a string into a list of tokens.";

Expand All @@ -37,7 +37,7 @@ private static void BasicUsage()
private static void TrimText()
{
// <TiktokenTrim>
Tokenizer tokenizer = TiktokenTokenizer.CreateForModel("gpt-4o");
Tokenizer tokenizer = TiktokenTokenizer.CreateForModel("gpt-5");

string source = "Text tokenization is the process of splitting a string into a list of tokens.";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
string? key = config["OpenAIKey"];

IChatClient client =
new ChatClientBuilder(new OpenAIClient(key).GetChatClient(model ?? "gpt-4o").AsIChatClient())
new ChatClientBuilder(new OpenAIClient(key).GetChatClient(model ?? "gpt-5").AsIChatClient())
.UseFunctionInvocation()
.Build();
// </SnippetGetChatClient>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
.Build();

string endpoint = config["AZURE_OPENAI_ENDPOINT"];
string model = config["AZURE_OPENAI_GPT_NAME"];
string tenantId = config["AZURE_TENANT_ID"];
string model = "gpt-5";

Comment thread
gewarren marked this conversation as resolved.
// Get a chat client for the Azure OpenAI endpoint.
AzureOpenAIClient azureClient =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

string endpoint = config["AZURE_OPENAI_ENDPOINT"];
string apiKey = config["AZURE_OPENAI_API_KEY"];
string model = config["AZURE_OPENAI_GPT_NAME"];
string model = "gpt-image-1";

// Create the Azure OpenAI client and convert to IImageGenerator.
AzureOpenAIClient azureClient = new(
Expand Down
7 changes: 3 additions & 4 deletions docs/ai/quickstarts/structured-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ In this quickstart, you create a chat app that requests a response with *structu

## Configure the AI service

To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. In the "Deploy a model" step, select the `gpt-4o` model.
To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. In the "Deploy a model" step, select the `gpt-5` model.

## Create the chat app

Complete the following steps to create a console app that connects to the `gpt-4o` AI model.
Complete the following steps to create a console app that connects to the `gpt-5` AI model.
Comment thread
gewarren marked this conversation as resolved.

1. In a terminal window, navigate to the directory where you want to create your app, and create a new console app with the `dotnet new` command:

Expand All @@ -45,7 +45,6 @@ Complete the following steps to create a console app that connects to the `gpt-4
```bash
dotnet user-secrets init
dotnet user-secrets set AZURE_OPENAI_ENDPOINT <your-Azure-OpenAI-endpoint>
dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4o
dotnet user-secrets set AZURE_TENANT_ID <your-tenant-ID>
```

Expand Down Expand Up @@ -112,7 +111,7 @@ Complete the following steps to create a console app that connects to the `gpt-4

## Clean up resources

If you no longer need them, delete the Azure OpenAI resource and GPT-4 model deployment.
If you no longer need them, delete the Azure OpenAI resource and model deployment.

1. In the [Azure portal](https://aka.ms/azureportal), navigate to the Azure OpenAI resource.
1. Select the Azure OpenAI resource, and then select **Delete**.
Expand Down
1 change: 0 additions & 1 deletion docs/ai/quickstarts/text-to-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Complete the following steps to create a .NET console application that generates
```bash
dotnet user-secrets init
dotnet user-secrets set AZURE_OPENAI_ENDPOINT <your-Azure-OpenAI-endpoint>
dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-image-1
dotnet user-secrets set AZURE_OPENAI_API_KEY <your-azure-openai-api-key>
```

Expand Down
Loading