hf_perform_batch: Perform Parallel Batch Requests

View source: R/batch.R

hf_perform_batchR Documentation

Perform Parallel Batch Requests

Description

Internal function to execute multiple API requests in parallel with error handling.

Usage

hf_perform_batch(reqs, input_indices, max_active = 10L, progress = TRUE)

Arguments

reqs

List of httr2 request objects.

input_indices

Integer vector. Original indices corresponding to each request.

max_active

Integer. Maximum concurrent requests. Default: 10.

progress

Logical. Show progress bar. Default: TRUE.

Value

A tibble with columns: - '.input_idx': Original input index - 'response': The response object (or error) - '.error': Logical, TRUE if request failed - '.error_msg': Error message or NA


huggingfaceR documentation built on Aug. 30, 2026, 1:06 a.m.