Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/ai/quickstarts/structured-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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<T>`:

:::code language="csharp" source="./snippets/structured-output/Program.cs" id="RecordRequest":::
Expand Down