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

Should not change on patch releases.

interface VectorStoreRetrieverInterface<V> {
    vectorStore: V;
    addDocuments(documents: DocumentInterface<Record<string, any>>[], options?: AddDocumentOptions): Promise<void | string[]>;
    batch(inputs: string[], options?: Partial<RunnableConfig<Record<string, any>>> | Partial<RunnableConfig<Record<string, any>>>[], batchOptions?: RunnableBatchOptions & {
        returnExceptions?: false;
    }): Promise<DocumentInterface<Record<string, any>>[][]>;
    batch(inputs: string[], options?: Partial<RunnableConfig<Record<string, any>>> | Partial<RunnableConfig<Record<string, any>>>[], batchOptions?: RunnableBatchOptions & {
        returnExceptions: true;
    }): Promise<(Error | DocumentInterface<Record<string, any>>[])[]>;
    batch(inputs: string[], options?: Partial<RunnableConfig<Record<string, any>>> | Partial<RunnableConfig<Record<string, any>>>[], batchOptions?: RunnableBatchOptions): Promise<(Error | DocumentInterface<Record<string, any>>[])[]>;
    getName(suffix?: string): string;
    getRelevantDocuments(query: string, config?: Callbacks | BaseCallbackConfig): Promise<DocumentInterface<Record<string, any>>[]>;
    invoke(input: string, options?: Partial<RunnableConfig<Record<string, any>>>): Promise<DocumentInterface<Record<string, any>>[]>;
    stream(input: string, options?: Partial<RunnableConfig<Record<string, any>>>): Promise<IterableReadableStreamInterface<DocumentInterface<Record<string, any>>[]>>;
    transform(generator: AsyncGenerator<string, any, unknown>, options: Partial<RunnableConfig<Record<string, any>>>): AsyncGenerator<DocumentInterface<Record<string, any>>[], any, unknown>;
}

Type Parameters

Hierarchy (view full)

Implemented by

Properties

vectorStore: V

Methods