Freigeben über


ChatResponseFormat.ForJsonSchema(String, String, String) Method

Definition

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