process_future: Process prompts in parallel chunks with error handling and...

View source: R/hellmer-core.R

process_futureR Documentation

Process prompts in parallel chunks with error handling and state management

Description

Process prompts in parallel chunks with error handling and state management

Usage

process_future(
  chat_obj,
  prompts,
  type_spec,
  judgements,
  state_path,
  workers,
  chunk_size,
  plan,
  max_chunk_attempts,
  max_retries,
  initial_delay,
  max_delay,
  backoff_factor,
  beep,
  progress,
  echo,
  ...
)

Arguments

chat_obj

Chat model object for API calls

prompts

Vector or list of prompts to process

type_spec

Optional type specification for structured data extraction

judgements

Number of judgements for structured data extraction resulting in refined data

state_path

Path to save intermediate state

workers

Number of parallel workers

chunk_size

Number of prompts to process in parallel at a time

plan

Parallel backend

max_chunk_attempts

Maximum retries per failed chunk

max_retries

Maximum retries per prompt

initial_delay

Initial delay before first retry

max_delay

Maximum delay between retries

backoff_factor

Delay multiplier after each retry

beep

Play sound on completion/error

progress

Whether to show progress bars

Value

Batch results object


hellmer documentation built on June 8, 2025, 11:09 a.m.