| llm_failures | R Documentation |
Returns one row per problem: a hard failure (success not TRUE) or a
truncated / content-filtered completion (finish_reason "length" or
"filter"), with the diagnostic detail needed to act. Works on both
call_llm_par() and llm_mutate() results. For a call_llm_par() result
(which still carries config and messages), pass the original frame to
llm_par_resume() to re-run only these rows.
llm_failures(x, prefix = NULL, include = c("all", "failed", "truncated"))
x |
A data frame from |
prefix |
For an |
include |
One of |
A tibble (zero rows if nothing matched) with: row (index into x),
success, finish_reason, status_code, error_code, bad_param,
error_message, response_id. Columns absent from x are filled with
NA.
llm_par_resume() to re-run failed rows, llm_usage().
res <- tibble::tibble(
success = c(TRUE, FALSE, TRUE),
finish_reason = c("stop", "error:server", "length"),
error_message = c(NA, "HTTP 503", NA)
)
llm_failures(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.