fetch_batch | R Documentation |
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()
.
fetch_batch(
.llms,
.provider = getOption("tidyllm_fbatch_default"),
.dry_run = NULL,
.max_tries = NULL,
.timeout = NULL
)
.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 |
The function routes the input to the appropriate provider-specific batch API function.
A list of updated LLMMessage
objects, each with the assistant's response added if successful.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.