refactor: update context compression configuration to use config.yaml and improve model handling
This commit is contained in:
@@ -33,6 +33,7 @@ class ContextCompressor:
|
||||
protect_last_n: int = 4,
|
||||
summary_target_tokens: int = 500,
|
||||
quiet_mode: bool = False,
|
||||
summary_model_override: str = None,
|
||||
):
|
||||
self.model = model
|
||||
self.threshold_percent = threshold_percent
|
||||
@@ -49,7 +50,8 @@ class ContextCompressor:
|
||||
self.last_completion_tokens = 0
|
||||
self.last_total_tokens = 0
|
||||
|
||||
self.client, self.summary_model = get_text_auxiliary_client()
|
||||
self.client, default_model = get_text_auxiliary_client()
|
||||
self.summary_model = summary_model_override or default_model
|
||||
|
||||
def update_from_response(self, usage: Dict[str, Any]):
|
||||
"""Update tracked token usage from API response."""
|
||||
|
||||
Reference in New Issue
Block a user