Gradio Session in API

I have a project minigpt4 that uses Gradio. and Gradio is taking care of sessions but when I leverage API with Gradio, it doesn’t respect the sessions. Any hints ?