cb_register_tool registers a single cb_tool with
an ellmer chat object. cb_register_tools is a convenience
wrapper that registers all built-in tools at once.
Arguments
- chat
An ellmer chat object (e.g. from
ellmer::chat_openai()).- tool
A
cb_toolobject.- cohort
A
Cohortobject.
Examples
if (FALSE) { # \dontrun{
source <- set_source(tblist(iris = iris)) |> autofilter(attach_as = "meta")
coh <- cohort(source)
chat <- ellmer::chat_openai()
chat |> cb_register_tools(coh)
chat$chat("Show me the available filters")
} # }
