langchain.js
    Preparing search index...

    Interface RunnableInterface<RunInput, RunOutput, CallOptions>

    Base interface implemented by all runnables. Used for cross-compatibility between different versions of LangChain core.

    Should not change on patch releases.

    interface RunnableInterface<
        RunInput = any,
        RunOutput = any,
        CallOptions extends RunnableConfig = RunnableConfig,
    > {
        lc_serializable: boolean;
        get lc_id(): string[];
        batch(
            inputs: RunInput[],
            options?: Partial<CallOptions> | Partial<CallOptions>[],
            batchOptions?: RunnableBatchOptions & { returnExceptions?: false },
        ): Promise<RunOutput[]>;
        batch(
            inputs: RunInput[],
            options?: Partial<CallOptions> | Partial<CallOptions>[],
            batchOptions?: RunnableBatchOptions & { returnExceptions: true },
        ): Promise<(Error | RunOutput)[]>;
        batch(
            inputs: RunInput[],
            options?: Partial<CallOptions> | Partial<CallOptions>[],
            batchOptions?: RunnableBatchOptions,
        ): Promise<(Error | RunOutput)[]>;
        getName(suffix?: string): string;
        invoke(input: RunInput, options?: Partial<CallOptions>): Promise<RunOutput>;
        stream(
            input: RunInput,
            options?: Partial<CallOptions>,
        ): Promise<IterableReadableStreamInterface<RunOutput>>;
        transform(
            generator: AsyncGenerator<RunInput>,
            options: Partial<CallOptions>,
        ): AsyncGenerator<RunOutput>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    lc_serializable: boolean

    Accessors

    • get lc_id(): string[]

      Returns string[]

    Methods

    • Parameters

      • Optionalsuffix: string

      Returns string

    • Parameters

      Returns AsyncGenerator<RunOutput>