ChatResponseFormat.ForJsonSchema(String, String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a ChatResponseFormatJson representing structured JSON data with the specified schema.
public static Microsoft.Extensions.AI.ChatResponseFormatJson ForJsonSchema (string schema, string? schemaName = default, string? schemaDescription = default);
static member ForJsonSchema : string * string * string -> Microsoft.Extensions.AI.ChatResponseFormatJson
Public Shared Function ForJsonSchema (schema As String, Optional schemaName As String = Nothing, Optional schemaDescription As String = Nothing) As ChatResponseFormatJson
Parameters
- schema
- String
The JSON schema.
- schemaName
- String
An optional name of the schema, e.g. if the schema represents a particular class, this could be the name of the class.
- schemaDescription
- String
An optional description of the schema.
Returns
The ChatResponseFormatJson instance.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.