OpenAI hosted and compaction sessions
Two more session types. One keeps the conversation in OpenAI's Conversations API so you run no database. The other wraps a session and shrinks a long history. Watch when compaction happens and why a run waits for it.
10 minPro
Checking your access…
Inside this lesson
- An animation you play, pause and step through, with each part saying what it is doing.
- The real code beside it, with the lines for each step lit up.
- Practice mode, where you route each message yourself, and a short quiz.
- About 10 minutes.
Written from the official documentation
In this module: Sessions and memory
- Choosing a memory strategyManual history, sessions or server managed conversations.Pro
- SessionsRemembering the conversation between runs.Pro
- Session backendsSQLite, Redis, SQLAlchemy, MongoDB, Dapr or your own class.Pro
- OpenAI hosted and compaction sessionsStore history on OpenAI and shrink long conversations.Pro
- Advanced SQLite and encrypted sessionsBranch a conversation, track usage and encrypt stored history.Pro