Skip to content

Add context compaction support#156

Merged
shawnthapa merged 1 commit into
mainfrom
user/sthapa/compaction
May 30, 2026
Merged

Add context compaction support#156
shawnthapa merged 1 commit into
mainfrom
user/sthapa/compaction

Conversation

@shawnthapa
Copy link
Copy Markdown
Member

Add context compaction support

Checklist

  • I have read both the CONTRIBUTING.md and Contributor License Agreement documents.
  • I have created an issue or feature request and received approval from xAI maintainers. (minor changes like fixing typos can skip this step)
  • I have tested my changes locally and they pass all CI checks.
  • I have added necessary documentation or updated existing documentation.

Description

Wire up the CompactContext gRPC surface with:

  • CompactContextResponse wrapper class with convenience accessors
  • compact_context() method on both sync and async Chat clients
  • compaction() message helper (ROLE_USER + encrypted_content)
  • Sync and async example scripts demonstrating compaction

Related Issue

N/A

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Other (please specify)

@shawnthapa shawnthapa requested a review from a team as a code owner May 30, 2026 01:27
@shawnthapa shawnthapa merged commit 469da5f into main May 30, 2026
7 checks passed
@shawnthapa shawnthapa deleted the user/sthapa/compaction branch May 30, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants