Skip to content

Trouble following docs on Seemingly simple SequentialChain usage. Maybe I need to implement this in another way, or maybe there is something simple I am doing wrong. #1434

Answered by Kadajett
Kadajett asked this question in Q&A
Discussion options

You must be logged in to vote

So, I am not going to call this a solution, but it works for sure. Moving away from automatically combining things, I am calling them all individually with pretty good success. I will keep looking into a better solution, but hopefully the SequentialAction docs get expanded.

For those searching for the same thing, here is the code I used to manually call all the different bits of functionality.

export const askQuestion = async (
  qaChain: RetrievalQAChain,
  promptChain: LLMChain,
  memory: EntityMemory,
  question: string,
  retriever: BaseRetriever,
  // You might need to replace any[] with the correct type for chat_history.
): Promise<ChainValues> => {
  // call each chain individually.

Replies: 1 comment

Comment options

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