/** * Author: Srilal S. Siriwardhane * Email: SrilalS@99x.io **/ import { AbstractLLMInferenceEngine } from "./AbstractLLMInferenceEngine.js"; import { AvailableModels } from "../types/AvailableModels.js"; import { ChatMessage } from "../types/ChatMessages.js"; import { Model } from "../types/Model.js"; import { LLMStatus } from "../types/LLMStatus.js"; import { TextGenerationPipeline, TextGenerationSingle } from "@huggingface/transformers"; type AdvancedTJSModel = Model | 'llama32'; export declare class AdvancedTJSInferenceEngine extends AbstractLLMInferenceEngine { private status; private statusEmitter; llmModel: AdvancedTJSModel; engine: TextGenerationPipeline; availableModels: AvailableModels; constructor(model: AdvancedTJSModel); static init(model: AdvancedTJSModel): Promise; createEngine(): Promise; runCompletionInference(prompt: string): Promise; runChatInference(chat: ChatMessage[]): Promise; protected processChatOutput(chatOutput: TextGenerationSingle[]): Promise; progressCallback(progress: any): void; /** * getModel * @returns string * * This function is used to get the model name from the available models. * * @throws Error - If the model is not found or not supported. * */ protected getModel(): string; /** * onStatusChange * @param listener - The listener to be used for status change. * * This function is used to listen to the status change of the inference. * */ onStatusChange(listener: (status: LLMStatus) => void): void; } export {};