Optimize the condense conditions of the condenser (#11332)

Signed-off-by: CLFutureX <chenyongqyl@163.com>
Co-authored-by: mamoodi <mamoodiha@gmail.com>
This commit is contained in:
PiteXChen
2025-10-26 23:23:22 +08:00
committed by GitHub
parent 86c590cdc3
commit 0ff7329424
4 changed files with 4 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ class AmortizedForgettingCondenser(RollingCondenser):
return Condensation(action=event)
def should_condense(self, view: View) -> bool:
return len(view) > self.max_size
return len(view) > self.max_size or view.unhandled_condensation_request
@classmethod
def from_config(

View File

@@ -116,7 +116,7 @@ class LLMAttentionCondenser(RollingCondenser):
return Condensation(action=event)
def should_condense(self, view: View) -> bool:
return len(view) > self.max_size
return len(view) > self.max_size or view.unhandled_condensation_request
@classmethod
def from_config(

View File

@@ -158,7 +158,7 @@ CURRENT_STATE: Last flip: Heads, Haiku count: 15/20"""
)
def should_condense(self, view: View) -> bool:
return len(view) > self.max_size
return len(view) > self.max_size or view.unhandled_condensation_request
@classmethod
def from_config(

View File

@@ -305,7 +305,7 @@ Capture all relevant information, especially:
)
def should_condense(self, view: View) -> bool:
return len(view) > self.max_size
return len(view) > self.max_size or view.unhandled_condensation_request
@classmethod
def from_config(