import { Runnable, RunnableBatchOptions } from "./base.js"; import { type RunnableConfig } from "./config.js"; import { CallbackManagerForChainRun } from "../callbacks/manager.js"; import { RunLogPatch, type LogStreamCallbackHandlerInput, type StreamEvent } from "../tracers/log_stream.js"; import { IterableReadableStream } from "../utils/stream.js"; type RemoteRunnableOptions = { timeout?: number; headers?: Record; }; /** * Client for interacting with LangChain runnables * that are hosted as LangServe endpoints. * * Allows you to interact with hosted runnables using the standard * `.invoke()`, `.stream()`, `.streamEvents()`, etc. methods that * other runnables support. * * @deprecated LangServe is no longer actively developed - please consider using LangGraph Platform. * * @param url - The base URL of the LangServe endpoint. * @param options - Optional configuration for the remote runnable, including timeout and headers. * @param fetch - Optional custom fetch implementation. * @param fetchRequestOptions - Optional additional options for fetch requests. */ export declare class RemoteRunnable extends Runnable { private url; private options?; fetchImplementation: (...args: any[]) => any; fetchRequestOptions?: Record; lc_namespace: string[]; constructor(fields: { url: string; options?: RemoteRunnableOptions; fetch?: (...args: any[]) => any; fetchRequestOptions?: Record; }); private post; _invoke(input: RunInput, options?: Partial, _?: CallbackManagerForChainRun): Promise; invoke(input: RunInput, options?: Partial): Promise; _batch(inputs: RunInput[], options?: Partial[], _?: (CallbackManagerForChainRun | undefined)[], batchOptions?: RunnableBatchOptions): Promise<(RunOutput | Error)[]>; batch(inputs: RunInput[], options?: Partial | Partial[], batchOptions?: RunnableBatchOptions & { returnExceptions?: false; }): Promise; batch(inputs: RunInput[], options?: Partial | Partial[], batchOptions?: RunnableBatchOptions & { returnExceptions: true; }): Promise<(RunOutput | Error)[]>; batch(inputs: RunInput[], options?: Partial | Partial[], batchOptions?: RunnableBatchOptions): Promise<(RunOutput | Error)[]>; _streamIterator(input: RunInput, options?: Partial): AsyncGenerator; streamLog(input: RunInput, options?: Partial, streamOptions?: Omit): AsyncGenerator; _streamEvents(input: RunInput, options: Partial & { version: "v1" | "v2"; }, streamOptions?: Omit | undefined): AsyncGenerator; streamEvents(input: RunInput, options: Partial & { version: "v1" | "v2"; }, streamOptions?: Omit): IterableReadableStream; streamEvents(input: RunInput, options: Partial & { version: "v1" | "v2"; encoding: "text/event-stream"; }, streamOptions?: Omit): IterableReadableStream; } export {};