Overview
Theupdate() method allows you to modify an existing session after it has been created. This is useful when you need to update session metadata, status, or other properties.
Parameters
The ID of the session to update.
The custom ID associated with the session.
The context provided to the AI product during the session or ground-truth related context.
Additional metadata to associate with the session.
Any error message associated with the session. This is useful for tracking failed sessions or sessions that encountered issues.
Returns
Returns the updatedSession object.
Example
Use Cases
Recording Session Errors
Store error information when a session encounters issues:Adding Session Metadata
Update a session with additional metadata:Notes
- Pass
Noneexplicitly to clear a field’s value
Related Methods
- Create Session - Create a new session
- Get Session - Retrieve a session
- Get Session By Custom ID - Retrieve a session by its Custom ID
- List Sessions - List all sessions