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: docs/ai/how-to/content-filtering.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
@@ -32,7 +32,7 @@ To use the sample code in this article, you need to create and assign a content
32
32
1. Add the [`Azure.AI.OpenAI`](https://www.nuget.org/packages/Azure.AI.OpenAI) NuGet package to your project.
33
33
34
34
```dotnetcli
35
-
dotnet add package Azure.AI.OpenAI
35
+
dotnet package add Azure.AI.OpenAI
36
36
```
37
37
38
38
1. Create a simple chat completion flow in your .NET app using the `OpenAiClient`. Replace the `YOUR_OPENAI_ENDPOINT`, `YOUR_OPENAI_KEY`, and `YOUR_OPENAI_DEPLOYMENT` values with your own.
@@ -48,7 +48,7 @@ To use the sample code in this article, you need to create and assign a content
48
48
```output
49
49
I am sorry if I have done anything to upset you.
50
50
Is there anything I can do to assist you and make things better?
51
-
51
+
52
52
Hate category is filtered: False with low severity.
53
53
SelfHarm category is filtered: False with safe severity.
54
54
Sexual category is filtered: False with safe severity.
3. In the `Program.cs` file of your app, invoke the <xref:Microsoft.Extensions.Azure.AzureClientServiceCollectionExtensions.AddAzureClients%2A> extension method from the `Microsoft.Extensions.Azure` library to register a client to communicate with each Azure service. Some client libraries provide additional [subclients](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-subclients) for specific subgroups of Azure service functionality. You can register such subclients for dependency injection via the <xref:Microsoft.Extensions.Azure.AzureClientFactoryBuilder.AddClient%2A> extension method.
@@ -77,7 +77,7 @@ Use the [Azure Identity](/dotnet/api/overview/azure/identity-readme) library for
77
77
1. Add the [Azure.Identity](https://www.nuget.org/packages/Azure.Identity) package:
78
78
79
79
```dotnetcli
80
-
dotnet add package Azure.Identity
80
+
dotnet package add Azure.Identity
81
81
```
82
82
83
83
1. In the `Program.cs` file of your app, invoke the <xref:Microsoft.Extensions.Azure.AzureClientFactoryBuilder.UseCredential%2A> extension method from the `Microsoft.Extensions.Azure` library to set a shared `DefaultAzureCredential` instance for all registered Azure service clients:
Copy file name to clipboardExpand all lines: docs/azure/sdk/dependency-injection.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,22 +17,22 @@ To register and configure service clients from an [`Azure.`-prefixed package](pa
17
17
1. Install the [Microsoft.Extensions.Azure](https://www.nuget.org/packages/Microsoft.Extensions.Azure) package in your project:
18
18
19
19
```dotnetcli
20
-
dotnet add package Microsoft.Extensions.Azure
20
+
dotnet package add Microsoft.Extensions.Azure
21
21
```
22
22
23
23
1. Install the [Azure.Identity](https://www.nuget.org/packages/Azure.Identity) package to configure a `TokenCredential` type to use for authenticating all registered clients that accept such a type:
24
24
25
25
```dotnetcli
26
-
dotnet add package Azure.Identity
26
+
dotnet package add Azure.Identity
27
27
```
28
28
29
29
For demonstration purposes, the sample code in this article uses the Key Vault Secrets, Blob Storage, Service Bus, and Azure OpenAI libraries. Install the following packages to follow along:
0 commit comments