ChatResponseFormat Klasse
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
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 |
| ForJsonSchema<T>(JsonSerializerOptions, String, String) |
Erstellt eine ChatResponseFormatJson darstellung strukturierte JSON-Daten mit einem Schema basierend auf |
Erweiterungsmethoden
| Name | Beschreibung |
|---|---|
| AsOpenAIChatResponseFormat(ChatResponseFormat, ChatOptions) |
Erstellt ein OpenAI ChatResponseFormat aus einem ChatResponseFormat. |
| AsOpenAIResponseTextFormat(ChatResponseFormat, ChatOptions) |
Erstellt ein OpenAI ResponseTextFormat aus einem ChatResponseFormat. |