View source: R/misc_add_text.R
| add_text | R Documentation |
Add text to a prompt by adding a prompt_wrap() which will append the text to
the before or after the current prompt text.
add_text(prompt, text, position = c("after", "before"), sep = "\n\n")
prompt |
A single string or a |
text |
Text to be added to the current prompt text |
position |
Where to add the text; either "after" or "before". |
sep |
Separator to be used between the current prompt text and the text to be added |
A tidyprompt() with an added prompt_wrap() which
will append the text to the end of the current prompt text
Other pre_built_prompt_wraps:
answer_as_boolean(),
answer_as_category(),
answer_as_integer(),
answer_as_json(),
answer_as_list(),
answer_as_multi_category(),
answer_as_named_list(),
answer_as_regex_match(),
answer_as_text(),
answer_by_chain_of_thought(),
answer_by_react(),
answer_using_r(),
answer_using_sql(),
answer_using_tools(),
prompt_wrap(),
quit_if(),
set_system_prompt()
Other miscellaneous_prompt_wraps:
quit_if(),
set_system_prompt()
prompt <- "Hi there!" |>
add_text("How is your day?")
prompt
prompt |>
construct_prompt_text()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.