diff --git a/docs/ai/quickstarts/ai-templates.md b/docs/ai/quickstarts/ai-templates.md index d74acff38efd7..0b6396c858ac7 100644 --- a/docs/ai/quickstarts/ai-templates.md +++ b/docs/ai/quickstarts/ai-templates.md @@ -1,7 +1,7 @@ --- title: Quickstart - Create a .NET AI app using the AI app template description: Create a .NET AI app to chat with custom data using the AI app template extensions and the Microsoft.Extensions.AI libraries -ms.date: 2/21/2025 +ms.date: 07/30/2025 ms.topic: quickstart ms.custom: devx-track-dotnet, devx-track-dotnet-ai author: alexwolfmsft diff --git a/docs/ai/quickstarts/includes/ai-templates-azure-openai.md b/docs/ai/quickstarts/includes/ai-templates-azure-openai.md index 9cd8363c07933..876c087ac0a24 100644 --- a/docs/ai/quickstarts/includes/ai-templates-azure-openai.md +++ b/docs/ai/quickstarts/includes/ai-templates-azure-openai.md @@ -8,10 +8,10 @@ ms.author: alexwolf ## Prerequisites -* .NET 9.0 SDK - [Install the .NET 9.0 SDK](https://dotnet.microsoft.com/download) -* Visual Studio 2022 - [Install Visual Studio 2022](https://visualstudio.microsoft.com/) (optional), or -* Visual Studio Code - [Install Visual Studio Code](https://code.visualstudio.com) (optional) - * With the C# DevKit - [Install C# Dev Kit extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) +* [.NET 9.0 SDK](https://dotnet.microsoft.com/download) +* One of the following IDEs (optional): + * [Visual Studio 2022](https://visualstudio.microsoft.com/) + * [Visual Studio Code](https://code.visualstudio.com) with [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) ## Install the .NET AI app template @@ -31,10 +31,10 @@ After you install the AI app templates, you can use them to create starter apps 1. On the **Create a new project** screen, search for **AI Chat Web App**. Select the matching result and then choose **Next**. 1. On the **Configure your new project** screen, enter the desired name and location for your project and then choose **Next**. 1. On the **Additional information** screen: - - For the **Framework** option, select **.NET 9.0**. - - For the **AI service provider** option, select **Azure OpenAI**. - - Make sure the **Use keyless authentication for Azure services** checkbox is checked. - - For the **Vector store** option, select **Local on-disc (for prototyping)**. + * For the **Framework** option, select **.NET 9.0**. + * For the **AI service provider** option, select **Azure OpenAI**. + * Make sure the **Use keyless authentication for Azure services** checkbox is checked. + * For the **Vector store** option, select **Local on-disc (for prototyping)**. 1. Select **Create** to complete the process. # [Visual Studio Code](#tab/visual-studio-code) @@ -86,9 +86,9 @@ The AI template uses Microsoft Entra ID for seamless, keyless authentication. It 1. Assign a role to your developer account to access the Azure OpenAI resource: - - In the Azure Portal, navigate to the overview page of your Azure OpenAI resource. - - Select **Access control (IAM)** from the left navigation. - - [Add a role assignment](../../../azure/sdk/authentication/local-development-dev-accounts.md#assign-roles-to-the-group) for the `Azure AI Developer` role to your Azure account. + * In the Azure Portal, navigate to the overview page of your Azure OpenAI resource. + * Select **Access control (IAM)** from the left navigation. + * [Add a role assignment](../../../azure/sdk/authentication/local-development-dev-accounts.md#assign-roles-to-the-group) for the `Azure AI Developer` role to your Azure account. 1. [Sign-in to a local development tool](../../../azure/sdk/authentication/local-development-dev-accounts.md#sign-in-to-azure-using-developer-tooling) such as Visual Studio or the Azure CLI using the Azure account you assigned the `Azure AI Developer` role to. diff --git a/docs/ai/quickstarts/includes/ai-templates-explore-app.md b/docs/ai/quickstarts/includes/ai-templates-explore-app.md index b82b0aba575a1..b857685f2b751 100644 --- a/docs/ai/quickstarts/includes/ai-templates-explore-app.md +++ b/docs/ai/quickstarts/includes/ai-templates-explore-app.md @@ -1,9 +1,9 @@ -The sample app you created is a Blazor Interactive Server web app preconfigured with common AI and data services. The app handles the following concerns for you: +The sample app you created is a Blazor Interactive Server web app preconfigured with common AI and data services. The app template handles the following concerns for you: -- Includes essential `Microsoft.Extensions.AI` packages and other dependencies in the `csproj` file to help you get started working with AI. +- Includes essential `Microsoft.Extensions.AI` packages and other dependencies in the `.csproj` file to help you get started working with AI. - Creates various AI services and registers them for dependency injection in the `Program.cs` file: - - An `IChatClient` service to chat back and forth with the generative AI model - - An `IEmbeddingGenerator` service that's used to generate embeddings, which are essential for vector search functionality - - A `JsonVectorStore` to act as an in-memory vector store -- Registers a SQLite database context service to handle ingesting documents. The app is preconfigured to ingest whatever documents you add to the `Data` folder of the project, including the provided example files. + - An `IChatClient` service to chat back and forth with the generative AI model. + - An `IEmbeddingGenerator` service that's used to generate embeddings, which are essential for vector search functionality. + - A `JsonVectorStore` to act as an in-memory vector store. +- Registers a SQLite database context service to handle ingesting documents. The app is preconfigured to ingest whatever documents you add to the `wwwroot/Data` folder of the project, including the provided example files. - Provides a complete chat UI using Blazor components. The UI handles rich formatting for the AI responses and provides features such as citations for response data. diff --git a/docs/ai/quickstarts/includes/ai-templates-github-models.md b/docs/ai/quickstarts/includes/ai-templates-github-models.md index a2a207a89f4e8..87a1f02d58891 100644 --- a/docs/ai/quickstarts/includes/ai-templates-github-models.md +++ b/docs/ai/quickstarts/includes/ai-templates-github-models.md @@ -8,10 +8,10 @@ ms.author: alexwolf ## Prerequisites -* .NET 9.0 SDK - [Install the .NET 9.0 SDK](https://dotnet.microsoft.com/download) -* Visual Studio 2022 - [Install Visual Studio 2022](https://visualstudio.microsoft.com/) (optional), or -* Visual Studio Code - [Install Visual Studio Code](https://code.visualstudio.com) (optional) - * With the C# DevKit - [Install C# Dev Kit extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) +* [.NET 9.0 SDK](https://dotnet.microsoft.com/download) +* One of the following IDEs (optional): + * [Visual Studio 2022](https://visualstudio.microsoft.com/) + * [Visual Studio Code](https://code.visualstudio.com) with [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) ## Install the .NET AI app template @@ -79,20 +79,21 @@ The sample app you created is a Blazor Interactive Server web app preconfigured ## Configure access to GitHub Models -To authenticate to GitHub models from your code, you'll need to create a GitHub personal access token: +To authenticate to GitHub models from your code, you'll need to [create a GitHub personal access token](https://docs.github.com/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token): -1. Navigate to the **Personal access tokens** page of your GitHub account settings. +1. Navigate to the **Personal access tokens** page of your GitHub account settings under **Developer Settings**. 1. Select **Generate new token**. -1. Enter a **Token name** and then select **Generate token** at the bottom of the page. +1. Enter a name for the token, and under **Permissions**, set **Models** to **Access: Read-only**. +1. Select **Generate token** at the bottom of the page. 1. Copy the token for use in the steps ahead. ## Configure the app -The **AI Chat Web App** app is almost ready to go as soon as it's created. However, you'll need to configure the app to use the personal access token you setup for GitHub Modelsfor. By default, the app template searches for this value in the project's local .NET user secrets. You can manage user secrets using either the Visual Studio UI or the .NET CLI. +The **AI Chat Web App** app is almost ready to go as soon as it's created. However, you need to configure the app to use the personal access token you set up for GitHub Models. By default, the app template searches for this value in the project's local .NET user secrets. You can manage user secrets using either the Visual Studio UI or the .NET CLI. # [Visual Studio](#tab/configure-visual-studio) -1. In Visual Studio, right-click on your project in the Solution Explorer and select "Manage User Secrets". This opens a `secrets.json` file where you can store your API keys without them being tracked in source control. +1. In Visual Studio, right-click on your project in the Solution Explorer and select **Manage User Secrets**. This opens a `secrets.json` file where you can store your API keys without them being tracked in source control. 2. Add the following key and value: diff --git a/docs/ai/quickstarts/includes/ai-templates-ollama.md b/docs/ai/quickstarts/includes/ai-templates-ollama.md index a6fae197e0241..ae6d9d14bc9dc 100644 --- a/docs/ai/quickstarts/includes/ai-templates-ollama.md +++ b/docs/ai/quickstarts/includes/ai-templates-ollama.md @@ -8,11 +8,11 @@ ms.author: alexwolf ## Prerequisites -* .NET 9.0 SDK - [Install the .NET 9.0 SDK](https://dotnet.microsoft.com/download) -* Visual Studio 2022 - [Install Visual Studio 2022](https://visualstudio.microsoft.com/) (optional), or -* Visual Studio Code - [Install Visual Studio Code](https://code.visualstudio.com) (optional) - * With the C# DevKit - [Install C# Dev Kit extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) +* [.NET 9.0 SDK](https://dotnet.microsoft.com/download) * Ollama installed locally - [Install Ollama](https://ollama.com/) locally on your device +* One of the following IDEs (optional): + * [Visual Studio 2022](https://visualstudio.microsoft.com/) + * [Visual Studio Code](https://code.visualstudio.com) with [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) ## Install the .NET AI app template diff --git a/docs/ai/quickstarts/includes/ai-templates-openai.md b/docs/ai/quickstarts/includes/ai-templates-openai.md index 6268b77444ec4..4ee41700800d8 100644 --- a/docs/ai/quickstarts/includes/ai-templates-openai.md +++ b/docs/ai/quickstarts/includes/ai-templates-openai.md @@ -8,11 +8,11 @@ ms.author: alexwolf ## Prerequisites -* .NET 9.0 SDK - [Install the .NET 9.0 SDK](https://dotnet.microsoft.com/download) -* Visual Studio 2022 - [Install Visual Studio 2022](https://visualstudio.microsoft.com/) (optional), or -* Visual Studio Code - [Install Visual Studio Code](https://code.visualstudio.com) (optional) - * With the C# DevKit - [Install C# Dev Kit extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) -* Access to an [OpenAI service](https://openai.com/api/) and the corresponding API key. +* [.NET 9.0 SDK](https://dotnet.microsoft.com/download) +* Access to an [OpenAI service](https://openai.com/api/) and the corresponding API key +* One of the following IDEs (optional): + * [Visual Studio 2022](https://visualstudio.microsoft.com/) + * [Visual Studio Code](https://code.visualstudio.com) with [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) ## Install the .NET AI app template