UpdateContext feeds information into the conversation without triggering a visible response. Where SendMessage creates a chat message the user sees, UpdateContext works behind the scenes — it updates what the model knows without interrupting the flow.
When to Use It
UpdateContext is for situations where the UI interaction should inform the model’s future behavior without generating an immediate response:
- User selects a preference or mode that should influence subsequent answers
- A form submission captures structured data the model should reference later
- Background state changes that provide context for the next conversation turn
Structured Content
For richer data, pass a dict instead of plain text:API Reference
Protocol Reference
UpdateContext