Skip to main content

Module batch_client

Module batch_client 

Source
Expand description

Batch embedding client — issue #275.

Accepts a Vec<String>, splits into sub-batches up to max_batch_size, sends each via AiTransport with retry, and reassembles results in the original order. Empty texts are skipped; their positions get an empty Vec<f32> in the output.

Issue #277 adds optional dedup cache and text chunking.

Structs§

AiBatchClient
Batch embedding client.
AiTransportSender
Production backend: routes sub-batches through AiTransport.
SubBatchRequest
One sub-batch worth of work.
SubBatchResponse

Constants§

CONFIG_MAX_BATCH_SIZE
DEFAULT_OPENAI_MAX_BATCH
DEFAULT_OTHER_MAX_BATCH

Traits§

SubBatchSender
Backend abstraction. Production uses AiTransportSender; tests use mocks.