Are you an LLM? You can read better optimized documentation at /api/@nhtio/adk/batteries/embeddings/webllm/validation.md for this page in Markdown format
@nhtio/adk/batteries/embeddings/webllm/validation
Runtime validation schema and wrapper for WebLLM Embeddings adapter options.
Remarks
Validates WebLLMEmbeddingsAdapterOptions at construction time. Throws E_INVALID_WEBLLM_EMBEDDINGS_OPTIONS on failure. model is required; unknown top-level keys are rejected so typos fail loud. WebGPU availability is checked at engine-resolution time (not here), since an engine may be injected for tests/non-WebGPU paths.
Variables
| Variable | Description |
|---|---|
| webLLMEmbeddingsOptionsSchema | Validator schema for WebLLMEmbeddingsAdapterOptions. Rejects unknown top-level keys. |
Functions
| Function | Description |
|---|---|
| validateOptions | Validates an arbitrary input against webLLMEmbeddingsOptionsSchema and returns the resolved options shape. Throws E_INVALID_WEBLLM_EMBEDDINGS_OPTIONS (carrying the validator's report on cause) on failure. |