SchemaDefinition

org.llm4s.toolapi.SchemaDefinition
sealed trait SchemaDefinition[T]

Base trait for all JSON Schema definitions used in tool parameter specifications.

Each concrete subclass corresponds to a JSON Schema type and can be converted to a ujson.Value for inclusion in OpenAI-compatible tool definitions via SchemaDefinition.toJsonSchema.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ArraySchema[A]
class NullableSchema[T]
class NumberSchema
class ObjectSchema[T]
class StringSchema
Show all

Members list

Value members

Abstract methods

def toJsonSchema(strict: Boolean): Value

Serialise this schema to a JSON Schema ujson.Value.

Serialise this schema to a JSON Schema ujson.Value.

Value parameters

strict

When true, all object properties are treated as required, matching OpenAI strict-mode tool definitions.

Attributes