AnyOf

Represents an anyOf type parameter.

Constructors

Link copied to clipboard
constructor(types: Array<ToolParameterDescriptor>)

Properties

Link copied to clipboard

The name associated with the type of tool parameter.

Link copied to clipboard

The type definition for the items within the array.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Our API doesn't support proper nullability yet via type unions, such as "type": ["string", "null"]. Instead, we rely on anyOf with "null" type. However, not all LLM providers support anyOf in their tool schemas, Anthropic being one of them. This is a hack that tries to detect such anyOf's and generate a proper JsonObject with type union on "null" instead.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String