@@ -35,10 +35,10 @@ $Result = Request-ChatCompletion `
3535 -Model "gpt-4o-2024-08-06" `
3636 -SystemMessage "You are a helpful math tutor. Guide the user through the solution step by step." `
3737 -Message "How can I solve 8x + 7 = 31" `
38- -Format ([MathReasoning])
38+ -ResponseFormat ([MathReasoning])
3939```
4040
41- The point is that the ` -Format ` parameter specifies the defined PowerShell class type ` [MathReasoning] ` .
41+ The point is that the ` -ResponseFormat ` parameter specifies the defined PowerShell class type ` [MathReasoning] ` .
4242This instructs the AI model to return an object of this type using Structured Ouputs mode.
4343
4444PSOpenAI deserialize the response and sets the ` Answer ` property to an object of the specified type.
@@ -153,7 +153,7 @@ $Result = Request-ChatCompletion `
153153 -Model "gpt-4o-2024-08-06" `
154154 -SystemMessage "You are an assistant who reads the meeting information from messages." `
155155 -Message $TextMessage `
156- -Format ([MeetingEvent])
156+ -ResponseFormat ([MeetingEvent])
157157
158158$Result.Answer[0]
159159#> Topics : {Details of the contract, Potential changes and price adjustments}
@@ -174,7 +174,7 @@ $Result.Answer[0].Attendees
174174## Use Structured Outputs with own JSON schema
175175
176176If using the built-in parser is not suitable, you can specify your own JSON schema directly.
177- Specify ` "json_schema" ` to ` -Format ` and a JSON schema string to ` -JsonSchema ` .
177+ Specify ` "json_schema" ` to ` -ResponseFormat ` and a JSON schema string to ` -JsonSchema ` .
178178
179179Please refer to the official OpenAI guide to creating your own JSON schema.
180180https://platform.openai.com/docs/guides/structured-outputs/supported-schemas
@@ -212,7 +212,7 @@ $ownJsonSchema = @'
212212$Result = Request-ChatCompletion `
213213 -Model "gpt-4o-mini" `
214214 -Message "9.11 and 9.9 -- which is bigger?" `
215- -Format "json_schema" `
215+ -ResponseFormat "json_schema" `
216216 -JsonSchema $ownJsonSchema
217217```
218218
0 commit comments