Język

ChatResponseFormat Klasa

Definicja

Reprezentuje format odpowiedzi żądany przez obiekt wywołujący.

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
Dziedziczenie
ChatResponseFormat
Pochodne
Atrybuty

Właściwości

Nazwa Opis
Json

Pobiera pojedyncze wystąpienie reprezentujące dane JSON ze strukturą, ale bez żadnego konkretnego schematu.

Text

Pobiera pojedyncze wystąpienie reprezentujące dane tekstowe bez struktury.

Metody

Nazwa Opis
ForJsonSchema(JsonElement, String, String)

Tworzy reprezentację ChatResponseFormatJson danych JSON ze strukturą z określonym schematem.

ForJsonSchema(Type, JsonSerializerOptions, String, String)

Tworzy reprezentację ChatResponseFormatJson danych JSON ze strukturą ze schematem opartym na .schemaType

ForJsonSchema<T>(JsonSerializerOptions, String, String)

Tworzy reprezentację ChatResponseFormatJson danych JSON ze strukturą ze schematem opartym na .T

Metody rozszerzania

Nazwa Opis
AsOpenAIChatResponseFormat(ChatResponseFormat, ChatOptions)

Tworzy interfejs OpenAI ChatResponseFormat na podstawie elementu ChatResponseFormat.

AsOpenAIResponseTextFormat(ChatResponseFormat, ChatOptions)

Tworzy interfejs OpenAI ResponseTextFormat na podstawie elementu ChatResponseFormat.

Dotyczy