I'm building a backend (with fastapi) with llamaindex and trying to understand in general how to handle multiple users at once. I'm using chat_engine. I am not using websockets, but will have some kind of chat id for each interaction
What would be the best way to build this? Option 1: Store a dictionary of chat engines (with chat ids as keys) and then on each request, get the chat engine for that user Option 2: Create a SimpleChatStore and store the chat history for each interaction (by chat engine), and on each request initialize a chat engine with the history for that user.
I've looked through the documentation, and it still does not feel clear to me what is best practice
@Logan M gotcha, so storing the chat history, and on each request initiating a chat engine with that chat history (for that session id/conversation id or however it's being stored?)