/**
 * Copyright 2026 The ODML Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { Message, MessageLike } from './conversation_config.js';
import { Mutex } from './mutex.js';
import { ChatInterface } from './orchestration/chat_interface.js';
import { BenchmarkInfo, Conversation as WasmConversation, Engine as WasmEngine } from './wasm_binding_types.js';
/**
 * LiteRT-LM Conversation
 */
export declare class Conversation implements ChatInterface {
    private readonly conversation;
    private readonly engine;
    private readonly mutexes;
    /**
     * Max vision tokens per image, passed to the image preprocessor. Should
     * match the engine's `maxVisionTokensPerImage` so images fit the
     * selected vision encoder signatures. 0 means no budget.
     */
    private readonly visualTokenBudget;
    private isBusy;
    constructor(conversation: WasmConversation, engine: WasmEngine, mutexes: {
        executor: Mutex;
    }, 
    /**
     * Max vision tokens per image, passed to the image preprocessor. Should
     * match the engine's `maxVisionTokensPerImage` so images fit the
     * selected vision encoder signatures. 0 means no budget.
     */
    visualTokenBudget?: number);
    /**
     * Sends a message to the LLM and returns its response, which also has the
     * turn's `finish_reason` and `executor_stats`.
     */
    sendMessage(message: MessageLike): Promise<Message>;
    /**
     * Sends a message to the LLM and returns a ReadableStream that yields
     * message chunks as they are generated. The last element of a turn that
     * ends has no content, only the turn's `finish_reason` and `executor_stats`.
     */
    sendMessageStreaming(message: MessageLike): ReadableStream<Message>;
    /**
     * Sends a signal to cancel any current generation.
     */
    cancel(): void;
    getHistory(): Promise<Message[]>;
    getTokenCount(): Promise<number>;
    getBenchmarkInfo(): Promise<BenchmarkInfo>;
    /**
     * Clones the conversation. The cloned conversation will be independent of the
     * original conversation, including the history, state, etc.
     */
    clone(): Promise<Conversation>;
    delete(): Promise<void>;
}
/**
 * Returns `message` without `finish_reason` and `executor_stats`, which
 * describe a response and are never sent back to the model.
 */
export declare function withoutEndOfTurnFields(message: Message): Message;
//# sourceMappingURL=conversation.d.ts.map