Runtime context_window_compression parameter #796 - 8#807
Conversation
| | `output_audio_transcription` | `Optional[types.AudioTranscriptionConfig]` | `AudioTranscriptionConfig` (nullable via `@Nullable`) | `None` / `null` | Configures transcription of generated audio output using the `AudioTranscriptionConfig` type. | | ||
| | `max_llm_calls` | `int` | `int` | `500` / `500` | Limits total LLM calls per run. `0` or negative means unlimited (warned); `sys.maxsize` raises `ValueError`. | | ||
| | `support_cfc` | `bool` | *Currently not supported* | `False` / N/A | **Python:** Enables Compositional Function Calling. Requires `streaming_mode=SSE` and uses the LIVE API. **Experimental.** | | ||
| | `context_window_compression` | `Optional[types.ContextWindowCompressionConfig]` | | `None` | Configuration for context window compression. | |
There was a problem hiding this comment.
This change is not sufficient to document this feature. What are the settings of the ContextWindowCompressionConfig class? What's a minimal example of setting this config?
Issue is closed given the below information#19 Runtime context_window_compression parameter #807 Reasoning:As part of the RunConfig, the ContextWindowCompressionConfig class serves as a way to manage the model’s context window. This feature helps by not exceeding the number of tokens of working memory of the model by compressing or sliding the model’s conversation history. Implementation Example:In a standard ADK agent.py or script using RunConfig, it is typically configured like this: ContextWindowCompressionConfig class’ settingsThe class’ settings are the following:
|
This pull request adds documentation for the new
context_window_compressionattribute inRunConfig, as requested in issue #796.