From 9c96c51464d625b07f1909fe6830aeda68d352b9 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 25 Aug 2025 15:08:28 -0700 Subject: [PATCH 1/2] Clarify record type definition with primary constructors --- docs/ai/quickstarts/structured-output.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/ai/quickstarts/structured-output.md b/docs/ai/quickstarts/structured-output.md index f1c5727200748..a7cc04cbcac00 100644 --- a/docs/ai/quickstarts/structured-output.md +++ b/docs/ai/quickstarts/structured-output.md @@ -93,10 +93,12 @@ Complete the following steps to create a console app that connects to the `gpt-4 1. And instead of requesting just the analyzed enumeration value, you can request the text response along with the analyzed value. - Define a record type to contain the text response and analyzed sentiment: + Define a [record type](../../csharp/language-reference/builtin-types/record.md) to contain the text response and analyzed sentiment: :::code language="csharp" source="./snippets/structured-output/Program.cs" id="InputOutputRecord"::: + (This record type is defined using [primary constructor](../../csharp/programming-guide/classes-and-structs/instance-constructors.md#primary-constructors) syntax. Primary constructors, which are available in C# 12 and later versions, combine the class definition with the parameters that are necessary to instantiate any instance of the class. The C# compiler generates public properties for the primary constructor parameters.) + Send the request using the record type as the type argument to `GetResponseAsync`: :::code language="csharp" source="./snippets/structured-output/Program.cs" id="RecordRequest"::: From 7402fe848acc83bcff56da2863cbe60bc8324968 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 27 Aug 2025 11:20:20 -0700 Subject: [PATCH 2/2] Update docs/ai/quickstarts/structured-output.md Co-authored-by: Bill Wagner --- docs/ai/quickstarts/structured-output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ai/quickstarts/structured-output.md b/docs/ai/quickstarts/structured-output.md index a7cc04cbcac00..7596a75410074 100644 --- a/docs/ai/quickstarts/structured-output.md +++ b/docs/ai/quickstarts/structured-output.md @@ -97,7 +97,7 @@ Complete the following steps to create a console app that connects to the `gpt-4 :::code language="csharp" source="./snippets/structured-output/Program.cs" id="InputOutputRecord"::: - (This record type is defined using [primary constructor](../../csharp/programming-guide/classes-and-structs/instance-constructors.md#primary-constructors) syntax. Primary constructors, which are available in C# 12 and later versions, combine the class definition with the parameters that are necessary to instantiate any instance of the class. The C# compiler generates public properties for the primary constructor parameters.) + (This record type is defined using [primary constructor](../../csharp/programming-guide/classes-and-structs/instance-constructors.md#primary-constructors) syntax. Primary constructors combine the type definition with the parameters necessary to instantiate any instance of the class. The C# compiler generates public properties for the primary constructor parameters.) Send the request using the record type as the type argument to `GetResponseAsync`: