# Interface for Large Language Model APIs in R

## Documentation for package ‘LLMR’ version 0.8.10

- DESCRIPTION file
- User guides, package vignettes and other documentation
- Package NEWS
- Package README

## Help Pages

anes_2024_personas | Example participant profiles derived from ANES 2024
as.character.llmr_response | LLMR Response Object
as.data.frame.llm_chat_session | Chat Session Object and Methods
bind_tools | Bind tools to a config (provider-agnostic)
build_factorial_experiments | Build Factorial Experiment Design
call_llm | Call an LLM (chat/completions or embeddings) with optional multimodal input
call_llm.ollama | Call an LLM (chat/completions or embeddings) with optional multimodal input
call_llm_broadcast | Parallel API calls: Fixed Config, Multiple Messages
call_llm_compare | Parallel API calls: Multiple Configs, Fixed Message
call_llm_par | Parallel LLM Processing with Tibble-Based Experiments (Core Engine)
call_llm_par_structured | Parallel experiments with structured parsing
call_llm_par_tags | Parallel experiments with tag parsing
call_llm_robust | Robustly Call LLM API (Simple Retry)
call_llm_stream | Stream a chat completion token by token
call_llm_sweep | Parallel API calls: Parameter Sweep - Vary One Parameter, Fixed Message
call_llm_tools | Call an LLM with tools and run the tool loop
chat_session | Chat Session Object and Methods
diagnostics | Machine-readable diagnostics for an LLMR-family result object
disable_structured_output | Disable Structured Output (clean provider toggles)
enable_structured_output | Enable Structured Output (Provider-Agnostic)
ensure_alternating_messages | Make a message array provider-safe (alternating, user-leading)
expand_llm_config | Expand an LLM Config Grid
finish_reason | LLMR Response Object
format.llm_config | Print an LLM configuration with the API key masked
get_batched_embeddings | Generate Embeddings in Batches
head.llm_chat_session | Chat Session Object and Methods
is_truncated | LLMR Response Object
llmr_response | LLMR Response Object
llm_add_request_hash | Append the audit-log request hash to a parallel-results frame
llm_agreement | Agreement across replicated LLM annotations
llm_api_key_env | Declare an API key sourced from an environment variable
llm_batch_cancel | Cancel a batch job
llm_batch_fetch | Fetch the results of a batch job
llm_batch_status | Check the status of a batch job
llm_batch_submit | Submit a batch job to a provider's batch API
llm_chat_session | Chat Session Object and Methods
llm_config | Create an LLM configuration (provider-agnostic)
llm_cross_design | Cross a data frame with LLM configs
llm_failures | List the rows of an LLM run that failed or were truncated
llm_fn | Apply an LLM prompt over vectors/data frames
llm_fn_structured | Vectorized structured-output LLM
llm_fn_tags | Vectorized LLM with tag extraction
llm_hash | Content hash for research artifacts
llm_judge | LLM-as-a-Judge Evaluation
llm_logprobs | Extract token log-probabilities from a response
llm_log_active | Record every LLM call in a local audit log
llm_log_disable | Record every LLM call in a local audit log
llm_log_enable | Record every LLM call in a local audit log
llm_log_merge | Record every LLM call in a local audit log
llm_log_read | Read an LLMR audit log into records and a manifest
llm_log_status | Record every LLM call in a local audit log
llm_methods_text | Draft a methods-section paragraph from an LLM run
llm_mutate | Mutate a data frame with LLM output
llm_mutate_structured | Data-frame mutate with structured output
llm_mutate_tags | Data-frame mutate with XML-like tag output
llm_parse_rowpack_tags | Parse a batched, row-wrapped tag response into per-row field lists
llm_parse_structured | Parse structured output emitted by an LLM
llm_parse_structured_col | Parse structured fields from a column into typed vectors
llm_parse_tags | Parse XML-like tags emitted by an LLM
llm_parse_tags_col | Parse XML-like tag fields from a column
llm_par_resume | Resume failed parallel LLM calls
llm_persona_demographic_fields | Which columns of a persona frame are demographics
llm_persona_dictionary | The question dictionary attached to a persona data frame
llm_persona_overview | A compact overview of a persona frame for display
llm_persona_split | Split one persona into labeled demographics and labeled answers
llm_preview | Preview a tidy LLM call without spending anything
llm_render_messages | Render tidy messages without calling any API
llm_replicate | Run the same prompt several times per row
llm_request_from_log | Rebuild a callable request from a logged record
llm_request_hash | Stable request hash for an LLM call
llm_response_record | Flatten one LLM response to a provenance row
llm_tool | Define a tool the model may call
llm_tool_signature | A stable signature for a tool's identity
llm_usage | Summarize token usage and outcomes of an LLM run
llm_uuid | A short, sortable, process-unique identifier
llm_validate_persona_frame | Check that a data frame follows the persona contract
llm_validate_structured_col | Validate structured JSON objects against a JSON Schema (locally)
parse_embeddings | Parse Embedding Response into a Numeric Matrix
print.llmr_response | LLMR Response Object
print.llm_chat_session | Chat Session Object and Methods
print.llm_config | Print an LLM configuration with the API key masked
report | Draft a methods-section report from an LLMR-family result object
reset | Reset a stateful object to its initial position
reset_llm_parallel | Reset Parallel Environment
setup_llm_parallel | Setup Parallel Environment for LLM Processing
summary.llm_chat_session | Chat Session Object and Methods
tail.llm_chat_session | Chat Session Object and Methods
tokens | LLMR Response Object
tool_calls | Extract tool calls from a response
transcript_as_messages | Build a role-flipped message array from a multi-speaker transcript