There is very simple solution that can remember the long conversation, more than 100+ messages history, and will answer the questions. It's a mix of prompt engineering + database + logical flow.
I have created a detailed article on how to implement it. Link below -
if you have doubts about anything lets discuss