Skip to content
1 min read · 107 words

@nhtio/adk/batteries/embeddings/ollama/validation

Runtime validation schema and wrapper for Ollama Embeddings adapter options.

Remarks

Validates OllamaEmbeddingsAdapterOptions at construction time. Throws E_INVALID_OLLAMA_EMBEDDINGS_OPTIONS on failure — the same hard-fail policy as every other ADK contract. model is required; unknown top-level keys are rejected so typos fail loud.

Variables

VariableDescription
ollamaEmbeddingsOptionsSchemaValidator schema for OllamaEmbeddingsAdapterOptions. Rejects unknown top-level keys.

Functions

FunctionDescription
validateOptionsValidates an arbitrary input against ollamaEmbeddingsOptionsSchema and returns the resolved options shape. Throws E_INVALID_OLLAMA_EMBEDDINGS_OPTIONS (carrying the validator's report on cause) on failure.