fetch_batch {tidyllm} | R Documentation |
Fetch Results from a Batch API
Description
This function retrieves the results of a completed batch and updates
the provided list of LLMMessage
objects with the responses. It aligns each
response with the original request using the custom_id
s generated in send_batch()
.
Usage
fetch_batch(
.llms,
.provider = getOption("tidyllm_fbatch_default"),
.dry_run = NULL,
.max_tries = NULL,
.timeout = NULL
)
Arguments
.llms |
A list of |
.provider |
A function or function call specifying the language model provider and any additional parameters.
This should be a call to a provider function like |
.dry_run |
Logical; if |
.max_tries |
Integer; maximum number of retries if the request fails |
.timeout |
Integer; request timeout in seconds |
Details
The function routes the input to the appropriate provider-specific batch API function.
Value
A list of updated LLMMessage
objects, each with the assistant's response added if successful.