import { TaskConfiguration } from './types'; import * as webllm from "@mlc-ai/web-llm"; /** * The main class for executing tasks in the Optimaxer framework. */ declare class Optimaxer { private engine; /** * Initializes a new instance of the Optimaxer class and registers the service worker. */ constructor(); /** * Registers the service worker for the application. * This allows for background processing and offline capabilities. */ private registerServiceWorker; /** * Updates the text content of a label element by its ID. * @param id - The ID of the label element. * @param text - The text content to set on the label. */ private updateLabel; /** * Loads the specified model and provides progress updates via the callback. * @param selectedModel - The name of the model to load. * @param initProgressCallback - A callback function that receives progress reports. * @returns A promise that resolves when the model is fully loaded. */ loadModel(selectedModel: string, initProgressCallback: (report: webllm.InitProgressReport) => void): Promise; /** * Executes a task based on the provided configuration. * @param config - The configuration for the task. * @returns A promise that resolves when the task execution is complete. * @throws An error if the engine is not initialized. */ executeOptimaxerTask(config: TaskConfiguration): Promise; /** * Executes a task based on the provided prompt. * @param prompt - The prompt for the task. * @returns A promise that resolves when the task execution is complete. * @throws An error if the engine is not initialized. */ executeTask(prompt: string): Promise; } export default Optimaxer;