Skip to main content

Module types

Module types 

Source
Expand description

The POST /api/v1/store/ingest request contract and its validation.

Body: {"vectors":[[id,[8 floats]],...],"dedup":true}. Anything else is rejected: wrong shape, wrong dimensionality, non-finite floats, an empty or oversize batch, unknown keys.

Structs§

IngestBatch
A validated batch.
IngestVector
One vector of a batch.

Enums§

IngestError
Why a request was refused. Maps to an HTTP status.

Constants§

DIMS
Dimensionality of an ingested vector (the ADR-069 feature packet).
INGEST_PATH
Path every cog posts to.
MAX_BODY_BYTES
Largest request body the bridge reads.
MAX_VECTORS_PER_BATCH
Most vectors in one request.

Functions§

parse_batch
Parse and validate a request body.
valid_project_id
True for a project id: a canonical ULID, the same check every other project id passes (clawft_types::project::validate_id).