import { AppConfig } from "./config"; import { InitProgressCallback, ChatInterface, ChatOptions, GenerateProgressCallback } from "./types"; /** * This is the main interface to the chat module. */ export declare class ChatModule implements ChatInterface { private logger; private pipeline?; private initProgressCallback?; private interruptSignal; setInitProgressCallback(initProgressCallback: InitProgressCallback): void; reload(localId: string, chatOpts?: ChatOptions, appConfig?: AppConfig): Promise; generate(input: string, progressCallback?: GenerateProgressCallback, streamInterval?: number): Promise; interruptGenerate(): Promise; runtimeStatsText(): Promise; resetChat(): Promise; unload(): Promise; /** * @returns Whether the generation stopped. */ stopped(): boolean; /** * Get the current generated response. * * @returns The current output message. */ getMessage(): string; /** * Run a prefill step with a given input. * @param input The input prompt. */ prefill(input: string): Promise; /** * Run a decode step to decode the next token. */ decode(): Promise; private getPipeline; private asyncLoadTokenizer; } /** * This is the interface to the chat module that connects to the REST API. */ export declare class ChatRestModule implements ChatInterface { private logger; private initProgressCallback?; setInitProgressCallback(initProgressCallback: InitProgressCallback): void; reload(localId: string, chatOpts?: ChatOptions, appConfig?: AppConfig): Promise; unload(): Promise; interruptGenerate(): Promise; generate(input: string, progressCallback?: GenerateProgressCallback, streamInterval?: number): Promise; runtimeStatsText(): Promise; resetChat(): Promise; } export declare function hasModelInCache(localId: string, appConfig?: AppConfig): Promise; //# sourceMappingURL=chat_module.d.ts.map