import type { EmbeddingProvider } from '../hallucination/retrieval.js'; import type { EmbeddingRequest, EmbeddingResponse } from '../types/embeddings.js'; /** * Anything that answers an embedding request: an `EmbeddingManager`, or a `NexusAI` runtime. */ export interface EmbeddingSource { /** Embeds a request. */ embed(request: EmbeddingRequest): Promise; } /** * Adapts the embeddings operation family to the plain function that `MemoryVectorStore`, the * semantic cache, and RAG ingestion accept. * * This is how an existing vector store gains routing, caching, batching, budget, retry, audit, and * metrics without changing its own contract. */ export declare function toEmbeddingFunction(source: EmbeddingSource, options?: Omit): EmbeddingProvider; /** Options for `createOpenAIEmbeddingProvider()`. */ export interface OpenAIEmbeddingOptions { /** OpenAI API key. */ apiKey: string; /** Embedding model. Defaults to `text-embedding-3-small`. */ model?: string; /** API base URL. Defaults to `https://api.openai.com/v1`. */ baseUrl?: string; } /** Options for `createGeminiEmbeddingProvider()`. */ export interface GeminiEmbeddingOptions { /** Gemini API key. */ apiKey: string; /** Embedding model. Defaults to `text-embedding-004`. */ model?: string; /** API base URL. Defaults to `https://generativelanguage.googleapis.com/v1beta`. */ baseUrl?: string; } /** Options for `createCohereEmbeddingProvider()`. */ export interface CohereEmbeddingOptions { /** Cohere API key. */ apiKey: string; /** Embedding model. Defaults to `embed-v4.0`. */ model?: string; /** API base URL. Defaults to `https://api.cohere.com/v2`. */ baseUrl?: string; /** What the vectors are for. Defaults to `search_document`. */ inputType?: 'search_document' | 'search_query' | 'classification' | 'clustering'; } /** * A minimal OpenAI embedding function, for a vector store that needs no routing or retries. The * embeddings family is the fuller option. */ export declare function createOpenAIEmbeddingProvider(options: OpenAIEmbeddingOptions): EmbeddingProvider; /** * A minimal Gemini embedding function, for a vector store that needs no routing or retries. The * embeddings family is the fuller option. */ export declare function createGeminiEmbeddingProvider(options: GeminiEmbeddingOptions): EmbeddingProvider; /** * A minimal Cohere embedding function, for a vector store that needs no routing or retries. The * embeddings family is the fuller option. */ export declare function createCohereEmbeddingProvider(options: CohereEmbeddingOptions): EmbeddingProvider;