TypeGraphToFunctionCallingSchemaTransformer

class TypeGraphToFunctionCallingSchemaTransformer @JvmOverloads constructor(json: Json = Json { encodeDefaults = false }, requiredFieldStrategy: RequiredFieldStrategy = RequiredFieldStrategy.ALL_REQUIRED) : TypeGraphTransformer<FunctionCallingSchema> (source)

Transforms a TypeGraph into a FunctionCallingSchema for tool/function schema representation.

This transformer converts the IR representation of a function's parameters into a tool schema suitable for LLM function calling APIs.

Nullable/optional fields are represented using union types that include "null" (e.g., "string", "null") instead of using the "nullable" flag.

Constructors

constructor(json: Json = Json { encodeDefaults = false }, requiredFieldStrategy: RequiredFieldStrategy = RequiredFieldStrategy.ALL_REQUIRED)

Functions

Link copied to clipboard
open override fun transform(graph: TypeGraph, rootName: String): FunctionCallingSchema