Skip to main content

Module models

Module models 

Source
Expand description

Request and response model types for the embedding API endpoints.

Dense types are OpenAI-compatible. Sparse and dual types are BGE-M3 specific; they extend the same request shape with additional output fields.

Structsยง

DenseEmbeddingData
Per-document dense embedding entry.
DenseRequest
Request body for the dense embeddings endpoint.
DenseResponse
Top-level response for the dense embeddings endpoint (OpenAI-compatible).
DualEmbeddingData
Per-document paired dense + sparse embedding entry.
DualRequest
Request body for the unified dense + sparse embeddings endpoint.
DualResponse
Top-level response for the unified dense + sparse embeddings endpoint.
ModelEntry
A single model entry.
ModelsResponse
Top-level response for GET /v1/models (OpenAI-compatible).
SparseEmbeddingData
Per-document sparse embedding entry.
SparseRequest
Request body for the sparse embeddings endpoint.
SparseResponse
Top-level response for the sparse embeddings endpoint.
SparseValues
Parallel arrays of token indices and their weights.
TextInput
Newtype wrapping a Vec<String> that deserializes from either "a single string" or ["array", "of", "strings"].
Usage
Token usage counters.