| llm_fn_tags | R Documentation |
Tags-first variant of llm_fn(). Injects tag instructions, calls the model
via call_llm_broadcast(), then parses XML-like tags from each response.
llm_fn_tags(
x,
prompt,
.config,
.system_prompt = NULL,
...,
.tags,
.fields = NULL,
.return = c("columns", "text", "object"),
.rows_per_prompt = 1L,
.rowpack_payload = c("user", "system"),
.rowpack_recovery = c("halve_recursive", "halve_once", "singletons", "retry_same",
"none")
)
x |
A character vector or a data.frame/tibble. |
prompt |
A glue template string. With a data-frame you may reference
columns ( |
.config |
An llm_config object. |
.system_prompt |
Optional system message (character scalar). |
... |
Passed unchanged to |
.tags |
Character vector of tag names to request and parse. |
.fields |
|
.return |
One of |
.rows_per_prompt |
Integer scalar, or |
.rowpack_payload |
One of |
.rowpack_recovery |
How to handle rows that a batched call leaves unresolved (dropped, malformed, or truncated). One of:
Recovery is bounded by an internal call budget so it always terminates. |
Depends on .return: "columns" (default) a tibble with the parsed
tag columns and diagnostics; "text" a character vector of the raw
responses; "object" a list (one element per row) of parsed tag data.
llm_fn(), llm_mutate_tags(), llm_parse_tags_col(),
call_llm_par_tags()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.