/** * WebLLM adapter * * Uses @mlc-ai/web-llm for running LLMs in the browser with WebGPU. * Requires downloading model files (100MB - 4GB+ depending on model). */ import type { InitState, OnProgress } from '../../core/types.js'; import type { LLMAdapter, LLMCapabilities, LLMChatOptions, LLMMessage, LLMResponse, WebLLMOptions } from './types.js'; /** * WebLLM adapter for in-browser LLM inference */ export declare class WebLLMAdapter implements LLMAdapter { readonly type: "webllm"; private _initState; private _currentModel; private options; private engine; constructor(options?: WebLLMOptions); get initState(): InitState; get currentModel(): string | null; ensureInitialized(modelId?: string, onProgress?: OnProgress): Promise; private importWebLLM; getCapabilities(): Promise; chat(messages: LLMMessage[], options?: LLMChatOptions): Promise; stream(messages: LLMMessage[], options?: LLMChatOptions): AsyncIterable; message(text: string, options?: LLMChatOptions & { systemPrompt?: string; }): Promise; countTokens(text: string): Promise; unloadModel(): Promise; dispose(): Promise; } //# sourceMappingURL=webllm.d.ts.map