ObjectSchema

org.llm4s.toolapi.ObjectSchema
case class ObjectSchema[T](description: String, properties: Seq[PropertyDefinition[_]], additionalProperties: Boolean) extends SchemaDefinition[T]

Object schema with properties

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait SchemaDefinition[T]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def toJsonSchema(strict: Boolean): Value
def withOptionalField[P](name: String, schema: SchemaDefinition[P]): ObjectSchema[T]

Add an optional field to the object schema

Add an optional field to the object schema

Value parameters

name

The name of the property

schema

The schema definition for the property

Attributes

Returns

A new ObjectSchema with the optional property added

def withProperty[P](property: PropertyDefinition[P]): ObjectSchema[T]
def withRequiredField[P](name: String, schema: SchemaDefinition[P]): ObjectSchema[T]

Add a required field to the object schema

Add a required field to the object schema

Value parameters

name

The name of the property

schema

The schema definition for the property

Attributes

Returns

A new ObjectSchema with the required property added

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product