Schema

annotation class Schema(val value: String = "json", val withSchemaObject: Boolean = false)(source)

Annotation to define a schema for a class, type, or function.

This annotation is primarily used to associate a specific schema type with the annotated element. By default, it targets JSON Schema but can accommodate custom schema representations as well.

When applied to functions, generates FunctionCallingSchema for LLM function calling APIs.

Properties

Link copied to clipboard

Schema Type

Link copied to clipboard

Generate specific representation, e.g. JsonObject for JSON Schema.