| dragon_map | R Documentation |
Each argument is either a column name or a glue::glue() template that
combines several columns, such as "{subject}\n\n{body}". Templates are
rendered per row when the training files are written.
dragon_map(dataset, prompt, response, system = NULL)
dataset |
A |
prompt |
Column name or template for the user turn. |
response |
Column name or template for the assistant turn. |
system |
Optional column name or template for the system prompt. A template with no braces and no matching column is used as a constant system prompt for every row. |
The dataset with the mapping attached.
ds <- dragon_dataset(dragon_example_data())
ds <- dragon_map(ds, prompt = "{subject}\n\n{body}", response = "reply")
dragon_preview(ds, n = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.