You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update chat template dependencies
* Update test snapshots
* Update Aspire version
* Revert Aspire + update CommunityToolkit.Aspire
* Open README in VS after project creation
* Add Known Issue to Aspire README for Qdrant
* Update survey template URL
* Set the Project Template package version to -preview.2
* Update template baseline
* Update template pinned versions
* Do not append template args to snapshot names
* Fix vector store index in the README. Add an AzureAISearch template test.
* Add a note to the Aspire README for trusting the development certificate
* Use AddOpenAIClient for OpenAI and AddAzureOpenAIClient for Azure OpenAI
* Remove duplicated using System.ClientModel
* Update Aspire README to specify the exception thrown for the known issue
* Augment the Aspire README for more Docker notes for Ollama and Qdrant
* Fix Microsoft.Extensions.Http.Resilience warnings with separate pinned versions
* Update test baseline for: Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods (#6295)
* Add --managed-identity to the template developer README
* Apply the Ollama timeout recommendation in the template code
* Call http.RemoveAllResilienceHandlers before adding the handler
* Update template test baseline
---------
Co-authored-by: Jeff Handley <[email protected]>
Co-authored-by: David Cantu <[email protected]>
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/.template.config/template.json
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.ServiceDefaults/Extensions.cs
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,25 @@ public static TBuilder AddServiceDefaults<TBuilder>(this TBuilder builder) where
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/Components/Layout/SurveyPrompt.razor
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
<div>
9
9
How well is this template working for you? Please take a
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/Program.Aspire.cs
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/Program.cs
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# AI Chat with Custom Data
2
2
3
-
This project is an AI chat application that demonstrates how to chat with custom data using an AI language model. Please note that this template is currently in an early preview stage. If you have feedback, please take a [brief survey](https://aka.ms/dotnet-chat-template-survey).
3
+
This project is an AI chat application that demonstrates how to chat with custom data using an AI language model. Please note that this template is currently in an early preview stage. If you have feedback, please take a [brief survey](https://aka.ms/dotnet-chat-templatePreview2-survey).
4
4
5
5
>[!NOTE]
6
6
> Before running this project you need to configure the API keys or endpoints for the providers you have chosen. See below for details specific to your choices.
@@ -158,7 +158,7 @@ To use Azure AI Search, you will need an Azure account and an Azure AI Search re
158
158
### 1. Create an Azure AI Search Resource
159
159
Follow the instructions in the [Azure portal](https://portal.azure.com/) to create an Azure AI Search resource. Note that there is a free tier for the service but it is not currently the default setting on the portal.
160
160
161
-
Note that if you previously used the same Azure AI Search resource with different model using this project name, you may need to delete your `$$VectorStoreIndexName$$` index using the [Azure portal](https://portal.azure.com/) first before continuing; otherwise, data ingestion may fail due to a vector dimension mismatch.
161
+
Note that if you previously used the same Azure AI Search resource with different model using this project name, you may need to delete your `data-ChatWithCustomData-CSharp.Web-ingestion` index using the [Azure portal](https://portal.azure.com/) first before continuing; otherwise, data ingestion may fail due to a vector dimension mismatch.
162
162
163
163
#### ---#if (UseManagedIdentity)
164
164
### 2. Configure Azure AI Search for Keyless Authentication
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/README.Aspire.md
+32-22Lines changed: 32 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# AI Chat with Custom Data
2
2
3
-
This project is an AI chat application that demonstrates how to chat with custom data using an AI language model. Please note that this template is currently in an early preview stage. If you have feedback, please take a [brief survey](https://aka.ms/dotnet-chat-template-survey).
3
+
This project is an AI chat application that demonstrates how to chat with custom data using an AI language model. Please note that this template is currently in an early preview stage. If you have feedback, please take a [brief survey](https://aka.ms/dotnet-chat-templatePreview2-survey).
4
4
5
5
>[!NOTE]
6
6
> Before running this project you need to configure the API keys or endpoints for the providers you have chosen. See below for details specific to your choices.
@@ -9,6 +9,17 @@ This project is an AI chat application that demonstrates how to chat with custom
9
9
### Prerequisites
10
10
To use Azure OpenAI or Azure AI Search, you need an Azure account. If you don't already have one, [create an Azure account](https://azure.microsoft.com/free/).
11
11
12
+
#### ---#endif
13
+
#### ---#if (UseQdrant)
14
+
### Known Issues
15
+
16
+
#### Errors After Updating to Aspire Version 9.2.0
17
+
This project is not currently compatible with Aspire 9.2.0, and all Aspire package versions are set to 9.1.0. Updating [Aspire.Qdrant.Client](https://www.nuget.org/packages/Aspire.Qdrant.Client) to version 9.2.0 causes an incompatibility with [Microsoft.SemanticKernel.Connectors.Qdrant](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.Qdrant) where different versions of [Qdrant.Client](https://www.nuget.org/packages/Qdrant.Client) are required. Attempting to run the project with `Aspire.Qdrant.Client` version 9.2.0 will result in the following exception:
18
+
19
+
> System.MissingMethodException: Method not found: 'Qdrant.Client.Grpc.Vectors Qdrant.Client.Grpc.ScoredPoint.get_Vectors()'
20
+
21
+
Once a version of `Microsoft.SemanticKernel.Connectors.Qdrant` is published with a dependency on `Qdrant.Client` version `>= 1.13.0`, the Aspire packages can also be updated to version 9.2.0.
22
+
12
23
#### ---#endif
13
24
# Configure the AI Model Provider
14
25
@@ -66,28 +77,12 @@ dotnet user-secrets set ConnectionStrings:openai "Key=YOUR-API-KEY"
66
77
#### ---#endif
67
78
#### ---#if (IsOllama)
68
79
## Setting up a local environment for Ollama
69
-
This project is configured to run Ollama in a Docker container.
70
-
71
-
To get started, download, install, and run Docker Desktop from the [official website](https://www.docker.com/). Follow the installation instructions specific to your operating system.
72
-
73
-
The response time from Ollama depends on your GPU. If you find that default resilience timeout of 10 seconds used by .NET Aspire is timing out for the HTTP call from the web app to the Ollama service, you can update the web app's `Program.cs` to extend the timeout by adding the following below the line which reads `builder.AddServiceDefaults();`:
This project is configured to run Ollama in a Docker container. Docker Desktop must be installed and running for the project to run successfully. An Ollama container will automatically start when running the application.
81
+
82
+
Download, install, and run Docker Desktop from the [official website](https://www.docker.com/). Follow the installation instructions specific to your operating system.
89
83
90
84
Note: Ollama and Docker are excellent open source products, but are not maintained by Microsoft.
85
+
91
86
#### ---#endif
92
87
#### ---#if (IsAzureOpenAI)
93
88
## Using Azure OpenAI
@@ -133,7 +128,7 @@ To use Azure AI Search, you will need an Azure account and an Azure AI Search re
133
128
### 1. Create an Azure AI Search Resource
134
129
Follow the instructions in the [Azure portal](https://portal.azure.com/) to create an Azure AI Search resource. Note that there is a free tier for the service but it is not currently the default setting on the portal.
135
130
136
-
Note that if you previously used the same Azure AI Search resource with different model using this project name, you may need to delete your `$$VectorStoreIndexName$$` index using the [Azure portal](https://portal.azure.com/) first before continuing; otherwise, data ingestion may fail due to a vector dimension mismatch.
131
+
Note that if you previously used the same Azure AI Search resource with different model using this project name, you may need to delete your `data-ChatWithCustomData-CSharp.Web-ingestion` index using the [Azure portal](https://portal.azure.com/) first before continuing; otherwise, data ingestion may fail due to a vector dimension mismatch.
137
132
138
133
### 3. Configure API Key and Endpoint
139
134
Configure your Azure AI Search API key and endpoint for this project, using .NET User Secrets:
@@ -159,6 +154,15 @@ Note that if you previously used the same Azure AI Search resource with differen
159
154
160
155
Make sure to replace `YOUR-DEPLOYMENT-NAME` and `YOUR-API-KEY` with your actual Azure AI Search deployment name and key.
161
156
#### ---#endif
157
+
#### ---#if (UseQdrant)
158
+
159
+
## Setting up a local environment for Qdrant
160
+
This project is configured to run Qdrant in a Docker container. Docker Desktop must be installed and running for the project to run successfully. A Qdrant container will automatically start when running the application.
161
+
162
+
Download, install, and run Docker Desktop from the [official website](https://www.docker.com/). Follow the installation instructions specific to your operating system.
163
+
164
+
Note: Qdrant and Docker are excellent open source products, but are not maintained by Microsoft.
165
+
#### ---#endif
162
166
163
167
# Running the application
164
168
@@ -174,6 +178,12 @@ Make sure to replace `YOUR-DEPLOYMENT-NAME` and `YOUR-API-KEY` with your actual
174
178
3. Once installed, Open the `Program.cs` file in the ChatWithCustomData-CSharp.AppHost project.
175
179
4. Run the project by clicking the "Run" button in the Debug view.
176
180
181
+
## Trust the localhost certificate
182
+
183
+
Several .NET Aspire templates include ASP.NET Core projects that are configured to use HTTPS by default. If this is the first time you're running the project, an exception might occur when loading the Aspire dashboard. This error can be resolved by trusting the self-signed development certificate with the .NET CLI.
184
+
185
+
See [Troubleshoot untrusted localhost certificate in .NET Aspire](https://learn.microsoft.com/dotnet/aspire/troubleshooting/untrusted-localhost-certificate) for more information.
186
+
177
187
# Learn More
178
188
To learn more about development with .NET and AI, check out the following links:
0 commit comments