Skip to main content
This example demonstrates how to set and manage session state for different users and sessions. It shows how session state can be passed during runs and persists across multiple interactions within the same session.
1

Create a Python file

change_state_on_run.py
2

Set up your virtual environment

3

Install dependencies

4

Export your OpenAI API key

Set OpenAI Key

Set your OPENAI_API_KEY as an environment variable. You can get one from OpenAI.
5

Run Team