Skip to content
Discussion options

You must be logged in to vote

Hi!

I managed to get this to work by adding the following RunnableSequence to my chain:

const memoryChain = RunnableSequence.from([
    RunnablePassthrough.assign({ 
      msgs: async () => chatHistory.getMessages(),
    }),
    async (input: any) => memory.predictNewSummary(input.msgs, ""),
]);

// Gets the history of the conversation
RunnablePassthrough.assign({ 
  history: memoryChain,
}),

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mauriciocirelli
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