pub struct Input {
pub dimensions: Option<i64>,
pub encoding_format: Option<InputEncodingFormat>,
pub input: Vec<Vec<InputInputItemItem>>,
pub model: InputModel,
}Expand description
Generates contextualized embeddings for chunked documents. Chunks within the same document are embedded with document-level context awareness, improving retrieval quality for document-based applications.
Fields§
§dimensions: Option<i64>Output embedding dimensionality (Matryoshka). Valid ranges depend on model: for pplx-embed-context-v1-0.6b → 128–1024; for pplx-embed-context-v1-4b → 128–2560. Defaults to full dimensions (1024 for 0.6b, 2560 for 4b).
encoding_format: Option<InputEncodingFormat>Output encoding format for embeddings. Default: base64_int8. base64_int8 decodes to signed int8 array (length = dimensions). base64_binary decodes to packed bits (length = dimensions / 8 bytes).
input: Vec<Vec<InputInputItemItem>>Nested array of document chunks. Each inner array represents one document, containing chunk strings for that document. Constraints: max 512 documents; total chunks across all documents ≤ 16,000; total tokens per document ≤ 32K; all chunks in a request combined ≤ 120,000 tokens; empty strings not allowed.
model: InputModelContextualized embedding model.