VarArgsSerializer
class VarArgsSerializer(val kCallable: KCallable<*>) : KSerializer<ToolFromCallable.VarArgs> (source)
A serializer for the VarArgs class, enabling Kotlin serialization for arguments provided dynamically to a callable function (KCallable). This serializer facilitates encoding and decoding of arguments via their corresponding KParameter mappings.
Functions
Link copied to clipboard
Provides a custom serializer for tools, wrapping and unwrapping values that do not serialize into JsonObject into a custom JsonObject with value key. This wrapping/unwrapping is needed because for LLM APIs tool arguments must always be JsonObject.
Link copied to clipboard
Link copied to clipboard