function

fun function(name: String, description: String? = null, parameters: Parameters)
fun function(name: String, description: String? = null, parameters: String)
fun function(name: String, description: String? = null, parameters: JsonObjectBuilder.() -> Unit)

Creates a 'function' tool.

Parameters

name

The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

parameters

The parameters the function accepts, described as a JSON Schema object.