Skip to content
1 min read · 221 words

Interface: BaseEmbeddingsAdapterOptions ​

Defined in: src/batteries/embeddings/openai/types.ts:61

Options shared by every embeddings battery, regardless of engine.

Remarks ​

Engine-specific batteries extend this with their own transport/engine fields. model is required with no default — naming the embedding model is the caller's responsibility, never the battery's.

Extended by ​

Properties ​

PropertyTypeDescriptionDefined in
dimensions?numberDeclared output dimensionality, surfaced via adapter.dimensions. Optional metadata for callers that pre-allocate buffers; the battery does not enforce it against responses.src/batteries/embeddings/openai/types.ts:84
documentPrefix?stringInstruction prefix prepended to inputs embedded with kind: 'document'. Unset → no prefix. Most asymmetric models (including Arctic) use no document prefix; exposed for symmetry and the models that do.src/batteries/embeddings/openai/types.ts:79
modelstringModel id to embed with. Required, no default. For OpenAI this is e.g. text-embedding-3-small; for WebLLM it is an MLC embedding model id (e.g. snowflake-arctic-embed-m-q0f32-MLC).src/batteries/embeddings/openai/types.ts:67
queryPrefix?stringInstruction prefix prepended to inputs embedded with kind: 'query'. Unset → no prefix. For Snowflake Arctic Embed, the documented value is 'Represent this sentence for searching relevant passages: '.src/batteries/embeddings/openai/types.ts:73