Session state in the new ChatInterface

Hi there! I was checking at the new docs for the gr.ChatInterface() and I am unclear how can I apply session state to that.
Any help would be appreciated.
Thank you in advance!

Can you elaborate a bit more? What are you trying to accomplish?

Yes , definitely. I want to create a chatbot with the new gr.ChatInterface(),with chat history but the chat history to be different for every user and not to get jumbled between different users.,how can I implement that with session state,where the chat history is different for every user.

Basically, data not being shared between different users of the chatbot.

That’s already baked into the gr.ChatInterface. Please see the examples here: Gradio ChatInterface Docs

(and you can try running them from different browser tabs to ensure that conversation history is not shared)

Any solution?

hi @nbaru , the session is ephemeral, so if you refresh the connection you will get a new session and all the previous chat is gone.
However, you can implement a form of login using an experimental OAuth with Gradio and HF hub.
Essentially, you will have to implement some local storage and when the user returns you can load the previous chat data.

Any solutions?