ToolDef

defines a tool the model can call.

  • name: the tool name the model uses to invoke it
  • description: natural-language description the model sees
  • parameters: a JSON Schema describing the tool's arguments

copy

instantiate

(Fn [(Ref ToolDef a)] ToolDef)

copies a ToolDef.

delete

instantiate

(Fn [ToolDef] ())

deletes a ToolDef. Should usually not be called manually.

description

instantiate

(Fn [(Ref ToolDef a)] (Ref String a))

gets the description property of a ToolDef.

init

instantiate

(Fn [String, String, JSON] ToolDef)

creates a ToolDef.

name

instantiate

(Fn [(Ref ToolDef a)] (Ref String a))

gets the name property of a ToolDef.

parameters

instantiate

(Fn [(Ref ToolDef a)] (Ref JSON a))

gets the parameters property of a ToolDef.

prn

instantiate

(Fn [(Ref ToolDef a)] String)

converts a ToolDef to a string.

set-description

instantiate

(Fn [ToolDef, String] ToolDef)

sets the description property of a ToolDef.

set-description!

instantiate

(Fn [(Ref ToolDef a), String] ())

sets the description property of a ToolDef in place.

set-name

instantiate

(Fn [ToolDef, String] ToolDef)

sets the name property of a ToolDef.

set-name!

instantiate

(Fn [(Ref ToolDef a), String] ())

sets the name property of a ToolDef in place.

set-parameters

instantiate

(Fn [ToolDef, JSON] ToolDef)

sets the parameters property of a ToolDef.

set-parameters!

instantiate

(Fn [(Ref ToolDef a), JSON] ())

sets the parameters property of a ToolDef in place.

str

instantiate

(Fn [(Ref ToolDef a)] String)

converts a ToolDef to a string.

update-description

instantiate

(Fn [ToolDef, (Ref (Fn [String] String a) b)] ToolDef)

updates the description property of a ToolDef using a function f.

update-name

instantiate

(Fn [ToolDef, (Ref (Fn [String] String a) b)] ToolDef)

updates the name property of a ToolDef using a function f.

update-parameters

instantiate

(Fn [ToolDef, (Ref (Fn [JSON] JSON a) b)] ToolDef)

updates the parameters property of a ToolDef using a function f.