import { Chat, RenderedComponent } from 'llmz';
import { TranscriptItem } from './transcript';
import { AnyIncomingEvent, AnyIncomingMessage } from '@botpress/sdk/dist/bot';
import { BotContext } from '../context/context';
import { DefaultComponents } from './components';
export type Msg = {
    type: string;
    payload: Record<string, any>;
    tags?: Record<string, any>;
};
export type Component = (typeof DefaultComponents)[keyof typeof DefaultComponents];
export type ComponentHandler = (message: RenderedComponent) => Promise<void> | void;
export type ComponentRegistration = {
    component: Component;
    handler?: ComponentHandler;
};
export declare class BotpressChat extends Chat {
    private _transcript;
    private client;
    private conversation;
    private botId;
    private logger;
    private citations;
    private componentRegistry;
    constructor(context: BotContext);
    /**
     * Register a component with an optional handler
     */
    registerComponent(registration: ComponentRegistration): this;
    /**
     * Remove a component by name
     */
    removeComponent(name: string): this;
    /**
     * Get all registered components
     */
    getComponents(): Promise<Component[]>;
    /**
     * Clear the entire transcript
     */
    clearTranscript(): Promise<void>;
    /**
     * Prepend items to the transcript
     */
    prependToTranscript(items: TranscriptItem[]): Promise<void>;
    /**
     * Remove a message from the transcript by ID
     */
    removeMessage(messageId: string): Promise<boolean>;
    /**
     * Remove messages from the transcript by predicate
     */
    removeMessages(predicate: (item: TranscriptItem) => boolean): Promise<number>;
    /**
     * Get a copy of the current transcript
     */
    getTranscript(): Promise<TranscriptItem[]>;
    /**
     * Replace the entire transcript
     */
    setTranscript(items: TranscriptItem[]): Promise<void>;
    fetchTranscript(): Promise<TranscriptItem[]>;
    compactTranscript(): Promise<void>;
    saveTranscript(): Promise<void>;
    sendMessage(message: Msg): Promise<import("@botpress/sdk/dist/utils/type-utils").Merge<import("@botpress/client").Message, {
        type: string;
        payload: any;
    }>>;
    handle(message: RenderedComponent): Promise<void>;
    /**
     * This is a temporary workaround as the Content-Type of images on Telegram are "binary/octet-stream"
     * And OpenAI integration does not support this type. It needs to be "image/jpeg" or "image/png".
     * This function fetches the image from Telegram, uploads it to the file storage, and replaces the URL in the message.
     */
    __temporary__fixTelegramImage(message: AnyIncomingMessage<any>): Promise<AnyIncomingMessage<any>>;
    addEvent(event: AnyIncomingEvent<any> | {
        id: string;
        type: string;
        payload: any;
        createdAt: string;
    }): Promise<void>;
    addMessage(message: AnyIncomingMessage<any>): Promise<void>;
}
//# sourceMappingURL=chat.d.ts.map