Partager via


AIJsonUtilities.ResolveParameterJsonSchema Method

Definition

Determines a JSON schema for the provided parameter metadata.

public static System.Text.Json.JsonElement ResolveParameterJsonSchema (Microsoft.Extensions.AI.AIFunctionParameterMetadata parameterMetadata, Microsoft.Extensions.AI.AIFunctionMetadata functionMetadata, System.Text.Json.JsonSerializerOptions? serializerOptions = default, Microsoft.Extensions.AI.AIJsonSchemaCreateOptions? inferenceOptions = default);
static member ResolveParameterJsonSchema : Microsoft.Extensions.AI.AIFunctionParameterMetadata * Microsoft.Extensions.AI.AIFunctionMetadata * System.Text.Json.JsonSerializerOptions * Microsoft.Extensions.AI.AIJsonSchemaCreateOptions -> System.Text.Json.JsonElement
Public Function ResolveParameterJsonSchema (parameterMetadata As AIFunctionParameterMetadata, functionMetadata As AIFunctionMetadata, Optional serializerOptions As JsonSerializerOptions = Nothing, Optional inferenceOptions As AIJsonSchemaCreateOptions = Nothing) As JsonElement

Parameters

parameterMetadata
AIFunctionParameterMetadata

The parameter metadata from which to infer the schema.

functionMetadata
AIFunctionMetadata

The containing function metadata.

serializerOptions
JsonSerializerOptions

The options used to extract the schema from the specified type.

inferenceOptions
AIJsonSchemaCreateOptions

The options controlling schema inference.

Returns

A JSON schema document encoded as a JsonElement.

Applies to