(Realtime API) Hows everyone managing longer than 30min sessions

I’m building an application that requires longer session windows.

Curious to know how others have implemented this without disruptions to the user side.

My current thought is to simply refresh the ephemeral token every 29 minutes and update my webRTC connection on the client side by managing two sessions.

First session would be the one that’s about to expire
Second session is the new session that the user will switch over to when the connection is established

1 Like

I don’t know that anyone’s doing that as a matter of course. Only user audio goes in, so you can’t load up a chat again with turns of whatever audio you want the assistant to imagine it spoke in the past.

You’d have to create something you can place in the instructions as a chat summary and recent chat exchanges to give the illusion someone is continuing with a bit of memory.

1 Like

That would be the idea

  1. Fetch new ephemeral token
  2. Keep old session alive
  3. Create summarization based on prior transcript
  4. Connect to new session with summarization
  5. Close old session
1 Like