llm_mutate_structured | R Documentation |
Drop-in schema-first variant of llm_mutate()
. Produces parsed columns.
llm_mutate_structured(
.data,
output,
prompt = NULL,
.messages = NULL,
.config,
.system_prompt = NULL,
.before = NULL,
.after = NULL,
.schema = NULL,
.fields = NULL,
...
)
.data |
A data.frame / tibble. |
output |
Unquoted name that becomes the new column (generative) or the prefix for embedding columns. |
prompt |
Optional glue template string for a single user turn; reference
any columns in |
.messages |
Optional named character vector of glue templates to build
a multi-turn message, using roles in |
.config |
An llm_config object (generative or embedding). |
.system_prompt |
Optional system message sent with every request when
|
.before , .after |
Standard dplyr::relocate helpers controlling where the generated column(s) are placed. |
.schema |
Optional JSON Schema list; if |
.fields |
Optional fields to hoist (supports nested paths). |
... |
Passed to the underlying calls: |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.