From 0d9a01a1c2e781327a6eb97377fa142506507e34 Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 14:23:49 -0700 Subject: [PATCH 01/14] Initial Pivot test --- .../quickstart-openai-summarize-text.md | 63 +++++++++++++++++++ docs/zone-pivot-groups.yml | 8 +++ 2 files changed, 71 insertions(+) diff --git a/docs/ai/quickstarts/quickstart-openai-summarize-text.md b/docs/ai/quickstarts/quickstart-openai-summarize-text.md index 1a418510964b6..7d2d74c111a22 100644 --- a/docs/ai/quickstarts/quickstart-openai-summarize-text.md +++ b/docs/ai/quickstarts/quickstart-openai-summarize-text.md @@ -6,6 +6,7 @@ ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai author: fboucher ms.author: frbouche +zone_pivot_groups: openai-library # CustomerIntent: As a .NET developer new to Azure OpenAI, I want deploy and use sample code to interact to learn from the sample code to summarize text. --- @@ -26,6 +27,66 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c If you get an error message the Azure OpenAI resources may not have finished deploying. Wait a couple of minutes and try again. + +:::zone target="docs" pivot="semantic-kernel" + + +## Understanding the code + +Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. + +The `OpenAIClient` class facilitates the requests and responses. `ChatCompletionOptions` specifies parameters of how the model will respond. + +```csharp +Kernel kernel = Kernel.CreateBuilder() + .AddAzureOpenAIChatCompletion(deployment, endpoint, key) + .Build(); +``` + +The entire application is contained within the **Program.cs** file. The first several lines of code loads up secrets and configuration values that were set in the `dotnet user-secrets` for you during the application provisioning. + +```csharp +// == Retrieve the local secrets saved during the Azure deployment ========== +var config = new ConfigurationBuilder() + .AddUserSecrets() + .Build(); +string endpoint = config["AZURE_OPENAI_ENDPOINT"]; +string deployment = config["AZURE_OPENAI_GPT_NAME"]; +string key = config["AZURE_OPENAI_KEY"]; + +// Create a Kernel containing the Azure OpenAI Chat Completion Service +Kernel kernel = Kernel.CreateBuilder() + .AddAzureOpenAIChatCompletion(deployment, endpoint, key) + .Build(); +``` + +Once the `OpenAIClient` client is created, we read the content of the file `benefits.md`. Then using the `ChatRequestUserMessage` class we can add to the model the request to summarize that text. + +```csharp +// Create and print out the prompt +string prompt = $""" + Please summarize the the following text in 20 words or less: + {File.ReadAllText("benefits.md")} + """; +Console.WriteLine($"user >>> {prompt}"); +``` + +To have the model generate a response based off the user request, use the `GetChatCompletionsAsync` function. + +```csharp +// Submit the prompt and print out the response +string response = await kernel.InvokePromptAsync(prompt, new(new OpenAIPromptExecutionSettings() { MaxTokens = 400 })); +Console.WriteLine($"assistant >>> {response}"); +``` + +Customize the text content of the file or the length of the summary to see the differences in the responses. + +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + ## Understanding the code Our application uses the `Azure.AI.OpenAI` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Azure.AI.OpenAI), to send and receive requests to an Azure OpenAI service deployed in Azure. @@ -84,6 +145,8 @@ Console.WriteLine($"\n\nAssistant >>> {assistantResponse.Content}"); Customize the text content of the file or the length of the summary to see the differences in the responses. +:::zone-end + ## Clean up resources When you no longer need the sample application or resources, remove the corresponding deployment and all resources. diff --git a/docs/zone-pivot-groups.yml b/docs/zone-pivot-groups.yml index 97592d6befae2..d86ac0984914b 100644 --- a/docs/zone-pivot-groups.yml +++ b/docs/zone-pivot-groups.yml @@ -112,3 +112,11 @@ groups: title: C# and Visual Basic - id: lang-fsharp title: F# +- id: openai-library + title: OpenAI Library + prompt: Choose a library for OpenAI + pivots: + - id: semantic-kernel + title: Semantic Kernel + - id: azure-openai-sdk + title: Azure OpenAI SDK From fce6db72a06217261cf28b9082549a9ec23f36eb Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 14:40:39 -0700 Subject: [PATCH 02/14] Update some text --- docs/ai/quickstarts/quickstart-openai-summarize-text.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ai/quickstarts/quickstart-openai-summarize-text.md b/docs/ai/quickstarts/quickstart-openai-summarize-text.md index 7d2d74c111a22..9b8132cd085fd 100644 --- a/docs/ai/quickstarts/quickstart-openai-summarize-text.md +++ b/docs/ai/quickstarts/quickstart-openai-summarize-text.md @@ -60,7 +60,7 @@ Kernel kernel = Kernel.CreateBuilder() .Build(); ``` -Once the `OpenAIClient` client is created, we read the content of the file `benefits.md`. Then using the `ChatRequestUserMessage` class we can add to the model the request to summarize that text. +Once the `Kernel` client is created, we read the contents of the file `benefits.md` and create a `prompt` to ask the the model to summarize that text. ```csharp // Create and print out the prompt @@ -71,7 +71,7 @@ string prompt = $""" Console.WriteLine($"user >>> {prompt}"); ``` -To have the model generate a response based off the user request, use the `GetChatCompletionsAsync` function. +To have the model generate a response based off `prompt`, use the `InvokePromptAsync` function. ```csharp // Submit the prompt and print out the response From dfc1c6bbf103930d114fd9411b05599cb028b551 Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 14:41:18 -0700 Subject: [PATCH 03/14] Add zone pivot to all quick starts --- docs/ai/quickstarts/get-started-azure-openai.md | 1 + docs/ai/quickstarts/quickstart-ai-chat-with-data.md | 1 + docs/ai/quickstarts/quickstart-azure-openai-tool.md | 1 + docs/ai/quickstarts/quickstart-openai-generate-images.md | 1 + 4 files changed, 4 insertions(+) diff --git a/docs/ai/quickstarts/get-started-azure-openai.md b/docs/ai/quickstarts/get-started-azure-openai.md index ac1d1f66f8764..7554229588a8e 100644 --- a/docs/ai/quickstarts/get-started-azure-openai.md +++ b/docs/ai/quickstarts/get-started-azure-openai.md @@ -6,6 +6,7 @@ ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai author: fboucher ms.author: frbouche +zone_pivot_groups: openai-library # CustomerIntent: As a .NET developer new to Azure OpenAI, I want deploy and use sample code to interact to learn from the sample code. --- diff --git a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md index 0ef1f17f54525..e96a749087dd1 100644 --- a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md +++ b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md @@ -6,6 +6,7 @@ ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai author: fboucher ms.author: frbouche +zone_pivot_groups: openai-library # CustomerIntent: As a .NET developer new to Azure OpenAI, I want deploy and use sample code and data to interact to learn from the sample code. --- diff --git a/docs/ai/quickstarts/quickstart-azure-openai-tool.md b/docs/ai/quickstarts/quickstart-azure-openai-tool.md index f855c873ad852..183a6519b843c 100644 --- a/docs/ai/quickstarts/quickstart-azure-openai-tool.md +++ b/docs/ai/quickstarts/quickstart-azure-openai-tool.md @@ -6,6 +6,7 @@ ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai author: fboucher ms.author: frbouche +zone_pivot_groups: openai-library # CustomerIntent: As a .NET developer new to Azure OpenAI, I want deploy and use sample code to interact to learn from the sample code how to extend the model using Tools. --- diff --git a/docs/ai/quickstarts/quickstart-openai-generate-images.md b/docs/ai/quickstarts/quickstart-openai-generate-images.md index fe690431d4d06..04ebeb1f634c6 100644 --- a/docs/ai/quickstarts/quickstart-openai-generate-images.md +++ b/docs/ai/quickstarts/quickstart-openai-generate-images.md @@ -6,6 +6,7 @@ ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai author: fboucher ms.author: frbouche +zone_pivot_groups: openai-library # CustomerIntent: As a .NET developer new to Azure OpenAI, I want deploy and use sample code to interact to learn how to generate images from the sample code. --- From bce22a5874e891e9bd952b18f648023cf69fa616 Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 14:56:05 -0700 Subject: [PATCH 04/14] Initial check-in of 2nd doc --- .../quickstarts/get-started-azure-openai.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/docs/ai/quickstarts/get-started-azure-openai.md b/docs/ai/quickstarts/get-started-azure-openai.md index 7554229588a8e..ec2fb249ee69c 100644 --- a/docs/ai/quickstarts/get-started-azure-openai.md +++ b/docs/ai/quickstarts/get-started-azure-openai.md @@ -27,6 +27,84 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c If you get an error message the Azure OpenAI resources may not have finished deploying. Wait a couple of minutes and try again. + +:::zone target="docs" pivot="semantic-kernel" + + +## Understanding the code + +Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. + +The `AzureOpenAIChatCompletionService` service facilitates the requests and responses. + +```csharp +// == Create the Azure OpenAI Chat Completion Service ========== +AzureOpenAIChatCompletionService service = new(deployment, endpoint, key); +``` + +The entire application is contained within the **Program.cs** file. The first several lines of code loads up secrets and configuration values that were set in the `dotnet user-secrets` for you during the application provisioning. + +```csharp +// == Retrieve the local secrets saved during the Azure deployment ========== +var config = new ConfigurationBuilder().AddUserSecrets().Build(); +string endpoint = config["AZURE_OPENAI_ENDPOINT"]; +string deployment = config["AZURE_OPENAI_GPT_NAME"]; +string key = config["AZURE_OPENAI_KEY"]; +``` + +Once the `AzureOpenAIChatCompletionService` service is created, we provide more context to the model by adding a system prompt. This instructs the model how you'd like it to act during the conversation. + +```csharp +// Start the conversation with context for the AI model +ChatHistory chatHistory = new(""" + You are a hiking enthusiast who helps people discover fun hikes in their area. You are upbeat and friendly. + You introduce yourself when first saying hello. When helping people out, you always ask them + for this information to inform the hiking recommendation you provide: + + 1. Where they are located + 2. What hiking intensity they are looking for + + You will then provide three suggestions for nearby hikes that vary in length after you get that information. + You will also share an interesting fact about the local nature on the hikes when making a recommendation. + """); +``` + +Then you can add a user message to the model by using the `ChatRequestUserMessage` class. + +To have the model generate a response based off the system prompt and the user request, use the `GetChatMessageContentAsync` function. + +```csharp + +// Add user message to chat history +chatHistory.AddUserMessage("Hi! Apparently you can help me find a hike that I will like?"); + +// Print User Message to console +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); + +// Get response +var response = await service.GetChatMessageContentAsync(chatHistory, new OpenAIPromptExecutionSettings() { MaxTokens = 400 }); +``` + +To maintain the chat history or context, make sure you add the response from the model as a `ChatRequestAssistantMessage`. + +```csharp +// Add response to chat history +chatHistory.Add(response); + +// Print Response to console +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); +``` + +Customize the system prompt and user message to see how the model responds to help you find a hike that you'll like. + + + +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + ## Understanding the code Our application uses the `Azure.AI.OpenAI` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Azure.AI.OpenAI), to send and receive requests to an Azure OpenAI service deployed in Azure. @@ -103,6 +181,8 @@ To maintain the chat history or context, make sure you add the response from the Customize the system prompt and user message to see how the model responds to help you find a hike that you'll like. +:::zone-end + ## Clean up resources When you no longer need the sample application or resources, remove the corresponding deployment and all resources. From d98d3a62d5b18df93c69dcf6718084e1fa51d23e Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 14:58:56 -0700 Subject: [PATCH 05/14] Fix white space --- docs/ai/quickstarts/get-started-azure-openai.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/ai/quickstarts/get-started-azure-openai.md b/docs/ai/quickstarts/get-started-azure-openai.md index ec2fb249ee69c..050171c2ac0ec 100644 --- a/docs/ai/quickstarts/get-started-azure-openai.md +++ b/docs/ai/quickstarts/get-started-azure-openai.md @@ -97,8 +97,6 @@ Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}") Customize the system prompt and user message to see how the model responds to help you find a hike that you'll like. - - :::zone-end From 177f0a11f2a14c0c23cb3b98a357503c4aaef77a Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 16:12:02 -0700 Subject: [PATCH 06/14] Initial check-in of 3rd sample with pivot --- .../quickstart-ai-chat-with-data.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md index e96a749087dd1..cea53708ceca6 100644 --- a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md +++ b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md @@ -27,6 +27,76 @@ Get started with the .NET Azure OpenAI with a `gpt-35-turbo` model, from a simpl If you get an error message the Azure OpenAI resources may not have finished deploying. Wait a couple of minutes and try again. + +:::zone target="docs" pivot="semantic-kernel" + + +## Explore the code + +Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. + +The `AzureOpenAIChatCompletionService` service facilitates the requests and responses. + +```csharp +// == Create the Azure OpenAI Chat Completion Service ========== +AzureOpenAIChatCompletionService service = new(deployment, endpoint, key); +``` + +The entire application is contained within the **Program.cs** file. The first several lines of code loads up secrets and configuration values that were set in the `dotnet user-secrets` for you during the application provisioning. + +```csharp +// == Retrieve the local secrets saved during the Azure deployment ========== +var config = new ConfigurationBuilder().AddUserSecrets().Build(); +string endpoint = config["AZURE_OPENAI_ENDPOINT"]; +string deployment = config["AZURE_OPENAI_GPT_NAME"]; +string key = config["AZURE_OPENAI_KEY"]; +``` + +Once the `AzureOpenAIChatCompletionService` client is created, we read the content of the file `hikes.md` and use it to provide more context to the model by adding a system prompt. This instructs the model how you'd like it to act during the conversation. + +```csharp +// Provide context for the AI model +ChatHistory chatHistory = new($""" + You are upbeat and friendly. You introduce yourself when first saying hello. + Provide a short answer only based on the user hiking records below: + + {File.ReadAllText("hikes.md")} + """); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); +``` + +Then you can add a user message to the model by using the `AddUserMessage` function. + +To have the model generate a response based off the system prompt and the user request, use the `GetChatMessageContentAsync` function. + +```csharp +// Start the conversation +chatHistory.AddUserMessage("Hi!"); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); + +chatHistory.Add(await service.GetChatMessageContentAsync(chatHistory, new OpenAIPromptExecutionSettings() { MaxTokens = 400 })); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); +``` + +To maintain the chat history or context, make sure you add the response from the model to the `chatHistory`. It's time to make our user request about our data again using the `AddUserMessage` and `GetChatMessageContentAsync` function. + +```csharp +// Continue the conversation with a question. +chatHistory.AddUserMessage("I would like to know the ratio of the hikes I've done in Canada compared to other countries."); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); + +chatHistory.Add(await service.GetChatMessageContentAsync(chatHistory, new OpenAIPromptExecutionSettings() { MaxTokens = 400 })); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); +``` + +Customize the system prompt and change the request, asking for different questions (ex: How many times did you hiked when it was raining? How many times did you hiked in 2021? etc.) to see how the model responds. + +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + ## Explore the code Our application uses the `Azure.AI.OpenAI` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Azure.AI.OpenAI), to send and receive requests to an Azure OpenAI service deployed in Azure. @@ -110,6 +180,8 @@ response = await openAIClient.GetChatCompletionsAsync(completionOptions); Customize the system prompt and change the request, asking for different questions (ex: How many times did you hiked when it was raining? How many times did you hiked in 2021? etc.) to see how the model responds. +:::zone-end + ## Clean up resources When you no longer need the sample application or resources, remove the corresponding deployment and all resources. From 9195109777cfa4371d5c905bed482208151110cd Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 16:34:59 -0700 Subject: [PATCH 07/14] Initial pivot check-in for 04 sample --- .../quickstart-azure-openai-tool.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/docs/ai/quickstarts/quickstart-azure-openai-tool.md b/docs/ai/quickstarts/quickstart-azure-openai-tool.md index 183a6519b843c..4c1e7a25f0713 100644 --- a/docs/ai/quickstarts/quickstart-azure-openai-tool.md +++ b/docs/ai/quickstarts/quickstart-azure-openai-tool.md @@ -27,6 +27,93 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c If you get an error message the Azure OpenAI resources may not have finished deploying. Wait a couple of minutes and try again. + +:::zone target="docs" pivot="semantic-kernel" + + +## Understand the code + +Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. + + +```csharp +// Add a new plugin with a local .NET function that should be available to the AI model +// For convenience and clarity of into the code, this standalone local method handles tool call responses. It will fake a call to a weather API and return the current weather for the specified location. +kernel.ImportPluginFromFunctions("WeatherPlugin", +[ + KernelFunctionFactory.CreateFromMethod(([Description("The city, e.g. Montreal, Sidney")] string location, string unit = null) => + { + // Here you would call a weather API to get the weather for the location + return "Periods of rain or drizzle, 15 C"; + }, "get_current_weather", "Get the current weather in a given location") +]); +``` + +The `OpenAIClient` class facilitates the requests and responses. `ChatCompletionOptions` specifies parameters of how the model will respond. Note how the **Tools** property is used to add the definition. + +```csharp +// Create a Kernel containing the Azure OpenAI Chat Completion Service +IKernelBuilder b = Kernel.CreateBuilder(); + +Kernel kernel = b + .AddAzureOpenAIChatCompletion(deployment, endpoint, key) + .Build(); +``` + +The entire application is contained within the **Program.cs** file. The first several lines of code loads up secrets and configuration values that were set in the `dotnet user-secrets` for you during the application provisioning. + +```csharp +var config = new ConfigurationBuilder().AddUserSecrets().Build(); +string endpoint = config["AZURE_OPENAI_ENDPOINT"]; +string deployment = config["AZURE_OPENAI_GPT_NAME"]; +string key = config["AZURE_OPENAI_KEY"]; +``` + +Once the `kernel` client is created, we provide more context to the model by adding a system prompt. This instructs the model how you'd like it to act during the conversation. Note how the weather is emphasized in the system prompt. + +```csharp +ChatHistory chatHistory = new(""" + You are a hiking enthusiast who helps people discover fun hikes in their area. You are upbeat and friendly. + A good weather is important for a good hike. Only make recommendations if the weather is good or if people insist. + You introduce yourself when first saying hello. When helping people out, you always ask them + for this information to inform the hiking recommendation you provide: + + 1. Where they are located + 2. What hiking intensity they are looking for + + You will then provide three suggestions for nearby hikes that vary in length after you get that information. + You will also share an interesting fact about the local nature on the hikes when making a recommendation. + """); +``` + +Then you can add a user message to the model by using the `ChatRequestUserMessage` class. + + +To have the model generate a response based off the system prompt and the user request, use the `GetChatCompletionsAsync` function. + +```csharp +chatHistory.AddUserMessage(""" + Is the weather is good today for a hike? + If yes, I live in the greater Montreal area and would like an easy hike. I don't mind driving a bit to get there. + I don't want the hike to be over 10 miles round trip. I'd consider a point-to-point hike. + I want the hike to be as isolated as possible. I don't want to see many people. + I would like it to be as bug free as possible. + """); + +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); + +chatHistory.Add(await service.GetChatMessageContentAsync(chatHistory, new OpenAIPromptExecutionSettings() { MaxTokens = 400 })); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); +``` + +Customize the system prompt and user message to see how the model responds to help you find a hike that you'll like. + +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + ## Understand the code Our application uses the `Azure.AI.OpenAI` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Azure.AI.OpenAI), to send and receive requests to an Azure OpenAI service deployed in Azure. @@ -180,6 +267,8 @@ Console.WriteLine($"\n\nAssistant >>> {assistantResponse.Content}"); Customize the system prompt and user message to see how the model responds to help you find a hike that you'll like. +:::zone-end + ## Clean up resources When you no longer need the sample application or resources, remove the corresponding deployment and all resources. From 71f465281ee249e3863f389b4f581a0645bd0b27 Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 16:37:25 -0700 Subject: [PATCH 08/14] Fix white space --- docs/ai/quickstarts/quickstart-azure-openai-tool.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/ai/quickstarts/quickstart-azure-openai-tool.md b/docs/ai/quickstarts/quickstart-azure-openai-tool.md index 4c1e7a25f0713..5d63393d67bcb 100644 --- a/docs/ai/quickstarts/quickstart-azure-openai-tool.md +++ b/docs/ai/quickstarts/quickstart-azure-openai-tool.md @@ -35,7 +35,6 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. - ```csharp // Add a new plugin with a local .NET function that should be available to the AI model // For convenience and clarity of into the code, this standalone local method handles tool call responses. It will fake a call to a weather API and return the current weather for the specified location. @@ -88,7 +87,6 @@ ChatHistory chatHistory = new(""" Then you can add a user message to the model by using the `ChatRequestUserMessage` class. - To have the model generate a response based off the system prompt and the user request, use the `GetChatCompletionsAsync` function. ```csharp From 7adfd77d52a9bf8d00f1f8222c417533c1ca9c35 Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 16:55:11 -0700 Subject: [PATCH 09/14] Initial check-in of image gen sample --- .../quickstart-openai-generate-images.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/docs/ai/quickstarts/quickstart-openai-generate-images.md b/docs/ai/quickstarts/quickstart-openai-generate-images.md index 04ebeb1f634c6..a477c7b289713 100644 --- a/docs/ai/quickstarts/quickstart-openai-generate-images.md +++ b/docs/ai/quickstarts/quickstart-openai-generate-images.md @@ -27,6 +27,54 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c If you get an error message the Azure OpenAI resources may not have finished deploying. Wait a couple of minutes and try again. + +:::zone target="docs" pivot="semantic-kernel" + + +## Understanding the code + +Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. + +The `AzureOpenAITextToImageService` service facilitates the requests and responses. + +```csharp +AzureOpenAITextToImageService textToImageService = new(deployment, endpoint, key, null); +``` + +The entire application is contained within the _Program.cs_ file. The first several lines of code load secrets and configuration values that were set in the `dotnet user-secrets` for you during the application provisioning. + +```csharp +// == Retrieve the local secrets saved during the Azure deployment ========== +var config = new ConfigurationBuilder() + .AddUserSecrets() + .Build(); + +var config = new ConfigurationBuilder().AddUserSecrets().Build(); +string endpoint = config["AZURE_OPENAI_ENDPOINT"]; +string deployment = config["AZURE_OPENAI_GPT_NAME"]; +string key = config["AZURE_OPENAI_KEY"]; +``` + +Once the `textToImageService` client is created, we we provide more context to the model by adding a system prompt. A good prompt to generate images requires a clear description: what is in the images, specific color to use, style (drawing, painting, realistic or cartoony). The model will use this prompt to generate the image. To have the model generate a response based off the user request, use the `GenerateImageAsync` function, and specify the size and quality. + +```csharp +// Generate the image +string imageUrl = await textToImageService.GenerateImageAsync(""" + A postal card with an happy hiker waving and a beautiful mountain in the background. + There is a trail visible in the foreground. + The postal card has text in red saying: 'You are invited for a hike!' + """, 1024, 1024); +Console.WriteLine($"The generated image is ready at:\n{imageUrl}"); +``` + +Customize the prompt to personalize the images generated by the model. + +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + ## Understanding the code Our application uses the `Azure.AI.OpenAI` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Azure.AI.OpenAI), to send and receive requests to an Azure OpenAI service deployed in Azure. @@ -96,6 +144,8 @@ Console.WriteLine($"\n\nThe generated image is ready at:\n {generatedImage.Url.A Customize the prompt to personalize the images generated by the model. +:::zone-end + ## Clean up resources When you no longer need the sample application or resources, remove the corresponding deployment and all resources. From 55c28aab59cc3770b7e2276889880ea9afba38c0 Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 17:00:58 -0700 Subject: [PATCH 10/14] fix white space --- docs/ai/quickstarts/quickstart-openai-generate-images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ai/quickstarts/quickstart-openai-generate-images.md b/docs/ai/quickstarts/quickstart-openai-generate-images.md index a477c7b289713..3fe982b82de18 100644 --- a/docs/ai/quickstarts/quickstart-openai-generate-images.md +++ b/docs/ai/quickstarts/quickstart-openai-generate-images.md @@ -35,7 +35,7 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. -The `AzureOpenAITextToImageService` service facilitates the requests and responses. +The `AzureOpenAITextToImageService` service facilitates the requests and responses. ```csharp AzureOpenAITextToImageService textToImageService = new(deployment, endpoint, key, null); From 20b4af6effdaaa0f921a44e9b1e94dc822982263 Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 18:19:29 -0700 Subject: [PATCH 11/14] Clean up 01 sk doc --- docs/ai/quickstarts/get-started-azure-openai.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ai/quickstarts/get-started-azure-openai.md b/docs/ai/quickstarts/get-started-azure-openai.md index 050171c2ac0ec..2600d264dcf74 100644 --- a/docs/ai/quickstarts/get-started-azure-openai.md +++ b/docs/ai/quickstarts/get-started-azure-openai.md @@ -33,7 +33,7 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c ## Understanding the code -Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. +Our application uses the `Microsoft.SemanticKernel` package, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. The `AzureOpenAIChatCompletionService` service facilitates the requests and responses. @@ -69,7 +69,7 @@ ChatHistory chatHistory = new(""" """); ``` -Then you can add a user message to the model by using the `ChatRequestUserMessage` class. +Then you can add a user message to the model by using the `AddUserMessage` function. To have the model generate a response based off the system prompt and the user request, use the `GetChatMessageContentAsync` function. @@ -85,7 +85,7 @@ Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}") var response = await service.GetChatMessageContentAsync(chatHistory, new OpenAIPromptExecutionSettings() { MaxTokens = 400 }); ``` -To maintain the chat history or context, make sure you add the response from the model as a `ChatRequestAssistantMessage`. +To maintain the chat history, make sure you add the response from the model. ```csharp // Add response to chat history From b658bd3e4edcf8150e3897bb442e6ca5239d68bd Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 18:30:02 -0700 Subject: [PATCH 12/14] Update for consistency across samples --- docs/ai/quickstarts/quickstart-ai-chat-with-data.md | 2 +- docs/ai/quickstarts/quickstart-azure-openai-tool.md | 8 ++++---- docs/ai/quickstarts/quickstart-openai-generate-images.md | 4 ++-- docs/ai/quickstarts/quickstart-openai-summarize-text.md | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md index cea53708ceca6..5a5113253d6a0 100644 --- a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md +++ b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md @@ -33,7 +33,7 @@ Get started with the .NET Azure OpenAI with a `gpt-35-turbo` model, from a simpl ## Explore the code -Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. +Our application uses the `Microsoft.SemanticKernel` package, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. The `AzureOpenAIChatCompletionService` service facilitates the requests and responses. diff --git a/docs/ai/quickstarts/quickstart-azure-openai-tool.md b/docs/ai/quickstarts/quickstart-azure-openai-tool.md index 5d63393d67bcb..6ee6f76b21ecb 100644 --- a/docs/ai/quickstarts/quickstart-azure-openai-tool.md +++ b/docs/ai/quickstarts/quickstart-azure-openai-tool.md @@ -33,7 +33,7 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c ## Understand the code -Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. +Our application uses the `Microsoft.SemanticKernel` package, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. ```csharp // Add a new plugin with a local .NET function that should be available to the AI model @@ -48,7 +48,7 @@ kernel.ImportPluginFromFunctions("WeatherPlugin", ]); ``` -The `OpenAIClient` class facilitates the requests and responses. `ChatCompletionOptions` specifies parameters of how the model will respond. Note how the **Tools** property is used to add the definition. +The `Kernel` class facilitates the requests and responses with the help of `AddAzureOpenAIChatCompletion` service. ```csharp // Create a Kernel containing the Azure OpenAI Chat Completion Service @@ -85,9 +85,9 @@ ChatHistory chatHistory = new(""" """); ``` -Then you can add a user message to the model by using the `ChatRequestUserMessage` class. +Then you can add a user message to the model by using the `AddUserMessage` functon. -To have the model generate a response based off the system prompt and the user request, use the `GetChatCompletionsAsync` function. +To have the model generate a response based off the system prompt and the user request, use the `GetChatMessageContentAsync` function. ```csharp chatHistory.AddUserMessage(""" diff --git a/docs/ai/quickstarts/quickstart-openai-generate-images.md b/docs/ai/quickstarts/quickstart-openai-generate-images.md index 3fe982b82de18..3daa4d69e2739 100644 --- a/docs/ai/quickstarts/quickstart-openai-generate-images.md +++ b/docs/ai/quickstarts/quickstart-openai-generate-images.md @@ -33,7 +33,7 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c ## Understanding the code -Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. +Our application uses the `Microsoft.SemanticKernel` package, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. The `AzureOpenAITextToImageService` service facilitates the requests and responses. @@ -55,7 +55,7 @@ string deployment = config["AZURE_OPENAI_GPT_NAME"]; string key = config["AZURE_OPENAI_KEY"]; ``` -Once the `textToImageService` client is created, we we provide more context to the model by adding a system prompt. A good prompt to generate images requires a clear description: what is in the images, specific color to use, style (drawing, painting, realistic or cartoony). The model will use this prompt to generate the image. To have the model generate a response based off the user request, use the `GenerateImageAsync` function, and specify the size and quality. +Once the `textToImageService` service is created, we we provide more context to the model by adding a system prompt. A good prompt to generate images requires a clear description: what is in the images, specific color to use, style (drawing, painting, realistic or cartoony). The model will use this prompt to generate the image. To have the model generate a response based off the user request, use the `GenerateImageAsync` function, and specify the size and quality. ```csharp // Generate the image diff --git a/docs/ai/quickstarts/quickstart-openai-summarize-text.md b/docs/ai/quickstarts/quickstart-openai-summarize-text.md index 9b8132cd085fd..181be7820ff77 100644 --- a/docs/ai/quickstarts/quickstart-openai-summarize-text.md +++ b/docs/ai/quickstarts/quickstart-openai-summarize-text.md @@ -33,9 +33,9 @@ Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console c ## Understanding the code -Our application uses the `Microsoft.SemanticKernel` client SDK, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. +Our application uses the `Microsoft.SemanticKernel` package, which is available on [NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel), to send and receive requests to an Azure OpenAI service deployed in Azure. -The `OpenAIClient` class facilitates the requests and responses. `ChatCompletionOptions` specifies parameters of how the model will respond. +The `Kernel` class facilitates the requests and responses with the help of `AddAzureOpenAIChatCompletion` service. ```csharp Kernel kernel = Kernel.CreateBuilder() @@ -60,7 +60,7 @@ Kernel kernel = Kernel.CreateBuilder() .Build(); ``` -Once the `Kernel` client is created, we read the contents of the file `benefits.md` and create a `prompt` to ask the the model to summarize that text. +Once the `Kernel` is created, we read the contents of the file `benefits.md` and create a `prompt` to ask the the model to summarize that text. ```csharp // Create and print out the prompt From c021c572d2db8d905274b0ba5b7e90cf52d9f5c4 Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 18:49:50 -0700 Subject: [PATCH 13/14] Update descriptions for Semantic Kernel versions --- docs/ai/quickstarts/get-started-azure-openai.md | 14 ++++++++++++++ .../ai/quickstarts/quickstart-ai-chat-with-data.md | 13 +++++++++++++ .../ai/quickstarts/quickstart-azure-openai-tool.md | 14 ++++++++++++++ .../quickstart-openai-generate-images.md | 14 ++++++++++++++ .../quickstart-openai-summarize-text.md | 14 ++++++++++++++ 5 files changed, 69 insertions(+) diff --git a/docs/ai/quickstarts/get-started-azure-openai.md b/docs/ai/quickstarts/get-started-azure-openai.md index 2600d264dcf74..aff272c02f90f 100644 --- a/docs/ai/quickstarts/get-started-azure-openai.md +++ b/docs/ai/quickstarts/get-started-azure-openai.md @@ -12,8 +12,22 @@ zone_pivot_groups: openai-library # Build an Azure AI chat app with .NET + +:::zone target="docs" pivot="semantic-kernel" + + +Get started with the Semantic Kernel by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `gpt-35-turbo` model deployed into an Azure OpenAI account. Follow these steps to provision Azure OpenAI and learn how to use Semantic Kernel. + +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `gpt-35-turbo` model deployed into an Azure OpenAI account. Follow these steps to provision Azure OpenAI and learn how to use the .NET Azure OpenAI SDK. +:::zone-end + [!INCLUDE [download-alert](includes/prerequisites-and-azure-deploy.md)] ## Trying HikerAI sample diff --git a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md index 5a5113253d6a0..f79ee3c2c239b 100644 --- a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md +++ b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md @@ -12,8 +12,21 @@ zone_pivot_groups: openai-library # Get insight about your data from an .NET Azure AI chat app + +:::zone target="docs" pivot="semantic-kernel" + + +Get started with Semantic Kernel and the `gpt-35-turbo` model, from a simple .NET 8.0 console application. Use the AI model to get analytics and information about your previous hikes. It consists of a simple console application, running locally, that will read the file `hikes.md` and send request to an Azure OpenAI service deployed in your Azure subscription and provide the result in the console. Follow these steps to provision Azure OpenAI and learn how to use Semantic Kernel. +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + Get started with the .NET Azure OpenAI with a `gpt-35-turbo` model, from a simple .NET 8.0 console application. Use the AI model to get analytics and information about your previous hikes. It consists of a simple console application, running locally, that will read the file `hikes.md` and send request to an Azure OpenAI service deployed in your Azure subscription and provide the result in the console. Follow these steps to provision Azure OpenAI and learn how to use the .NET Azure OpenAI SDK. +:::zone-end + [!INCLUDE [download-alert](includes/prerequisites-and-azure-deploy.md)] ## Try "Chatting About My Previous Hikes" sample diff --git a/docs/ai/quickstarts/quickstart-azure-openai-tool.md b/docs/ai/quickstarts/quickstart-azure-openai-tool.md index 6ee6f76b21ecb..f895b42231b8e 100644 --- a/docs/ai/quickstarts/quickstart-azure-openai-tool.md +++ b/docs/ai/quickstarts/quickstart-azure-openai-tool.md @@ -12,8 +12,22 @@ zone_pivot_groups: openai-library # Extend Azure AI using Tools and execute a local Function with .NET + +:::zone target="docs" pivot="semantic-kernel" + + +Get started with Semantic Kernel by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `gpt-35-turbo` model deployed into an Azure OpenAI account, however using Tool to extend the model capabilities it will call a local function. Follow these steps to provision Azure OpenAI and learn how to use Semantic Kernel. + +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `gpt-35-turbo` model deployed into an Azure OpenAI account, however using Tool to extend the model capabilities it will call a local function. Follow these steps to provision Azure OpenAI and learn how to use the .NET Azure OpenAI SDK. +:::zone-end + [!INCLUDE [download-alert](includes/prerequisites-and-azure-deploy.md)] ## Try HikerAI Pro sample diff --git a/docs/ai/quickstarts/quickstart-openai-generate-images.md b/docs/ai/quickstarts/quickstart-openai-generate-images.md index 3daa4d69e2739..e51fe0eeacc33 100644 --- a/docs/ai/quickstarts/quickstart-openai-generate-images.md +++ b/docs/ai/quickstarts/quickstart-openai-generate-images.md @@ -12,8 +12,22 @@ zone_pivot_groups: openai-library # Generate images using Azure AI with .NET + +:::zone target="docs" pivot="semantic-kernel" + + +Get started with Semantic Kernel by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `dell-e-3` model to generate postal card and invite your friends for a hike! Follow these steps to provision Azure OpenAI and learn how to use Semantic Kernel. + +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `dell-e-3` model to generate postal card and invite your friends for a hike! Follow these steps to provision Azure OpenAI and learn how to use the .NET Azure OpenAI SDK. +:::zone-end + [!INCLUDE [download-alert](includes/prerequisites-and-azure-deploy.md)] ## Trying Generate Hiking Images sample diff --git a/docs/ai/quickstarts/quickstart-openai-summarize-text.md b/docs/ai/quickstarts/quickstart-openai-summarize-text.md index 181be7820ff77..5fa84a6b50c75 100644 --- a/docs/ai/quickstarts/quickstart-openai-summarize-text.md +++ b/docs/ai/quickstarts/quickstart-openai-summarize-text.md @@ -12,8 +12,22 @@ zone_pivot_groups: openai-library # Summarize text using Azure AI chat app with .NET + +:::zone target="docs" pivot="semantic-kernel" + + +Get started with Semantic Kernel by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `gpt-35-turbo` model deployed into an Azure OpenAI account. Follow these steps to provision Azure OpenAI and learn how to use Semantic Kernel. + +:::zone-end + + +:::zone target="docs" pivot="azure-openai-sdk" + + Get started with the .NET Azure OpenAI SDK by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `gpt-35-turbo` model deployed into an Azure OpenAI account. Follow these steps to provision Azure OpenAI and learn how to use the .NET Azure OpenAI SDK. +:::zone-end + [!INCLUDE [download-alert](includes/prerequisites-and-azure-deploy.md)] ## Trying Hiking Benefits Summary sample From 186e3b3e137c82d74e52afa6e7f32be87dbc14b9 Mon Sep 17 00:00:00 2001 From: Jake Radzikowski Date: Mon, 25 Mar 2024 19:02:45 -0700 Subject: [PATCH 14/14] Update descriptions --- docs/ai/quickstarts/get-started-azure-openai.md | 2 +- docs/ai/quickstarts/quickstart-ai-chat-with-data.md | 2 +- docs/ai/quickstarts/quickstart-azure-openai-tool.md | 2 +- docs/ai/quickstarts/quickstart-openai-generate-images.md | 2 +- docs/ai/quickstarts/quickstart-openai-summarize-text.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/ai/quickstarts/get-started-azure-openai.md b/docs/ai/quickstarts/get-started-azure-openai.md index aff272c02f90f..b88cb64e96a05 100644 --- a/docs/ai/quickstarts/get-started-azure-openai.md +++ b/docs/ai/quickstarts/get-started-azure-openai.md @@ -1,6 +1,6 @@ --- title: Quickstart - Build an Azure AI chat app with .NET -description: Create a simple chat app using the .NET Azure OpenAI SDK. +description: Create a simple chat app using Semantic Kernel or the .NET Azure OpenAI SDK. ms.date: 03/04/2024 ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai diff --git a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md index f79ee3c2c239b..eb9890b37a103 100644 --- a/docs/ai/quickstarts/quickstart-ai-chat-with-data.md +++ b/docs/ai/quickstarts/quickstart-ai-chat-with-data.md @@ -1,6 +1,6 @@ --- title: Quickstart - Get insight about your data from an .NET Azure AI chat app -description: Create a simple chat app using your data and the .NET Azure OpenAI SDK. +description: Create a simple chat app using your data and Semantic Kernel or the .NET Azure OpenAI SDK. ms.date: 03/04/2024 ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai diff --git a/docs/ai/quickstarts/quickstart-azure-openai-tool.md b/docs/ai/quickstarts/quickstart-azure-openai-tool.md index f895b42231b8e..956a7d67ef190 100644 --- a/docs/ai/quickstarts/quickstart-azure-openai-tool.md +++ b/docs/ai/quickstarts/quickstart-azure-openai-tool.md @@ -1,6 +1,6 @@ --- title: Quickstart - Extend Azure AI using Tools and execute a local Function with .NET -description: Create a simple chat app using the .NET Azure OpenAI SDK and extend the model to execute a local function. +description: Create a simple chat app using Semantic Kernel or the .NET Azure OpenAI SDK and extend the model to execute a local function. ms.date: 03/04/2024 ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai diff --git a/docs/ai/quickstarts/quickstart-openai-generate-images.md b/docs/ai/quickstarts/quickstart-openai-generate-images.md index e51fe0eeacc33..4a0839e991e11 100644 --- a/docs/ai/quickstarts/quickstart-openai-generate-images.md +++ b/docs/ai/quickstarts/quickstart-openai-generate-images.md @@ -1,6 +1,6 @@ --- title: Quickstart - Generate images using Azure AI with .NET -description: Create a simple app using the .NET Azure OpenAI SDK to generate postal card images. +description: Create a simple app using Semantic Kernel or the .NET Azure OpenAI SDK to generate postal card images. ms.date: 03/04/2024 ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai diff --git a/docs/ai/quickstarts/quickstart-openai-summarize-text.md b/docs/ai/quickstarts/quickstart-openai-summarize-text.md index 5fa84a6b50c75..fc220d1b5651f 100644 --- a/docs/ai/quickstarts/quickstart-openai-summarize-text.md +++ b/docs/ai/quickstarts/quickstart-openai-summarize-text.md @@ -1,6 +1,6 @@ --- title: Quickstart - Summarize text using Azure AI chat app with .NET -description: Create a simple chat app using the .NET Azure OpenAI SDK to summarize a text. +description: Create a simple chat app using Semantic Kernel or the .NET Azure OpenAI SDK to summarize a text. ms.date: 03/04/2024 ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai