ChatResponseFormat Classe
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Représente le format de réponse souhaité par l’appelant.
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
- Héritage
-
ChatResponseFormat
- Dérivé
- Attributs
Propriétés
| Nom | Description |
|---|---|
| Json |
Obtient une instance singleton représentant des données JSON structurées, mais sans schéma particulier. |
| Text |
Obtient une instance singleton représentant des données textuelles non structurées. |
Méthodes
| Nom | Description |
|---|---|
| ForJsonSchema(JsonElement, String, String) |
Crée une ChatResponseFormatJson représentation de données JSON structurées avec le schéma spécifié. |
| ForJsonSchema(Type, JsonSerializerOptions, String, String) |
Crée une ChatResponseFormatJson représentation de données JSON structurées avec un schéma basé sur |
| ForJsonSchema<T>(JsonSerializerOptions, String, String) |
Crée une ChatResponseFormatJson représentation de données JSON structurées avec un schéma basé sur |
Méthodes d’extension
| Nom | Description |
|---|---|
| AsOpenAIChatResponseFormat(ChatResponseFormat, ChatOptions) |
Crée un OpenAI ChatResponseFormat à partir d’un ChatResponseFormat. |
| AsOpenAIResponseTextFormat(ChatResponseFormat, ChatOptions) |
Crée un OpenAI ResponseTextFormat à partir d’un ChatResponseFormat. |