import { LLMCache, LLMMeta, EmbeddingOptions, EmbeddingOutput, ExecutionOptions, BaseLLMEvents, BaseLLMTokenizeOutput, AsyncStream } from './llms/base.js'; import { WatsonXLLMInput, WatsonXLLMOutput, WatsonXLLM, WatsonXLLMParameters, WatsonXLLMGenerateOptions } from './adapters/watsonx/llm.js'; import { ChatLLMOutput, ChatLLMGenerateEvents, ChatLLM } from './llms/chat.js'; import { BaseMessage } from './llms/primitives/message.js'; import { E as Emitter } from './emitter-l0W9gC1A.js'; import { GetRunContext } from './context.js'; /** * Copyright 2025 IBM Corp. * * 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. */ interface WatsonXChatLLMPreset { chat: WatsonXChatLLMInputConfig; base: Omit; } declare const WatsonXChatLLMPreset: { readonly "meta-llama/llama-3-3-70b-instruct": () => WatsonXChatLLMPreset; readonly "ibm/granite-3-8b-instruct": () => WatsonXChatLLMPreset; readonly "ibm/granite-3-2b-instruct": () => WatsonXChatLLMPreset; readonly "meta-llama/llama-3-1-70b-instruct": () => WatsonXChatLLMPreset; readonly "meta-llama/llama-3-1-405b-instruct": () => WatsonXChatLLMPreset; readonly "meta-llama/llama-3-1-8b-instruct": () => WatsonXChatLLMPreset; readonly "meta-llama/llama-3-70b-instruct": () => WatsonXChatLLMPreset; readonly "meta-llama/llama-3-8b-instruct": () => WatsonXChatLLMPreset; }; type WatsonXChatLLMPresetModel = keyof typeof WatsonXChatLLMPreset; declare class WatsonXChatLLMOutput extends ChatLLMOutput { readonly raw: WatsonXLLMOutput; constructor(rawOutput: WatsonXLLMOutput); get messages(): BaseMessage[]; merge(other: WatsonXChatLLMOutput): void; getTextContent(): string; toString(): string; createSnapshot(): { raw: WatsonXLLMOutput; }; loadSnapshot(snapshot: ReturnType): void; } interface WatsonXChatLLMInputConfig { messagesToPrompt: (messages: BaseMessage[]) => string; } interface WatsonXChatLLMInput { llm: WatsonXLLM; config: WatsonXChatLLMInputConfig; cache?: LLMCache; } type WatsonXChatLLMEvents = ChatLLMGenerateEvents; declare class WatsonXChatLLM extends ChatLLM { readonly emitter: Emitter; readonly llm: WatsonXLLM; protected readonly config: WatsonXChatLLMInputConfig; readonly parameters: WatsonXLLMParameters; constructor({ llm, config, cache }: WatsonXChatLLMInput); meta(): Promise; embed(input: BaseMessage[][], options?: EmbeddingOptions): Promise; createSnapshot(): { modelId: string; parameters: WatsonXLLMParameters; executionOptions: ExecutionOptions; llm: WatsonXLLM; config: WatsonXChatLLMInputConfig; emitter: Emitter>; cache: LLMCache; }; loadSnapshot(data: ReturnType): void; tokenize(messages: BaseMessage[]): Promise; protected _generate(messages: BaseMessage[], options: WatsonXLLMGenerateOptions | undefined, run: GetRunContext): Promise; protected _stream(messages: BaseMessage[], options: WatsonXLLMGenerateOptions | undefined, run: GetRunContext): AsyncStream; messagesToPrompt(messages: BaseMessage[]): string; static fromPreset(modelId: WatsonXChatLLMPresetModel, overrides: Omit & { parameters?: WatsonXLLMParameters | ((value: WatsonXLLMParameters) => WatsonXLLMParameters); }): WatsonXChatLLM; } export { WatsonXChatLLMPreset as W, type WatsonXChatLLMPresetModel as a, WatsonXChatLLMOutput as b, type WatsonXChatLLMInputConfig as c, type WatsonXChatLLMInput as d, type WatsonXChatLLMEvents as e, WatsonXChatLLM as f };