Package-level declarations

Types

Link copied to clipboard
class ToolParameterInfo(val type: ToolParameterType, val description: String)

Helper class holding information about the ToolParameterType along with its optional description.

Properties

Link copied to clipboard
val defaultJsonSchemaConfig: JsonSchemaConfig

Functions

Link copied to clipboard
expect fun getJsonSchema(typeToken: TypeToken, jsonSchemaConfig: JsonSchemaConfig = defaultJsonSchemaConfig): JsonSchema
actual fun getJsonSchema(typeToken: TypeToken, jsonSchemaConfig: JsonSchemaConfig): JsonSchema
actual fun getJsonSchema(typeToken: TypeToken, jsonSchemaConfig: JsonSchemaConfig): JsonSchema
Link copied to clipboard
fun getToolDescriptor(argsType: TypeToken, toolName: String, toolDescription: String? = null, jsonSchemaConfig: JsonSchemaConfig = defaultJsonSchemaConfig): ToolDescriptor

Generates a ToolDescriptor by generating and converting the JSON schema for the type defined by the provided argsType

fun getToolDescriptor(callable: KCallable<*>, toolName: String? = null, toolDescription: String? = null, jsonSchemaConfig: JsonSchemaConfig = defaultJsonSchemaConfig): ToolDescriptor

Generates a ToolDescriptor by generating and converting the function calling schema for the provided callable

Link copied to clipboard
fun PropertyDefinition.toToolParameter(defs: Map<String, PropertyDefinition>?): ToolParameterInfo

Converts a JSON schema property representation PropertyDefinition to ToolParameterInfo, containing our tool parameter representation ToolParameterType along with its optional description.