import { EmbeddingOptions, ExecutionOptions, LLMCache, LLMMeta, EmbeddingOutput, BaseLLMTokenizeOutput, GenerateOptions, StreamGenerateOptions, AsyncStream, BaseLLMEvents } from '../../llms/base.cjs';
import { ChatLLMOutput, ChatLLMGenerateEvents, ChatLLM } from '../../llms/chat.cjs';
import { BaseMessage } from '../../llms/primitives/message.cjs';
import { E as Emitter } from '../../emitter-BWtGHYn0.cjs';
import { AwsCredentialIdentity, Provider } from '@aws-sdk/types';
import { ContentBlockDeltaEvent, ConverseCommandOutput, BedrockRuntimeClient, InferenceConfiguration, Message, SystemContentBlock } from '@aws-sdk/client-bedrock-runtime';
import { GetRunContext } from '../../context.cjs';
import '../../errors.cjs';
import '../../internals/types.cjs';
import '../../internals/helpers/guards.cjs';
import '../../internals/serializable.cjs';
import '../../cache/base.cjs';
import 'promise-based-task';
import '../../internals/helpers/promise.cjs';

type Response = ContentBlockDeltaEvent | ConverseCommandOutput;
interface BedrockEmbeddingOptions extends EmbeddingOptions {
    body?: Record<string, any>;
}
declare class ChatBedrockOutput extends ChatLLMOutput {
    readonly responses: Response[];
    constructor(response: Response);
    get messages(): BaseMessage[];
    getTextContent(): string;
    merge(other: ChatBedrockOutput): void;
    toString(): string;
    createSnapshot(): {
        responses: Response[];
    };
    loadSnapshot(snapshot: ReturnType<typeof this.createSnapshot>): void;
}
interface Input {
    modelId?: string;
    region?: string;
    client?: BedrockRuntimeClient;
    credentials?: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
    parameters?: InferenceConfiguration;
    executionOptions?: ExecutionOptions;
    cache?: LLMCache<ChatBedrockOutput>;
}
type BedrockChatLLMEvents = ChatLLMGenerateEvents<ChatBedrockOutput>;
declare class BedrockChatLLM extends ChatLLM<ChatBedrockOutput> {
    readonly emitter: Emitter<BedrockChatLLMEvents>;
    readonly client: BedrockRuntimeClient;
    readonly parameters: Partial<InferenceConfiguration>;
    constructor({ client, modelId, region, credentials, parameters, executionOptions, cache, }?: Input);
    meta(): Promise<LLMMeta>;
    embed(input: BaseMessage[][], options?: BedrockEmbeddingOptions): Promise<EmbeddingOutput>;
    tokenize(input: BaseMessage[]): Promise<BaseLLMTokenizeOutput>;
    protected _generate(input: BaseMessage[], _options: Partial<GenerateOptions>, run: GetRunContext<typeof this>): Promise<ChatBedrockOutput>;
    protected _stream(input: BaseMessage[], _options: StreamGenerateOptions | undefined, run: GetRunContext<typeof this>): AsyncStream<ChatBedrockOutput>;
    createSnapshot(): {
        client: BedrockRuntimeClient;
        modelId: string;
        parameters: Partial<InferenceConfiguration>;
        executionOptions: ExecutionOptions;
        emitter: Emitter<BaseLLMEvents<unknown, ChatBedrockOutput>>;
        cache: LLMCache<ChatBedrockOutput>;
    };
    protected convertToConverseMessages(messages: BaseMessage[]): {
        conversation: Message[];
        systemMessage: SystemContentBlock[];
    };
}

export { BedrockChatLLM, type BedrockChatLLMEvents, type BedrockEmbeddingOptions, ChatBedrockOutput };
