Skip to content

Commit 02498d5

Browse files
authored
Clarify record type definition with primary constructors (#48110)
1 parent 6f4dab8 commit 02498d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/ai/quickstarts/structured-output.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ Complete the following steps to create a console app that connects to the `gpt-4
9393

9494
1. And instead of requesting just the analyzed enumeration value, you can request the text response along with the analyzed value.
9595

96-
Define a record type to contain the text response and analyzed sentiment:
96+
Define a [record type](../../csharp/language-reference/builtin-types/record.md) to contain the text response and analyzed sentiment:
9797

9898
:::code language="csharp" source="./snippets/structured-output/Program.cs" id="InputOutputRecord":::
9999

100+
(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.)
101+
100102
Send the request using the record type as the type argument to `GetResponseAsync<T>`:
101103

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

0 commit comments

Comments
 (0)