import { AIMessageChunk, type BaseMessage } from "@langchain/core/messages"; import { BaseLanguageModelInput, StructuredOutputMethodOptions } from "@langchain/core/language_models/base"; import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager"; import { BaseChatModel, BaseChatModelCallOptions, BindToolsInput, LangSmithParams, type BaseChatModelParams } from "@langchain/core/language_models/chat_models"; import { ChatGenerationChunk, ChatResult } from "@langchain/core/outputs"; import { DeploymentsTextChatParams, RequestCallbacks, TextChatParameterTools, TextChatParams, TextChatResponseFormat, TextChatToolCall } from "@ibm-cloud/watsonx-ai/dist/watsonx-ai-ml/vml_v1.js"; import { WatsonXAI } from "@ibm-cloud/watsonx-ai"; import { Runnable } from "@langchain/core/runnables"; import { z } from "zod"; import { Neverify, WatsonxAuth, WatsonxChatBasicOptions, WatsonxDeployedParams, WatsonxParams } from "../types/ibm.js"; export interface WatsonxDeltaStream { role?: string; content?: string; tool_calls?: TextChatToolCall[]; refusal?: string; } export interface WatsonxCallParams extends Partial> { } export interface WatsonxCallDeployedParams extends DeploymentsTextChatParams { } export interface WatsonxCallOptionsChat extends Omit, WatsonxCallParams, WatsonxChatBasicOptions { promptIndex?: number; tool_choice?: TextChatParameterTools | string | "auto" | "any"; } export interface WatsonxCallOptionsDeployedChat extends Omit, WatsonxCallDeployedParams, WatsonxChatBasicOptions { promptIndex?: number; tool_choice?: TextChatParameterTools | string | "auto" | "any"; } type ChatWatsonxToolType = BindToolsInput | TextChatParameterTools; export interface ChatWatsonxInput extends BaseChatModelParams, WatsonxParams, WatsonxCallParams, Neverify> { } export interface ChatWatsonxDeployedInput extends BaseChatModelParams, WatsonxDeployedParams, Neverify { } export type ChatWatsonxConstructor = BaseChatModelParams & Partial & WatsonxDeployedParams & WatsonxCallParams; export declare class ChatWatsonx extends BaseChatModel implements ChatWatsonxConstructor { static lc_name(): string; lc_serializable: boolean; get lc_secrets(): { [key: string]: string; }; get lc_aliases(): { [key: string]: string; }; getLsParams(options: this["ParsedCallOptions"]): LangSmithParams; model?: string; version: string; maxTokens: number; maxRetries: number; serviceUrl: string; spaceId?: string; projectId?: string; idOrName?: string; frequencyPenalty?: number; logprobs?: boolean; topLogprobs?: number; n?: number; presencePenalty?: number; temperature?: number; topP?: number; timeLimit?: number; maxConcurrency?: number; service: WatsonXAI; responseFormat?: TextChatResponseFormat; streaming: boolean; watsonxCallbacks?: RequestCallbacks; constructor(fields: (ChatWatsonxInput | ChatWatsonxDeployedInput) & WatsonxAuth); _llmType(): string; invocationParams(options: this["ParsedCallOptions"]): { maxTokens: number; temperature: number | undefined; timeLimit: number | undefined; topP: number | undefined; presencePenalty: number | undefined; n: number | undefined; topLogprobs: number | undefined; logprobs: boolean | NonNullable | undefined; frequencyPenalty: number | undefined; tools: TextChatParameterTools[] | undefined; responseFormat: CallOptions["responseFormat"] | undefined; }; invocationCallbacks(options: this["ParsedCallOptions"]): RequestCallbacks | undefined; bindTools(tools: ChatWatsonxToolType[], kwargs?: Partial): Runnable; scopeId(): { idOrName: string; } | { projectId: string; modelId: string; } | { spaceId: string; modelId: string; } | { modelId: string; }; completionWithRetry(callback: () => T, options?: this["ParsedCallOptions"]): Promise; _generate(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise; _streamResponseChunks(messages: BaseMessage[], options: this["ParsedCallOptions"], _runManager?: CallbackManagerForLLMRun): AsyncGenerator; /** @ignore */ _combineLLMOutput(): never[]; withStructuredOutput = Record>(outputSchema: z.ZodType | Record, config?: StructuredOutputMethodOptions): Runnable; withStructuredOutput = Record>(outputSchema: z.ZodType | Record, config?: StructuredOutputMethodOptions): Runnable; } export {};