process_chunks: Process chunks of prompts in parallel

View source: R/hellmer-core.R

process_chunksR Documentation

Process chunks of prompts in parallel

Description

Process chunks of prompts in parallel

Usage

process_chunks(
  chunks,
  result,
  chat_obj,
  type_spec,
  judgements,
  pb,
  state_path,
  progress,
  beep,
  max_retries,
  initial_delay,
  max_delay,
  backoff_factor,
  echo,
  ...
)

Arguments

chunks

List of prompt chunks to process

result

A batch object to store results

chat_obj

Chat model object for making API calls

type_spec

Type specification for structured data extraction

judgements

Number of judgements for structured data extraction resulting in refined data

pb

Progress bar object

state_path

Path to save intermediate state

progress

Whether to show progress bars

beep

Logical indicating whether to play sounds

max_retries

Maximum number of retry attempts

initial_delay

Initial delay in seconds before first retry

max_delay

Maximum delay in seconds between retries

backoff_factor

Factor to multiply delay by after each retry

Value

Updated batch object with processed results


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