Table of Contents

Class ObjectExtensions

Namespace
GenerativeAI
Assembly
GenerativeAI.dll

Provides extension methods for working with objects in the GenerativeAI library. Includes utilities for converting objects into schema representations.

public static class ObjectExtensions
Inheritance
ObjectExtensions
Inherited Members

Methods

ToSchema(object, JsonSerializerOptions?)

Converts an object to a Schema representation. This method evaluates the properties and structure of the provided object and generates a corresponding schema representation.

public static Schema ToSchema(this object obj, JsonSerializerOptions? options = null)

Parameters

obj object

The object to be converted into a schema representation.

options JsonSerializerOptions

Optional JSON serializer options for customizing the schema generation.

Returns

Schema

A Schema instance that represents the structure of the provided object.