This function creates and submits a batch of messages to the Groq API for asynchronous processing.
send_groq_batch(
.llms,
.model = "deepseek-r1-distill-llama-70b",
.max_tokens = 1024,
.temperature = NULL,
.top_p = NULL,
.frequency_penalty = NULL,
.presence_penalty = NULL,
.stop = NULL,
.seed = NULL,
.api_url = "https://api.groq.com/",
.json = FALSE,
.completion_window = "24h",
.verbose = FALSE,
.dry_run = FALSE,
.overwrite = FALSE,
.max_tries = 3,
.timeout = 60,
.id_prefix = "tidyllm_groq_req_"
)
An updated and named list of .llms
with identifiers that align with batch responses, including a batch_id
attribute.
A list of LLMMessage objects containing conversation histories.
Character string specifying the model to use (default: "deepseek-r1-distill-llama-70b").
Integer specifying the maximum tokens per response (default: 1024).
Numeric between 0 and 2 controlling response randomness.
Numeric between 0 and 1 for nucleus sampling.
Number between -2.0 and 2.0 to penalize repetition.
Number between -2.0 and 2.0 to encourage new topics.
One or more sequences where the API will stop generating further tokens.
An integer for deterministic sampling.
Base URL for the Groq API (default: "https://api.groq.com/").
Whether the response should be structured as JSON (default: FALSE).
Character string for the batch completion window (default: "24h").
Logical; if TRUE, prints a message with the batch ID (default: FALSE).
Logical; if TRUE, returns the prepared request objects without executing (default: FALSE).
Logical; if TRUE, allows overwriting an existing batch ID (default: FALSE).
Maximum number of retries to perform the request.
Integer specifying the request timeout in seconds (default: 60).
Character string to specify a prefix for generating custom IDs when names in .llms
are missing.