We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64980db commit f798c26Copy full SHA for f798c26
docs/guides/text/chat/chat_simpleprompt.cs
@@ -1,5 +1,6 @@
1
// SAMPLE: Generate text from a simple prompt
2
-// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
+// GUIDANCE: https://platform.openai.com/docs/guides/text?api-mode=chat
3
+// HOWTO: Instructions to run this code: https://aka.ms/oai/net/start
4
#:package OpenAI@2.2.*-*
5
#:property PublishAot false
6
@@ -8,4 +9,4 @@
8
9
string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;
10
ChatClient client = new("gpt-4.1", key);
11
ChatCompletion acompletion = client.CompleteChat("Write a one-sentence bedtime story about a unicorn.");
-Console.WriteLine(acompletion.Content[0].Text);
12
+Console.WriteLine(acompletion.Content[0].Text);
0 commit comments