babylon.rag.context_window.config
Configuration model for the context window management system.
This module defines ContextWindowConfig, a Pydantic model that
controls how the context window manager operates. Configuration includes:
Maximum token limits (model-specific)
Capacity thresholds for triggering optimization
Prioritization strategies (relevance, recency, hybrid)
Minimum importance scores for content retention
The config can be instantiated with defaults or loaded from BaseConfig for integration with the broader Babylon configuration system.
See also
ContextWindowManager:The manager that uses this configuration.
BaseConfig:Source of default values when using
from_base_config().
Classes
|
Configuration for the Context Window Management system. |
- class babylon.rag.context_window.config.ContextWindowConfig(**data)[source]
Bases:
BaseModelConfiguration for the Context Window Management system.
- Parameters:
- max_token_limit
Maximum number of tokens allowed in the context window
- capacity_threshold
Percentage of capacity at which optimization should trigger
- prioritization_strategy
Strategy for content prioritization (relevance, recency, hybrid)
- min_content_importance
Minimum importance score for content to be kept in context
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].