Apologies in advance as this is probably an easy thing to fix. I'm still new to programming and learning as I go.
I'm working on a chatbot using Python Flask, OpenAI's LLM, and the LLAMA Index library. It’s currently being hosted off AWS.
Right now, everyone who uses it, no matter what the device, shares the same chat history. So, if one person says their name is Bob, anyone can ask "What's my name?" and the bot will answer "Bob." I want to make it so each person has their own chat history with the bot, even if they switch between devices. This way, the chatbot can remember conversations with individual users, not mix everyone's chats together.
I know LLMs are stateless so each API call should be a new call, and I know that I am using Llama index to pass in chat history but I don't know how to start a new session for each device/user.
I’ve tested this outside of AWS on my local machine using different browsers so I do not think its NGINX.
Ive also tried the Flask Sessions library but have not had any luck.
Has anyone done something like this or have any tips on where to start?