File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -124,16 +124,16 @@ os.environ["COSMOSDB_ENDPOINT"] = "your_cosmosdb_endpoint"
124124os.environ[" COSMOSDB_KEY" ] = " your_cosmosdb_key"
125125
126126# Database and Container are created if they don't exist
127- checkpointer = CosmosDBSaver( # [!code highlight]
127+ with CosmosDBSaver( # [!code highlight]
128128 database_name = " your_database" , # [!code highlight]
129129 container_name = " your_container" # [!code highlight]
130- ) # [!code highlight]
130+ ) as checkpointer: # [!code highlight]
131131
132- agent = create_agent(
133- " gpt-5" ,
134- [get_user_info],
135- checkpointer = checkpointer, # [!code highlight]
136- )
132+ agent = create_agent(
133+ " gpt-5" ,
134+ [get_user_info],
135+ checkpointer = checkpointer, # [!code highlight]
136+ )
137137```
138138
139139<Note >
You can’t perform that action at this time.
0 commit comments