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> | Partial<RunnableConfig>[], batchOptions?: RunnableBatchOptions & {
        returnExceptions?: false;
    }): Promise<DocumentInterface<Record<string, any>>[][]>;
    batch(inputs: string[], options?: Partial<RunnableConfig> | Partial<RunnableConfig>[], batchOptions?: RunnableBatchOptions & {
        returnExceptions: true;
    }): Promise<(Error | DocumentInterface<Record<string, any>>[])[]>;
    batch(inputs: string[], options?: Partial<RunnableConfig> | Partial<RunnableConfig>[], batchOptions?: RunnableBatchOptions): Promise<(Error | DocumentInterface<Record<string, any>>[])[]>;
    getName(suffix?: string): string;
    getRelevantDocuments(query: string, config?: BaseCallbackConfig | Callbacks): Promise<DocumentInterface<Record<string, any>>[]>;
    invoke(input: string, options?: Partial<RunnableConfig>): Promise<DocumentInterface<Record<string, any>>[]>;
    stream(input: string, options?: Partial<RunnableConfig>): Promise<IterableReadableStreamInterface<DocumentInterface<Record<string, any>>[]>>;
    transform(generator: AsyncGenerator<string, any, unknown>, options: Partial<RunnableConfig>): AsyncGenerator<DocumentInterface<Record<string, any>>[], any, unknown>;
}

Type Parameters

Hierarchy (view full)

Implemented by

Properties

vectorStore: V

Methods