ragnar_register_tool_retrieve | R Documentation |
Register a 'retrieve' tool with ellmer
ragnar_register_tool_retrieve(
chat,
store,
store_description = "the knowledge store",
...,
name = NULL,
title = NULL
)
chat |
a |
store |
a string of a store location, or a |
store_description |
Optional string, used for composing the tool description. |
... |
arguments passed on to |
name , title |
Optional tool function name and title. By default,
|
chat
, invisibly.
system_prompt <- stringr::str_squish("
You are an expert assistant in R programming.
When responding, you first quote relevant material from books or documentation,
provide links to the sources, and then add your own context and interpretation.
")
chat <- ellmer::chat_openai(system_prompt, model = "gpt-4o")
store <- ragnar_store_connect("r4ds.ragnar.duckdb")
ragnar_register_tool_retrieve(chat, store)
chat$chat("How can I subset a dataframe?")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.