From 79afd92ca760793c853fd8858b6485193a52e39a Mon Sep 17 00:00:00 2001 From: Justin Yoo Date: Fri, 12 Sep 2025 17:46:35 +0900 Subject: [PATCH 1/5] Add code samples for quickstart --- docs/global.json | 5 +++ .../analyze_images_files_file_url.cs | 27 ++++++++++++ .../analyze_images_files_image_url.cs | 20 +++++++++ .../analyze_images_files_upload_file.cs | 25 +++++++++++ docs/quickstart/developer_quickstart.cs | 15 +++++++ .../extend_model_with_tools_file_search.cs | 23 ++++++++++ ...xtend_model_with_tools_function_calling.cs | 43 +++++++++++++++++++ .../extend_model_with_tools_remote_mcp.cs | 27 ++++++++++++ .../extend_model_with_tools_web_search.cs | 23 ++++++++++ .../stream_responses_build_realtime_apps.cs | 27 ++++++++++++ 10 files changed, 235 insertions(+) create mode 100644 docs/global.json create mode 100644 docs/quickstart/analyze_images_files_file_url.cs create mode 100644 docs/quickstart/analyze_images_files_image_url.cs create mode 100644 docs/quickstart/analyze_images_files_upload_file.cs create mode 100644 docs/quickstart/developer_quickstart.cs create mode 100644 docs/quickstart/extend_model_with_tools_file_search.cs create mode 100644 docs/quickstart/extend_model_with_tools_function_calling.cs create mode 100644 docs/quickstart/extend_model_with_tools_remote_mcp.cs create mode 100644 docs/quickstart/extend_model_with_tools_web_search.cs create mode 100644 docs/quickstart/stream_responses_build_realtime_apps.cs 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/quickstart/analyze_images_files_file_url.cs b/docs/quickstart/analyze_images_files_file_url.cs new file mode 100644 index 000000000..376ef6647 --- /dev/null +++ b/docs/quickstart/analyze_images_files_file_url.cs @@ -0,0 +1,27 @@ +// SAMPLE: Generate response from a file URL +// PAGE: https://platform.openai.com/docs/quickstart?input-type=file-url#analyze-images-and-files +// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start +#pragma warning disable OPENAI001 + +#:package OpenAI@2.* +#:property PublishAot=false + +using OpenAI.Files; +using OpenAI.Responses; + +string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!; +OpenAIResponseClient client = new(model: "gpt-5", apiKey: key); + +using HttpClient http = new(); +using Stream stream = await http.GetStreamAsync("https://www.berkshirehathaway.com/letters/2024ltr.pdf"); +OpenAIFileClient files = new(key); +OpenAIFile file = files.UploadFile(stream, "2024ltr.pdf", FileUploadPurpose.UserData); + +OpenAIResponse response = (OpenAIResponse)client.CreateResponse([ + ResponseItem.CreateUserMessageItem([ + ResponseContentPart.CreateInputTextPart("Analyze the letter and provide a summary of the key points."), + ResponseContentPart.CreateInputFilePart(file.Id) + ]) +]); + +Console.WriteLine(response.GetOutputText()); \ No newline at end of file diff --git a/docs/quickstart/analyze_images_files_image_url.cs b/docs/quickstart/analyze_images_files_image_url.cs new file mode 100644 index 000000000..573b766b4 --- /dev/null +++ b/docs/quickstart/analyze_images_files_image_url.cs @@ -0,0 +1,20 @@ +// SAMPLE: Generate response from an image URL +// PAGE: https://platform.openai.com/docs/quickstart?input-type=image-url#analyze-images-and-files +// 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 = (OpenAIResponse)client.CreateResponse([ + ResponseItem.CreateUserMessageItem([ + ResponseContentPart.CreateInputTextPart("What is in this image?"), + ResponseContentPart.CreateInputImagePart(new Uri("https://openai-documentation.vercel.app/images/cat_and_otter.png")) + ]) +]); + +Console.WriteLine(response.GetOutputText()); \ No newline at end of file diff --git a/docs/quickstart/analyze_images_files_upload_file.cs b/docs/quickstart/analyze_images_files_upload_file.cs new file mode 100644 index 000000000..a9b0f7421 --- /dev/null +++ b/docs/quickstart/analyze_images_files_upload_file.cs @@ -0,0 +1,25 @@ +// SAMPLE: Generate response from a file upload +// PAGE: https://platform.openai.com/docs/quickstart?input-type=file-upload#analyze-images-and-files +// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start +#pragma warning disable OPENAI001 + +#:package OpenAI@2.* +#:property PublishAot=false + +using OpenAI.Files; +using OpenAI.Responses; + +string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!; +OpenAIResponseClient client = new(model: "gpt-5", apiKey: key); + +OpenAIFileClient files = new(key); +OpenAIFile file = files.UploadFile("draconomicon.pdf", FileUploadPurpose.UserData); + +OpenAIResponse response = (OpenAIResponse)client.CreateResponse([ + ResponseItem.CreateUserMessageItem([ + ResponseContentPart.CreateInputFilePart(file.Id), + ResponseContentPart.CreateInputTextPart("What is the first dragon in the book?") + ]) +]); + +Console.WriteLine(response.GetOutputText()); \ No newline at end of file diff --git a/docs/quickstart/developer_quickstart.cs b/docs/quickstart/developer_quickstart.cs new file mode 100644 index 000000000..68254cc2f --- /dev/null +++ b/docs/quickstart/developer_quickstart.cs @@ -0,0 +1,15 @@ +// SAMPLE: Generate text from a simple prompt +// PAGE: https://platform.openai.com/docs/quickstart +// 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 one-sentence bedtime story about a unicorn."); + +Console.WriteLine(response.GetOutputText()); \ No newline at end of file diff --git a/docs/quickstart/extend_model_with_tools_file_search.cs b/docs/quickstart/extend_model_with_tools_file_search.cs new file mode 100644 index 000000000..f14020c22 --- /dev/null +++ b/docs/quickstart/extend_model_with_tools_file_search.cs @@ -0,0 +1,23 @@ +// SAMPLE: Generate response from file search +// PAGE: https://platform.openai.com/docs/quickstart?tool-type=file-search#extend-the-model-with-tools +// 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); + +ResponseCreationOptions options = new(); +options.Tools.Add(ResponseTool.CreateFileSearchTool([ "" ])); + +OpenAIResponse response = (OpenAIResponse)client.CreateResponse([ + ResponseItem.CreateUserMessageItem([ + ResponseContentPart.CreateInputTextPart("What is deep research by OpenAI?") + ]) +], options); + +Console.WriteLine(response.GetOutputText()); \ No newline at end of file diff --git a/docs/quickstart/extend_model_with_tools_function_calling.cs b/docs/quickstart/extend_model_with_tools_function_calling.cs new file mode 100644 index 000000000..1239b9f06 --- /dev/null +++ b/docs/quickstart/extend_model_with_tools_function_calling.cs @@ -0,0 +1,43 @@ +// SAMPLE: Generate response from function calling +// PAGE: https://platform.openai.com/docs/quickstart?tool-type=function-calling#extend-the-model-with-tools +// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start +#pragma warning disable OPENAI001 + +#:package OpenAI@2.* +#:property PublishAot=false + +using System.Text.Json; +using OpenAI.Responses; + +string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!; +OpenAIResponseClient client = new(model: "gpt-5", apiKey: key); + +ResponseCreationOptions options = new(); +options.Tools.Add(ResponseTool.CreateFunctionTool( + functionName: "get_weather", + functionDescription: "Get current temperature for a given location.", + functionParameters: BinaryData.FromObjectAsJson(new + { + type = "object", + properties = new + { + location = new + { + type = "string", + description = "City and country e.g. Bogotá, Colombia", + } + }, + required = new[] { "location" }, + additionalProperties = false + }), + strictModeEnabled: true + ) +); + +OpenAIResponse response = (OpenAIResponse)client.CreateResponse([ + ResponseItem.CreateUserMessageItem([ + ResponseContentPart.CreateInputTextPart("What is the weather like in Paris today?") + ]) +], options); + +Console.WriteLine(JsonSerializer.Serialize(response.OutputItems[0])); \ No newline at end of file diff --git a/docs/quickstart/extend_model_with_tools_remote_mcp.cs b/docs/quickstart/extend_model_with_tools_remote_mcp.cs new file mode 100644 index 000000000..0cd55ad41 --- /dev/null +++ b/docs/quickstart/extend_model_with_tools_remote_mcp.cs @@ -0,0 +1,27 @@ +// SAMPLE: Generate response from remote MCP +// PAGE: https://platform.openai.com/docs/quickstart?tool-type=remote-mcp#extend-the-model-with-tools +// 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); + +ResponseCreationOptions options = new(); +options.Tools.Add(ResponseTool.CreateMcpTool( + serverLabel: "dmcp", + serverUri: new Uri("https://dmcp-server.deno.dev/sse"), + toolCallApprovalPolicy: new McpToolCallApprovalPolicy(GlobalMcpToolCallApprovalPolicy.NeverRequireApproval) +)); + +OpenAIResponse response = (OpenAIResponse)client.CreateResponse([ + ResponseItem.CreateUserMessageItem([ + ResponseContentPart.CreateInputTextPart("Roll 2d4+1") + ]) +], options); + +Console.WriteLine(response.GetOutputText()); \ No newline at end of file diff --git a/docs/quickstart/extend_model_with_tools_web_search.cs b/docs/quickstart/extend_model_with_tools_web_search.cs new file mode 100644 index 000000000..24aec7f4a --- /dev/null +++ b/docs/quickstart/extend_model_with_tools_web_search.cs @@ -0,0 +1,23 @@ +// SAMPLE: Generate response from web search +// PAGE: https://platform.openai.com/docs/quickstart?tool-type=web-search#extend-the-model-with-tools +// 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); + +ResponseCreationOptions options = new(); +options.Tools.Add(ResponseTool.CreateWebSearchTool()); + +OpenAIResponse response = (OpenAIResponse)client.CreateResponse([ + ResponseItem.CreateUserMessageItem([ + ResponseContentPart.CreateInputTextPart("What was a positive news story from today?") + ]) +], options); + +Console.WriteLine(response.GetOutputText()); \ No newline at end of file diff --git a/docs/quickstart/stream_responses_build_realtime_apps.cs b/docs/quickstart/stream_responses_build_realtime_apps.cs new file mode 100644 index 000000000..b1e934c00 --- /dev/null +++ b/docs/quickstart/stream_responses_build_realtime_apps.cs @@ -0,0 +1,27 @@ +// SAMPLE: Generate streaming response for realtime apps +// PAGE: https://platform.openai.com/docs/quickstart#stream-responses-and-build-realtime-apps +// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start +#pragma warning disable OPENAI001 + +#:package System.Linq.Async@6.* +#:package OpenAI@2.* +#:property PublishAot=false + +using OpenAI.Responses; + +string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!; +OpenAIResponseClient client = new(model: "gpt-4.1", apiKey: key); + +var responses = client.CreateResponseStreamingAsync([ + ResponseItem.CreateUserMessageItem([ + ResponseContentPart.CreateInputTextPart("Say 'double bubble bath' ten times fast.") + ]) +]); + +await foreach (var response in responses) +{ + if (response is StreamingResponseOutputTextDeltaUpdate delta) + { + Console.Write(delta.Delta); + } +} From 8773c43006cb2adaefabf5acbc1fc8c2fc58d284 Mon Sep 17 00:00:00 2001 From: Justin Yoo Date: Fri, 12 Sep 2025 17:55:46 +0900 Subject: [PATCH 2/5] Update the model version to GPT 5 --- docs/quickstart/stream_responses_build_realtime_apps.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quickstart/stream_responses_build_realtime_apps.cs b/docs/quickstart/stream_responses_build_realtime_apps.cs index b1e934c00..bdf9021fc 100644 --- a/docs/quickstart/stream_responses_build_realtime_apps.cs +++ b/docs/quickstart/stream_responses_build_realtime_apps.cs @@ -10,7 +10,7 @@ using OpenAI.Responses; string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!; -OpenAIResponseClient client = new(model: "gpt-4.1", apiKey: key); +OpenAIResponseClient client = new(model: "gpt-5", apiKey: key); var responses = client.CreateResponseStreamingAsync([ ResponseItem.CreateUserMessageItem([ From 5cd77b117aa58edfcbcca4dbe4c66eedec10386a Mon Sep 17 00:00:00 2001 From: Justin Yoo Date: Sat, 13 Sep 2025 11:54:18 +0900 Subject: [PATCH 3/5] Explicitly mention using Responses API --- docs/quickstart/analyze_images_files_file_url.cs | 2 +- docs/quickstart/analyze_images_files_image_url.cs | 2 +- docs/quickstart/analyze_images_files_upload_file.cs | 2 +- docs/quickstart/developer_quickstart.cs | 2 +- docs/quickstart/extend_model_with_tools_file_search.cs | 2 +- docs/quickstart/extend_model_with_tools_function_calling.cs | 2 +- docs/quickstart/extend_model_with_tools_remote_mcp.cs | 2 +- docs/quickstart/extend_model_with_tools_web_search.cs | 2 +- docs/quickstart/stream_responses_build_realtime_apps.cs | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/quickstart/analyze_images_files_file_url.cs b/docs/quickstart/analyze_images_files_file_url.cs index 376ef6647..487bc0818 100644 --- a/docs/quickstart/analyze_images_files_file_url.cs +++ b/docs/quickstart/analyze_images_files_file_url.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from a file URL +// SAMPLE: Generate response from a file URL through Responses API // PAGE: https://platform.openai.com/docs/quickstart?input-type=file-url#analyze-images-and-files // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/analyze_images_files_image_url.cs b/docs/quickstart/analyze_images_files_image_url.cs index 573b766b4..d8a9d8797 100644 --- a/docs/quickstart/analyze_images_files_image_url.cs +++ b/docs/quickstart/analyze_images_files_image_url.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from an image URL +// SAMPLE: Generate response from an image URL through Responses API // PAGE: https://platform.openai.com/docs/quickstart?input-type=image-url#analyze-images-and-files // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/analyze_images_files_upload_file.cs b/docs/quickstart/analyze_images_files_upload_file.cs index a9b0f7421..714729704 100644 --- a/docs/quickstart/analyze_images_files_upload_file.cs +++ b/docs/quickstart/analyze_images_files_upload_file.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from a file upload +// SAMPLE: Generate response from a file upload through Responses API // PAGE: https://platform.openai.com/docs/quickstart?input-type=file-upload#analyze-images-and-files // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/developer_quickstart.cs b/docs/quickstart/developer_quickstart.cs index 68254cc2f..24a747787 100644 --- a/docs/quickstart/developer_quickstart.cs +++ b/docs/quickstart/developer_quickstart.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate text from a simple prompt +// SAMPLE: Generate text from a simple prompt through Responses API // PAGE: https://platform.openai.com/docs/quickstart // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/extend_model_with_tools_file_search.cs b/docs/quickstart/extend_model_with_tools_file_search.cs index f14020c22..24d97b5e4 100644 --- a/docs/quickstart/extend_model_with_tools_file_search.cs +++ b/docs/quickstart/extend_model_with_tools_file_search.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from file search +// SAMPLE: Generate response from file search through Responses API // PAGE: https://platform.openai.com/docs/quickstart?tool-type=file-search#extend-the-model-with-tools // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/extend_model_with_tools_function_calling.cs b/docs/quickstart/extend_model_with_tools_function_calling.cs index 1239b9f06..3b7061a85 100644 --- a/docs/quickstart/extend_model_with_tools_function_calling.cs +++ b/docs/quickstart/extend_model_with_tools_function_calling.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from function calling +// SAMPLE: Generate response from function calling through Responses API // PAGE: https://platform.openai.com/docs/quickstart?tool-type=function-calling#extend-the-model-with-tools // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/extend_model_with_tools_remote_mcp.cs b/docs/quickstart/extend_model_with_tools_remote_mcp.cs index 0cd55ad41..8ebaaaec8 100644 --- a/docs/quickstart/extend_model_with_tools_remote_mcp.cs +++ b/docs/quickstart/extend_model_with_tools_remote_mcp.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from remote MCP +// SAMPLE: Generate response from remote MCP through Responses API // PAGE: https://platform.openai.com/docs/quickstart?tool-type=remote-mcp#extend-the-model-with-tools // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/extend_model_with_tools_web_search.cs b/docs/quickstart/extend_model_with_tools_web_search.cs index 24aec7f4a..5966a8138 100644 --- a/docs/quickstart/extend_model_with_tools_web_search.cs +++ b/docs/quickstart/extend_model_with_tools_web_search.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from web search +// SAMPLE: Generate response from web search through Responses API // PAGE: https://platform.openai.com/docs/quickstart?tool-type=web-search#extend-the-model-with-tools // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/stream_responses_build_realtime_apps.cs b/docs/quickstart/stream_responses_build_realtime_apps.cs index bdf9021fc..640f62a08 100644 --- a/docs/quickstart/stream_responses_build_realtime_apps.cs +++ b/docs/quickstart/stream_responses_build_realtime_apps.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate streaming response for realtime apps +// SAMPLE: Generate streaming response for realtime apps through Responses API // PAGE: https://platform.openai.com/docs/quickstart#stream-responses-and-build-realtime-apps // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 From 19b14d8d9667e37991e9c7bbf9bda00760baf042 Mon Sep 17 00:00:00 2001 From: Justin Yoo Date: Sat, 13 Sep 2025 12:13:30 +0900 Subject: [PATCH 4/5] Update the folder structure --- docs/quickstart/{ => responses}/analyze_images_files_file_url.cs | 0 docs/quickstart/{ => responses}/analyze_images_files_image_url.cs | 0 .../{ => responses}/analyze_images_files_upload_file.cs | 0 docs/quickstart/{ => responses}/developer_quickstart.cs | 0 .../{ => responses}/extend_model_with_tools_file_search.cs | 0 .../{ => responses}/extend_model_with_tools_function_calling.cs | 0 .../{ => responses}/extend_model_with_tools_remote_mcp.cs | 0 .../{ => responses}/extend_model_with_tools_web_search.cs | 0 .../{ => responses}/stream_responses_build_realtime_apps.cs | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename docs/quickstart/{ => responses}/analyze_images_files_file_url.cs (100%) rename docs/quickstart/{ => responses}/analyze_images_files_image_url.cs (100%) rename docs/quickstart/{ => responses}/analyze_images_files_upload_file.cs (100%) rename docs/quickstart/{ => responses}/developer_quickstart.cs (100%) rename docs/quickstart/{ => responses}/extend_model_with_tools_file_search.cs (100%) rename docs/quickstart/{ => responses}/extend_model_with_tools_function_calling.cs (100%) rename docs/quickstart/{ => responses}/extend_model_with_tools_remote_mcp.cs (100%) rename docs/quickstart/{ => responses}/extend_model_with_tools_web_search.cs (100%) rename docs/quickstart/{ => responses}/stream_responses_build_realtime_apps.cs (100%) diff --git a/docs/quickstart/analyze_images_files_file_url.cs b/docs/quickstart/responses/analyze_images_files_file_url.cs similarity index 100% rename from docs/quickstart/analyze_images_files_file_url.cs rename to docs/quickstart/responses/analyze_images_files_file_url.cs diff --git a/docs/quickstart/analyze_images_files_image_url.cs b/docs/quickstart/responses/analyze_images_files_image_url.cs similarity index 100% rename from docs/quickstart/analyze_images_files_image_url.cs rename to docs/quickstart/responses/analyze_images_files_image_url.cs diff --git a/docs/quickstart/analyze_images_files_upload_file.cs b/docs/quickstart/responses/analyze_images_files_upload_file.cs similarity index 100% rename from docs/quickstart/analyze_images_files_upload_file.cs rename to docs/quickstart/responses/analyze_images_files_upload_file.cs diff --git a/docs/quickstart/developer_quickstart.cs b/docs/quickstart/responses/developer_quickstart.cs similarity index 100% rename from docs/quickstart/developer_quickstart.cs rename to docs/quickstart/responses/developer_quickstart.cs diff --git a/docs/quickstart/extend_model_with_tools_file_search.cs b/docs/quickstart/responses/extend_model_with_tools_file_search.cs similarity index 100% rename from docs/quickstart/extend_model_with_tools_file_search.cs rename to docs/quickstart/responses/extend_model_with_tools_file_search.cs diff --git a/docs/quickstart/extend_model_with_tools_function_calling.cs b/docs/quickstart/responses/extend_model_with_tools_function_calling.cs similarity index 100% rename from docs/quickstart/extend_model_with_tools_function_calling.cs rename to docs/quickstart/responses/extend_model_with_tools_function_calling.cs diff --git a/docs/quickstart/extend_model_with_tools_remote_mcp.cs b/docs/quickstart/responses/extend_model_with_tools_remote_mcp.cs similarity index 100% rename from docs/quickstart/extend_model_with_tools_remote_mcp.cs rename to docs/quickstart/responses/extend_model_with_tools_remote_mcp.cs diff --git a/docs/quickstart/extend_model_with_tools_web_search.cs b/docs/quickstart/responses/extend_model_with_tools_web_search.cs similarity index 100% rename from docs/quickstart/extend_model_with_tools_web_search.cs rename to docs/quickstart/responses/extend_model_with_tools_web_search.cs diff --git a/docs/quickstart/stream_responses_build_realtime_apps.cs b/docs/quickstart/responses/stream_responses_build_realtime_apps.cs similarity index 100% rename from docs/quickstart/stream_responses_build_realtime_apps.cs rename to docs/quickstart/responses/stream_responses_build_realtime_apps.cs From ce887d5bf4c4606359c3db2220e35572dc6b6184 Mon Sep 17 00:00:00 2001 From: Justin Yoo Date: Sat, 13 Sep 2025 13:35:37 +0900 Subject: [PATCH 5/5] Update the summary of sample codes --- docs/quickstart/responses/analyze_images_files_file_url.cs | 2 +- docs/quickstart/responses/analyze_images_files_image_url.cs | 2 +- docs/quickstart/responses/analyze_images_files_upload_file.cs | 2 +- .../quickstart/responses/extend_model_with_tools_file_search.cs | 2 +- docs/quickstart/responses/extend_model_with_tools_web_search.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/quickstart/responses/analyze_images_files_file_url.cs b/docs/quickstart/responses/analyze_images_files_file_url.cs index 487bc0818..3691e24e3 100644 --- a/docs/quickstart/responses/analyze_images_files_file_url.cs +++ b/docs/quickstart/responses/analyze_images_files_file_url.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from a file URL through Responses API +// SAMPLE: Analyzes file from a file URL through Responses API // PAGE: https://platform.openai.com/docs/quickstart?input-type=file-url#analyze-images-and-files // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/responses/analyze_images_files_image_url.cs b/docs/quickstart/responses/analyze_images_files_image_url.cs index d8a9d8797..07c8c8954 100644 --- a/docs/quickstart/responses/analyze_images_files_image_url.cs +++ b/docs/quickstart/responses/analyze_images_files_image_url.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from an image URL through Responses API +// SAMPLE: Analyzes image from an image URL through Responses API // PAGE: https://platform.openai.com/docs/quickstart?input-type=image-url#analyze-images-and-files // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/responses/analyze_images_files_upload_file.cs b/docs/quickstart/responses/analyze_images_files_upload_file.cs index 714729704..aff63a8ec 100644 --- a/docs/quickstart/responses/analyze_images_files_upload_file.cs +++ b/docs/quickstart/responses/analyze_images_files_upload_file.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from a file upload through Responses API +// SAMPLE: Analyzes file from a file upload through Responses API // PAGE: https://platform.openai.com/docs/quickstart?input-type=file-upload#analyze-images-and-files // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/responses/extend_model_with_tools_file_search.cs b/docs/quickstart/responses/extend_model_with_tools_file_search.cs index 24d97b5e4..8bc882eeb 100644 --- a/docs/quickstart/responses/extend_model_with_tools_file_search.cs +++ b/docs/quickstart/responses/extend_model_with_tools_file_search.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from file search through Responses API +// SAMPLE: Get information from file search through Responses API // PAGE: https://platform.openai.com/docs/quickstart?tool-type=file-search#extend-the-model-with-tools // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001 diff --git a/docs/quickstart/responses/extend_model_with_tools_web_search.cs b/docs/quickstart/responses/extend_model_with_tools_web_search.cs index 5966a8138..8eb3a339a 100644 --- a/docs/quickstart/responses/extend_model_with_tools_web_search.cs +++ b/docs/quickstart/responses/extend_model_with_tools_web_search.cs @@ -1,4 +1,4 @@ -// SAMPLE: Generate response from web search through Responses API +// SAMPLE: Get information from web search through Responses API // PAGE: https://platform.openai.com/docs/quickstart?tool-type=web-search#extend-the-model-with-tools // GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start #pragma warning disable OPENAI001