Skip to content

Commit 272a9e6

Browse files
committed
Entra ID for AOAI QS - C#
1 parent cbfc580 commit 272a9e6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

articles/ai-services/openai/includes/chatgpt-dotnet.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ To use the non-streaming method:
8787
8888
```csharp
8989
using Azure;
90+
using Azure.Identity;
91+
using OpenAI.Assistants;
9092
using Azure.AI.OpenAI;
93+
using OpenAI.Chat;
9194
using static System.Environment;
9295
9396
string endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? "https://<your-resource-name>.openai.azure.com/";
@@ -121,7 +124,7 @@ To use the non-streaming method:
121124
#### Output
122125
123126
```output
124-
Assistant : Yes, many other Azure AI services also support customer managed keys, including Azure Cognitive Services, Azure Machine Learning, and Azure Databricks. By using customer managed keys, you can retain complete control over your encryption keys and provide an additional layer of security for your AI assets.
127+
Assistant: Arrr, ye be askin’ a fine question, matey! Aye, several Azure AI services support customer-managed keys (CMK)! This lets ye take the wheel and secure yer data with encryption keys stored in Azure Key Vault. Services such as Azure Machine Learning, Azure Cognitive Search, and others also offer CMK fer data protection. Always check the specific service's documentation fer the latest updates, as features tend to shift swifter than the tides, aye!
125128
```
126129
127130
This will wait until the model has generated its entire response before printing the results. Alternatively, if you want to asynchronously stream the response and print the results, you can replace the contents of *program.cs* with the code in the next example.
@@ -133,6 +136,8 @@ To use the streaming method:
133136
134137
```csharp
135138
using Azure;
139+
using Azure.Identity;
140+
using OpenAI.Assistants;
136141
using Azure.AI.OpenAI;
137142
using OpenAI.Chat;
138143
using static System.Environment;
@@ -179,7 +184,7 @@ To use the streaming method:
179184
#### Output
180185
181186
```output
182-
Assistant : Yes, many other Azure AI services also support customer managed keys, including Azure Cognitive Services, Azure Machine Learning, and Azure Databricks. By using customer managed keys, you can retain complete control over your encryption keys and provide an additional layer of security for your AI assets.
187+
Assistant: Arrr, ye be askin’ a fine question, matey! Aye, several Azure AI services support customer-managed keys (CMK)! This lets ye take the wheel and secure yer data with encryption keys stored in Azure Key Vault. Services such as Azure Machine Learning, Azure Cognitive Search, and others also offer CMK fer data protection. Always check the specific service's documentation fer the latest updates, as features tend to shift swifter than the tides, aye!
183188
```
184189
185190

0 commit comments

Comments
 (0)