Skip to contents

This tool can be used by the LLM to describe the contents of an R session, i.e. the data frames and other objects loaded into the global environment. This tool will only see variables that you've named and created in the global environment, it cannot reach into package namespaces, see which packages you have loaded, or access files on your computer.

Usage

btw_tool_env_describe_environment(items = NULL, `_intent` = "")

Arguments

items

Optional. A character vector of objects in the environment to describe.

_intent

An optional string describing the intent of the tool use. When the tool is used by an LLM, the model will use this argument to explain why it called the tool.

Value

A string describing the environment contents with #> prefixing each object's printed representation.

Examples

my_cars <- mtcars[mtcars$mpg > 25, ]
btw_tool_env_describe_environment("my_cars")
#> <btw::BtwToolResult>
#>  @ value  : NULL
#>  @ error  : NULL
#>  @ extra  : list()
#>  @ request: NULL