import { BaseChain, ChainInputs } from "./base.js"; import { VectorStore } from "../vectorstores/base.js"; import { SerializedVectorDBQAChain } from "./serde.js"; import { BaseLanguageModel } from "../base_language/index.js"; import { CallbackManagerForChainRun } from "../callbacks/manager.js"; import { ChainValues } from "../schema/index.js"; export type LoadValues = Record; /** * Interface that extends the `ChainInputs` interface and defines the * input fields required for a VectorDBQAChain. It includes properties * such as `vectorstore`, `combineDocumentsChain`, * `returnSourceDocuments`, `k`, and `inputKey`. */ export interface VectorDBQAChainInput extends Omit { vectorstore: VectorStore; combineDocumentsChain: BaseChain; returnSourceDocuments?: boolean; k?: number; inputKey?: string; } /** * Class that represents a VectorDBQAChain. It extends the `BaseChain` * class and implements the `VectorDBQAChainInput` interface. It performs * a similarity search using a vector store and combines the search * results using a specified combine documents chain. */ export declare class VectorDBQAChain extends BaseChain implements VectorDBQAChainInput { static lc_name(): string; k: number; inputKey: string; get inputKeys(): string[]; get outputKeys(): string[]; vectorstore: VectorStore; combineDocumentsChain: BaseChain; returnSourceDocuments: boolean; constructor(fields: VectorDBQAChainInput); /** @ignore */ _call(values: ChainValues, runManager?: CallbackManagerForChainRun): Promise; _chainType(): "vector_db_qa"; static deserialize(data: SerializedVectorDBQAChain, values: LoadValues): Promise; serialize(): SerializedVectorDBQAChain; /** * Static method that creates a VectorDBQAChain instance from a * BaseLanguageModel and a vector store. It also accepts optional options * to customize the chain. * @param llm The BaseLanguageModel instance. * @param vectorstore The vector store used for similarity search. * @param options Optional options to customize the chain. * @returns A new instance of VectorDBQAChain. */ static fromLLM(llm: BaseLanguageModel, vectorstore: VectorStore, options?: Partial>): VectorDBQAChain; }