Skip to main content

Module batch

Module batch 

Source
Expand description

Batch generation (batchGenerateContent): inline or file-based input, status, results, cancel and list.

Derived from the Vercel AI SDK (Apache-2.0, Copyright 2023 Vercel, Inc.), translated from TypeScript to Rust and modified; see NOTICE.

Structs§

BatchOperation
A long-running batch operation.
BatchOperationMetadata
Metadata of a batch operation.
BatchResultLine
One line of a batch results file ({key, response?, error?}).
BatchStats
Request counts of a batch.
GoogleBatch
Batch service backed by batchGenerateContent.
PreparedBatchRequest
A prepared batch request: the generateContent body and its warnings.

Constants§

DISPLAY_NAME_PREFIX
Prefix of the generated batch display names.
FAMILY
Provider id family.
INLINE_MAX_BYTES
Inline request bodies stay below this many bytes; larger batches are uploaded as a JSONL file.
INPUT_FILE_MAX_BYTES
Maximum size of an uploaded JSONL input file.

Functions§

convert_line
Converts one result line.
map_status
Maps an operation to the normalized status.
rpc_error
Maps an RPC status to a batch error.