ChatResponseFormat Klasse

Definition

Stellt das Antwortformat dar, das vom Aufrufer gewünscht wird.

public ref class ChatResponseFormat
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.ChatResponseFormatText), "text")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.ChatResponseFormatJson), "json")]
[System.Text.Json.Serialization.JsonPolymorphic(TypeDiscriminatorPropertyName="$type")]
public class ChatResponseFormat
[<System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.ChatResponseFormatText), "text")>]
[<System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.ChatResponseFormatJson), "json")>]
[<System.Text.Json.Serialization.JsonPolymorphic(TypeDiscriminatorPropertyName="$type")>]
type ChatResponseFormat = class
Public Class ChatResponseFormat
Vererbung
ChatResponseFormat
Abgeleitet
Attribute

Eigenschaften

Name Beschreibung
Json

Ruft eine Singleton-Instanz ab, die strukturierte JSON-Daten darstellt, jedoch ohne ein bestimmtes Schema.

Text

Ruft eine Singleton-Instanz ab, die unstrukturierte Textdaten darstellt.

Methoden

Name Beschreibung
ForJsonSchema(JsonElement, String, String)

Erstellt eine ChatResponseFormatJson darstellung strukturierte JSON-Daten mit dem angegebenen Schema.

ForJsonSchema(Type, JsonSerializerOptions, String, String)

Erstellt eine ChatResponseFormatJson darstellung strukturierte JSON-Daten mit einem Schema basierend auf schemaType.

ForJsonSchema<T>(JsonSerializerOptions, String, String)

Erstellt eine ChatResponseFormatJson darstellung strukturierte JSON-Daten mit einem Schema basierend auf T.

Erweiterungsmethoden

Name Beschreibung
AsOpenAIChatResponseFormat(ChatResponseFormat, ChatOptions)

Erstellt ein OpenAI ChatResponseFormat aus einem ChatResponseFormat.

AsOpenAIResponseTextFormat(ChatResponseFormat, ChatOptions)

Erstellt ein OpenAI ResponseTextFormat aus einem ChatResponseFormat.

Gilt für: