Configure a model call (or not) a tool.

equip(x, tool, instructions = NULL, ...)
unequip(x, name)

Arguments

x

The Agent object

tool

The Tool object, or an object to convert to a Tool object, or a list of such objects.

instructions

A string instructing the model on how and when to use the tool. Typically, this is not necessary, because the Tool object is sufficiently described. This is intended to allow a Tool to be used in different ways in different contexts.

name

The name of the tool to unequip

...

Arguments passed to tool when ensuring that the tool argument is a Tool object. Typically, these get forwarded to the Tool constructor.

Value

The input Agent object except with a different set of tools.

Author

Michael Lawrence

See also

tool, for constructing (and configuring) Tool objects prior to equipping.

Examples

if (FALSE) { # \dontrun{
    model <- equip(llama(), tool(mean) |> describe_with_Rd())
} # }