/** * 本地 embedding(Electron 主进程):node-llama-cpp + GGUF。 * 需在安装依赖后对 Electron 的 Node ABI 执行 electron-rebuild(见 apps/desktop 的 rebuild:native)。 * 加载前会注册 ESM 钩子,将 "typescript" 解析为桩模块,避免依赖链加载 typescript.js(含 with 语句,ESM 下报错)。 */ import type { IEmbeddingProvider } from "./embedding-types.js"; export declare function getLocalEmbeddingLlamaUnavailableReason(): string | null; /** * 获取基于 node-llama-cpp + GGUF 的本地 embedding 提供方。 * 仅在可解析到 node-llama-cpp 且模型可加载时返回,否则返回 null。 * @param modelPath 配置的 GGUF 路径或 hf: URI,为空时使用 DEFAULT_GGUF_MODEL */ export declare function getLocalEmbeddingLlamaProvider(modelPath: string | null): Promise;