diff --git a/docs/global.json b/docs/global.json new file mode 100644 index 000000000..6d1a5f4a6 --- /dev/null +++ b/docs/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "10.*-rc*" + } +} \ No newline at end of file diff --git a/docs/overview/responses/developer_quickstart.cs b/docs/overview/responses/developer_quickstart.cs new file mode 100644 index 000000000..37bdf595d --- /dev/null +++ b/docs/overview/responses/developer_quickstart.cs @@ -0,0 +1,15 @@ +// SAMPLE: Generate text from a simple prompt through Responses API +// PAGE: https://platform.openai.com/docs/overview +// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start +#pragma warning disable OPENAI001 + +#:package OpenAI@2.* +#:property PublishAot=false + +using OpenAI.Responses; + +string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!; +OpenAIResponseClient client = new(model: "gpt-5", apiKey: key); +OpenAIResponse response = client.CreateResponse("Write a short bedtime story about a unicorn."); + +Console.WriteLine(response.GetOutputText()); \ No newline at end of file