Skip to main content
A stored result belongs to its session. delete_session and delete_sessions remove the session’s index rows and payloads along with the session, scoped to what the delete was allowed to remove: a delete for one user never touches another user’s payloads, even if it names their session id.
delete_session_cascade.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run the example

Save the code above as delete_session_cascade.py, then run:
Full source: cookbook/02_agents/22_result_offloading/07_delete_session_cascade.py