AIJsonUtilities.CreateFunctionJsonSchema Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Określa schemat JSON dla podanej metody.
public static System.Text.Json.JsonElement CreateFunctionJsonSchema(System.Reflection.MethodBase method, string? title = default, string? description = default, System.Text.Json.JsonSerializerOptions? serializerOptions = default, Microsoft.Extensions.AI.AIJsonSchemaCreateOptions? inferenceOptions = default);
static member CreateFunctionJsonSchema : System.Reflection.MethodBase * string * string * System.Text.Json.JsonSerializerOptions * Microsoft.Extensions.AI.AIJsonSchemaCreateOptions -> System.Text.Json.JsonElement
Public Function CreateFunctionJsonSchema (method As MethodBase, Optional title As String = Nothing, Optional description As String = Nothing, Optional serializerOptions As JsonSerializerOptions = Nothing, Optional inferenceOptions As AIJsonSchemaCreateOptions = Nothing) As JsonElement
Parametry
- method
- MethodBase
Metoda, z której mają być wyodrębnione informacje o schemacie.
- title
- String
Słowo kluczowe tytułu używane przez schemat metody.
- description
- String
Słowo kluczowe opisu używane przez schemat metody.
- serializerOptions
- JsonSerializerOptions
Opcje używane do wyodrębniania schematu z określonego typu.
- inferenceOptions
- AIJsonSchemaCreateOptions
Opcje kontrolujące tworzenie schematu.
Zwraca
Dokument schematu JSON zakodowany JsonElementjako .
Wyjątki
Parametr method ma wartość null.