Skip to contents

This function retrieves a prompt template from either:

Usage

get_prompt_template(name = "default")

Arguments

name

Character scalar giving the template name.

Value

A single character string containing the prompt template.

Details

The function first checks user-registered templates, then looks for a built-in text file inst/templates/<name>.txt. The special name "default" falls back to set_prompt_template() when no user-registered or built-in template is found.

Examples

# Get the built-in default template
tmpl_default <- get_prompt_template("default")

# List available template names
list_prompt_templates()
#> [1] "default" "test1"   "test2"   "test3"   "test4"   "test5"