/** Embedding vector returned by node-llama-cpp. */ export type LlamaEmbedding = { vector: Float32Array | number[]; }; /** Embedding context created from a loaded llama model. */ export type LlamaEmbeddingContext = { getEmbeddingFor: (text: string) => Promise; dispose?: () => Promise | void; }; /** Loaded llama model capable of creating embedding contexts. */ export type LlamaModel = { createEmbeddingContext: (options?: { contextSize?: number | "auto"; createSignal?: AbortSignal; }) => Promise; dispose?: () => Promise | void; }; /** Options accepted by node-llama-cpp model file resolution. */ export type ResolveModelFileOptions = { directory?: string; signal?: AbortSignal; }; /** Root llama runtime object exposed by node-llama-cpp. */ export type Llama = { loadModel: (params: { modelPath: string; loadSignal?: AbortSignal; }) => Promise; dispose?: () => Promise | void; }; /** Imported node-llama-cpp module shape used by local embeddings. */ export type NodeLlamaCppModule = { LlamaLogLevel: { error: number; }; getLlama: (params: { logLevel: number; }) => Promise; resolveModelFile: (modelPath: string, optionsOrDirectory?: string | ResolveModelFileOptions) => Promise; }; /** Dynamically import node-llama-cpp so the optional dependency is loaded only when needed. */ export declare function importNodeLlamaCpp(): Promise;