ragnar_register_tool_retrieve {ragnar} | R Documentation |
Register a 'retrieve' tool with ellmer
Description
Register a 'retrieve' tool with ellmer
Usage
ragnar_register_tool_retrieve(
chat,
store,
store_description = "the knowledge store",
...,
name = NULL,
title = NULL
)
Arguments
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,
|
Value
chat
, invisibly.
Examples
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?")
[Package ragnar version 0.2.0 Index]