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: articles/ai-services/openai/includes/chatgpt-dotnet.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ dotnet run program.cs
78
78
## Output
79
79
80
80
```output
81
-
Yes, many of the Azure AI services support customer managed keys. Some examples include Text Analytics, Speech Services, and Translator. However, it's important to note that not all services support customer managed keys, so it's best to check the documentation for each individual service to see if it is supported.
81
+
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.
82
82
```
83
83
84
84
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.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/dotnet.md
+44-12Lines changed: 44 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,20 +26,53 @@ ms.date: 07/26/2023
26
26
27
27
## Set up
28
28
29
-
[!INCLUDE [Create a new .NET application](./dotnet-new-application.md)]
29
+
### Create a new .NET Core application
30
+
31
+
In a console window (such as cmd, PowerShell, or Bash), use the `dotnet new` command to create a new console app with the name `azure-openai-quickstart`. This command creates a simple "Hello World" project with a single C# source file: *Program.cs*.
32
+
33
+
```dotnetcli
34
+
dotnet new console -n azure-openai-quickstart
35
+
```
36
+
37
+
Change your directory to the newly created app folder. You can build the application with:
38
+
39
+
```dotnetcli
40
+
dotnet build
41
+
```
42
+
43
+
The build output should contain no warnings or errors.
> The completions API is only available in version `1.0.0-beta.17` and earlier of the `Azure.AI.OpenAI` client library. For the latest `2.0.0` and higher version of `Azure.AI.OpenAI`, the recommended approach to generate completions is to use the [chat completions API](chatgpt-dotnet).
> [I ran into an issue with the setup.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=DOTNET&Pillar=AOAI&Product=gpt&Page=quickstart&Section=Set-up)
38
68
39
69
## Create a sample application
40
70
41
71
From the project directory, open the *program.cs* file and replace with the following code:
42
72
73
+
> [!NOTE]
74
+
> The completions API is only available
75
+
43
76
```csharp
44
77
usingAzure;
45
78
usingAzure.AI.OpenAI;
@@ -48,20 +81,19 @@ using static System.Environment;
The available health plans in the Contoso Electronics plan and benefit packages are the Northwind Health Plus and Northwind Standard plans [^1^].
98
-
===
99
-
Context information (e.g. citations) from chat extensions:
100
-
===
101
-
tool: {
102
-
"citations": [
103
-
{
104
-
"content": "...",
105
-
"id": null,
106
-
"title": "...",
107
-
"filepath": "...",
108
-
"url": "...",
109
-
"metadata": {
110
-
"chunking": "orignal document size=1011. Scores=3.6390076 and None.Org Highlight count=38."
111
-
},
112
-
"chunk_id": "2"
113
-
},
114
-
...
115
-
],
116
-
"intent": "[\u0022What are my available health plans?\u0022]"
117
-
}
118
-
===
75
+
Contoso Electronics offers two health plans: Northwind Health Plus and Northwind Standard [doc1]. Northwind Health Plus is a comprehensive plan that provides coverage for medical, vision, and dental services, prescription drug coverage, mental health and substance abuse coverage, and coverage for preventive care services. It also offers coverage for emergency services, both in-network and out-of-network. On the other hand, Northwind Standard is a basic plan that provides coverage for medical, vision, and dental services, prescription drug coverage, and coverage for preventive care services. However, it does not offer coverage for emergency services, mental health and substance abuse coverage, or out-of-network services [doc1].
76
+
77
+
Intent: ["What are the available health plans?", "List of health plans available", "Health insurance options", "Types of health plans offered"]
78
+
79
+
Citation:
80
+
Contoso Electronics plan and benefit packages
81
+
82
+
Thank you for your interest in the Contoso electronics plan and benefit packages. Use this document to
83
+
84
+
learn more about the various options available to you...// Omitted for brevity
119
85
```
120
86
121
87
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.
0 commit comments