org.llm4s.toolapi.AnyOfSchema
See theAnyOfSchema companion object
@Stable
final case class AnyOfSchema[T] extends SchemaDefinition[T]
A union: a value that matches at least one of alternatives (JSON Schema anyOf).
Emits {"description": ..., "anyOf": [...]}. There is always at least one alternative: an anyOf with none matches nothing.
Type parameters
- T
-
The Scala type the union reads as (unused at runtime)
Value parameters
- alternatives
-
The schemas a value may match, in order
- description
-
Human-readable description shown to the LLM
Attributes
- Companion
- object
- Source
- SchemaDefinition.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SchemaDefinition[T]class Objecttrait Matchableclass Any
Members list
In this article
