/** * WebLLM's `cleanModelUrl`, mirrored deliberately. * * Kept character-for-character with the bundle's version (see the contract * test) because the whole point is to produce the same cache keys its loader * will look for. */ export function resolveModelUrl(modelUrl: any): string; /** * @param {object} opts * @param {string} opts.modelId * @param {object} opts.record the merged app-config entry: `model`, `model_lib` * @param {(p: {phase: string, done: number, total: number, label: string}) => void} [opts.onProgress] * @param {AbortSignal} [opts.signal] * @param {(url: string, init?: object) => Promise} [opts.fetchImpl] * @returns {Promise<{modelId: string, files: number, bytes: number, alreadyCached: boolean}>} */ export function prefetchModel({ modelId, record, onProgress, signal, fetchImpl, }: { modelId: string; record: object; onProgress?: (p: { phase: string; done: number; total: number; label: string; }) => void; signal?: AbortSignal; fetchImpl?: (url: string, init?: object) => Promise; }): Promise<{ modelId: string; files: number; bytes: number; alreadyCached: boolean; }>; export function isAlreadyLocal(record: any): boolean;