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/quickstarts/quickstart-openai-summarize-text.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,24 @@ Complete the following steps to create a .NET console app to connect to an AI se
81
81
82
82
:::zone-end
83
83
84
+
:::zone target="docs" pivot="openai"
85
+
86
+
1. From a terminal or command prompt, run the following commands to configure your OpenAI API key as a secret for the sample app:
87
+
88
+
```bash
89
+
dotnet user-secrets init
90
+
dotnet user-secrets set OpenAIKey <your-openai-key>
91
+
```
92
+
93
+
1. Use the `dotnet run` command to run the app:
94
+
95
+
```dotnetcli
96
+
dotnet run
97
+
```
98
+
99
+
:::zone-end
100
+
101
+
84
102
## Add the app code
85
103
86
104
The app uses the [`Microsoft.SemanticKernel`](https://www.nuget.org/packages/Microsoft.SemanticKernel) package to send and receive requests to the OpenAI service.
0 commit comments