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, RunOutput, CallOptions> {
    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, any, unknown>, options: Partial<CallOptions>): AsyncGenerator<RunOutput, any, unknown>;
}

Type Parameters

Hierarchy (view full)

Implemented by

Methods