• Create a chain that passes a list of documents to a model.

    Type Parameters

    • RunOutput = string

    Parameters

    • __namedParameters: {
          documentPrompt?: BasePromptTemplate<any, BasePromptValueInterface, any>;
          documentSeparator?: string;
          llm: LanguageModelLike;
          outputParser?: BaseOutputParser<RunOutput>;
          prompt: BasePromptTemplate<any, BasePromptValueInterface, any>;
      }
      • OptionaldocumentPrompt?: BasePromptTemplate<any, BasePromptValueInterface, any>
      • OptionaldocumentSeparator?: string
      • llm: LanguageModelLike
      • OptionaloutputParser?: BaseOutputParser<RunOutput>
      • prompt: BasePromptTemplate<any, BasePromptValueInterface, any>

    Returns Promise<RunnableSequence<Record<string, unknown>, Exclude<RunOutput, Error>>>

    An LCEL Runnable chain. Expects a dictionary as input with a list of Documents being passed under the "context" key. Return type depends on the output_parser used.