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
Copy file name to clipboardexpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web-CSharp/README.md
+70-70
Original file line number
Diff line number
Diff line change
@@ -20,11 +20,11 @@ Configure your token for this project using .NET User Secrets:
20
20
1. In Visual Studio, right-click on your project in the Solution Explorer and select "Manage User Secrets".
21
21
2. This opens a `secrets.json` file where you can store your API keys without them being tracked in source control. Add the following key and value:
22
22
23
-
```json
24
-
{
25
-
"GitHubModels:Token": "YOUR-TOKEN"
26
-
}
27
-
```
23
+
```json
24
+
{
25
+
"GitHubModels:Token": "YOUR-TOKEN"
26
+
}
27
+
```
28
28
#### ---#else
29
29
From the command line, configure your token for this project using .NET User Secrets by running the following commands:
30
30
@@ -48,11 +48,11 @@ Configure your API key for this project, using .NET User Secrets:
48
48
1. In Visual Studio, right-click on your project in the Solution Explorer and select "Manage User Secrets".
49
49
2. This will open a secrets.json file where you can store your API key without them being tracked in source control. Add the following key and value to the file:
50
50
51
-
```json
52
-
{
53
-
"OpenAI:Key": "YOUR-API-KEY"
54
-
}
55
-
```
51
+
```json
52
+
{
53
+
"OpenAI:Key": "YOUR-API-KEY"
54
+
}
55
+
```
56
56
57
57
#### ---#else
58
58
From the command line, configure your API key for this project using .NET User Secrets by running the following commands:
@@ -100,50 +100,50 @@ This template is configured to use keyless authentication (also known as Managed
100
100
101
101
### 4. Configure Azure OpenAI Endpoint
102
102
Configure your Azure OpenAI endpoint for this project, using .NET User Secrets:
103
-
1. In the Azure Portal, navigate to your Azure OpenAI resource.
104
-
2. Copy the "Endpoint" URL from the "Keys and Endpoint" section.
103
+
1. In the Azure Portal, navigate to your Azure OpenAI resource.
104
+
2. Copy the "Endpoint" URL from the "Keys and Endpoint" section.
105
105
#### ---#if (hostIdentifier == "vs")
106
-
3. In Visual Studio, right-click on your project in the Solution Explorer and select"Manage User Secrets".
107
-
4. This will open a `secrets.json` file where you can store your Azure OpenAI endpoint without it being tracked in source control. Add the following key and value to the file:
106
+
3. In Visual Studio, right-click on your project in the Solution Explorer and select"Manage User Secrets".
107
+
4. This will open a `secrets.json` file where you can store your Azure OpenAI endpoint without it being tracked in source control. Add the following key and value to the file:
3. From the command line, configure your Azure OpenAI endpoint for this project using .NET User Secrets by running the following commands:
115
+
3. From the command line, configure your Azure OpenAI endpoint for this project using .NET User Secrets by running the following commands:
116
116
117
-
```sh
118
-
cd<<your-project-directory>>
119
-
dotnet user-secrets set AzureOpenAI:Endpoint YOUR-AZURE-OPENAI-ENDPOINT
120
-
```
117
+
```sh
118
+
cd<<your-project-directory>>
119
+
dotnet user-secrets set AzureOpenAI:Endpoint YOUR-AZURE-OPENAI-ENDPOINT
120
+
```
121
121
#### ---#endif
122
122
123
123
Make sure to replace `YOUR-AZURE-OPENAI-ENDPOINT` with your actual Azure OpenAI endpoint, formatted like https://YOUR-DEPLOYMENT-NAME.openai.azure.com/ (do not include any path after .openai.azure.com/).
124
124
#### ---#else
125
125
### 3. Configure API Key and Endpoint
126
126
Configure your Azure OpenAI API key and endpoint for this project, using .NET User Secrets:
127
-
1. In the Azure Portal, navigate to your Azure OpenAI resource.
128
-
2. Copy the "Endpoint" URL and "Key 1" from the "Keys and Endpoint" section.
127
+
1. In the Azure Portal, navigate to your Azure OpenAI resource.
128
+
2. Copy the "Endpoint" URL and "Key 1" from the "Keys and Endpoint" section.
129
129
#### ---#if (hostIdentifier == "vs")
130
130
3. In Visual Studio, right-click on your project in the Solution Explorer and select"Manage User Secrets".
131
131
4. This will open a secrets.json file where you can store your API key and endpoint without it being tracked in source control. Add the following keys & values to the file:
3. From the command line, configure your API key and endpoint for this project using .NET User Secrets by running the following commands:
141
141
142
-
```sh
143
-
cd<<your-project-directory>>
144
-
dotnet user-secrets set AzureOpenAI:Key YOUR-AZURE-OPENAI-KEY
145
-
dotnet user-secrets set AzureOpenAI:Endpoint YOUR-AZURE-OPENAI-ENDPOINT
146
-
```
142
+
```sh
143
+
cd<<your-project-directory>>
144
+
dotnet user-secrets set AzureOpenAI:Key YOUR-AZURE-OPENAI-KEY
145
+
dotnet user-secrets set AzureOpenAI:Endpoint YOUR-AZURE-OPENAI-ENDPOINT
146
+
```
147
147
#### ---#endif
148
148
149
149
Make sure to replace `YOUR-AZURE-OPENAI-KEY` and `YOUR-AZURE-OPENAI-ENDPOINT` with your actual Azure OpenAI key and endpoint. Make sure your endpoint URL is formatted like https://YOUR-DEPLOYMENT-NAME.openai.azure.com/ (do not include any path after .openai.azure.com/).
@@ -166,51 +166,51 @@ This template is configured to use keyless authentication (also known as Managed
166
166
167
167
### 3. Set the Azure AI Search Endpoint for this app
168
168
Configure your Azure AI Search endpoint for this project, using .NET User Secrets:
169
-
1. In the Azure Portal, navigate to your Azure AI Search resource.
170
-
2. Copy the "URL" from the "Overview" section.
169
+
1. In the Azure Portal, navigate to your Azure AI Search resource.
170
+
2. Copy the "URL" from the "Overview" section.
171
171
#### ---#if (hostIdentifier == "vs")
172
-
3. In Visual Studio, right-click on your project in the Solution Explorer and select "Manage User Secrets".
173
-
4. This will open a `secrets.json` file where you can store your Azure AI Search endpoint securely. Add the following key & value to the file:
172
+
3. In Visual Studio, right-click on your project in the Solution Explorer and select "Manage User Secrets".
173
+
4. This will open a `secrets.json` file where you can store your Azure AI Search endpoint securely. Add the following key & value to the file:
3. From the command line, configure your Azure AI Search endpoint for this project using .NET User Secrets by running the following commands:
181
+
3. From the command line, configure your Azure AI Search endpoint for this project using .NET User Secrets by running the following commands:
182
182
183
-
```sh
184
-
cd <<your-project-directory>>
185
-
dotnet user-secrets set AzureAISearch:Endpoint YOUR-AZURE-AI-SEARCH-ENDPOINT
186
-
```
183
+
```sh
184
+
cd <<your-project-directory>>
185
+
dotnet user-secrets set AzureAISearch:Endpoint YOUR-AZURE-AI-SEARCH-ENDPOINT
186
+
```
187
187
#### ---#endif
188
188
189
189
Make sure to replace `YOUR-AZURE-AI-SEARCH-ENDPOINT` with your actual Azure AI Search endpoint.
190
190
191
191
#### ---#else
192
192
### 3. Configure API Key and Endpoint
193
193
Configure your Azure AI Search API key and endpoint for this project, using .NET User Secrets:
194
-
1. In the Azure Portal, navigate to your Azure AI Search resource.
195
-
2. Copy the "Endpoint" URL and "Primary admin key" from the "Keys" section.
194
+
1. In the Azure Portal, navigate to your Azure AI Search resource.
195
+
2. Copy the "Endpoint" URL and "Primary admin key" from the "Keys" section.
196
196
#### ---#if (hostIdentifier == "vs")
197
197
3. In Visual Studio, right-click on your project in the Solution Explorer and select "Manage User Secrets".
198
198
4. This will open a `secrets.json` file where you can store your API key and endpoint without them being tracked in source control. Add the following keys and values to the file:
0 commit comments