AIJsonSchemaTransformCache Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines a cache for JSON schemas transformed according to the specified AIJsonSchemaTransformOptions policy.
public ref class AIJsonSchemaTransformCache sealed
public sealed class AIJsonSchemaTransformCache
type AIJsonSchemaTransformCache = class
Public NotInheritable Class AIJsonSchemaTransformCache
- Inheritance
-
AIJsonSchemaTransformCache
Remarks
This cache stores weak references from AI abstractions that declare JSON schemas such as AIFunction or ChatResponseFormatJson to their corresponding JSON schemas transformed according to the specified TransformOptions policy. It is intended for use by IChatClient implementations that enforce vendor-specific restrictions on what constitutes a valid JSON schema for a given function or response format.
It is recommended IChatClient implementations with schema transformation requirements should create a single static instance of this cache.
Constructors
AIJsonSchemaTransformCache(AIJsonSchemaTransformOptions) |
Initializes a new instance of the AIJsonSchemaTransformCache class with the specified options. |
Properties
TransformOptions |
Gets the options governing schema transformation. |
Methods
GetOrCreateTransformedSchema(AIFunction) |
Gets or creates a transformed JSON schema for the specified AIFunction instance. |
GetOrCreateTransformedSchema(ChatResponseFormatJson) |
Gets or creates a transformed JSON schema for the specified ChatResponseFormatJson instance. |