Skip to content
Discussion options

You must be logged in to vote

🤖

Yes, you can add multiple types of chains such as RetrievalQAChain, ConversationChain, and LLMChain to a SimpleSequentialChain. The SimpleSequentialChain class in the langchainjs codebase does allow for the addition of multiple types of chains. However, it's important to note that each chain used in SimpleSequentialChain should have exactly one input and one output. This is validated in the _validateChains method of the SimpleSequentialChain class. If a chain does not meet these criteria, an error will be thrown.

Here is an example of how you can add multiple chains to a SimpleSequentialChain:

const chain1 = new RetrievalQAChain({
  combineDocumentsChain: loadQAStuffChain(model),
  retr…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Elindo586
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants