langchain.js
    Preparing search index...

    Type Alias CreateRetrievalChainParams<RunOutput>

    Parameters for the createRetrievalChain method.

    type CreateRetrievalChainParams<RunOutput> = {
        combineDocsChain: BaseMessage<Record<string, any>, RunOutput>;
        retriever: BaseMessage | BaseMessage<Record<string, any>, BaseMessage[]>;
    }

    Type Parameters

    • RunOutput
    Index

    Properties

    combineDocsChain: BaseMessage<Record<string, any>, RunOutput>

    Runnable that takes inputs and produces a string output. The inputs to this will be any original inputs to this chain, a new context key with the retrieved documents, and chat_history (if not present in the inputs) with a value of [] (to easily enable conversational retrieval).

    retriever: BaseMessage | BaseMessage<Record<string, any>, BaseMessage[]>

    Retriever-like object that returns list of documents. Should either be a subclass of BaseRetriever or a Runnable that returns a list of documents. If a subclass of BaseRetriever, then it is expected that an input key be passed in - this is what is will be used to pass into the retriever. If this is NOT a subclass of BaseRetriever, then all the inputs will be passed into this runnable, meaning that runnable should take a object as input.