Are you an LLM? You can read better optimized documentation at /api/@nhtio/adk/batteries/embeddings/openai/types.md for this page in Markdown format
@nhtio/adk/batteries/embeddings/openai/types
Option and wire-shape types for the OpenAI Embeddings adapter, plus the shared embeddings battery base type both bundled embeddings batteries build on.
Remarks
This module owns the shared embeddings option base (BaseEmbeddingsAdapterOptions) and the shared call shapes (EmbeddingKind, EmbedOptions). The WebLLM Embeddings battery re-exports and extends these rather than redefining them, so the two batteries differ only in their engine — exactly how the WebLLM Chat Completions battery extends the OpenAI Chat Completions option type.
Interfaces
| Interface | Description |
|---|---|
| BaseEmbeddingsAdapterOptions | Options shared by every embeddings battery, regardless of engine. |
| EmbeddingsRetryConfig | Retry/backoff configuration for HTTP-backed embeddings batteries. Mirrors the chat battery's ChatCompletionsRetryConfig so behavior is consistent across the bundled batteries. |
| EmbedOptions | Per-call options accepted by embed / embedMany. Identical across both batteries. |
| OpenAIEmbeddingsAdapterOptions | Constructor options for @nhtio/adk/batteries/embeddings/openai/adapter!OpenAIEmbeddingsAdapter. |
| OpenAIEmbeddingsRequestBody | The JSON request body POSTed to /v1/embeddings. |
| OpenAIEmbeddingsResponseBody | The relevant subset of the /v1/embeddings JSON response shape. |
Type Aliases
| Type Alias | Description |
|---|---|
| EmbeddingKind | Whether a piece of text is being embedded as a search query or as a corpus document. |