| cb_register_tool | R Documentation |
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.
cb_register_tool(chat, tool)
cb_register_tools(chat, cohort)
chat |
An ellmer chat object (e.g. from |
tool |
A |
cohort |
A |
The chat object, invisibly (for piping).
## Not run:
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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.