mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
Merge 46b75960ed into 05d8f11085
This commit is contained in:
commit
efbef35d3b
5 changed files with 67 additions and 1 deletions
|
|
@ -518,6 +518,11 @@ DEFAULT_CONFIG = {
|
|||
"threshold": 0.50, # compress when context usage exceeds this ratio
|
||||
"target_ratio": 0.20, # fraction of threshold to preserve as recent tail
|
||||
"protect_last_n": 20, # minimum recent messages to keep uncompressed
|
||||
"protect_first_n": 3, # head messages always preserved verbatim
|
||||
# (system prompt + first exchange). Lower this
|
||||
# to 1 if you rely on rolling compaction for
|
||||
# long-running sessions and don't want the
|
||||
# opening user/assistant turn pinned forever.
|
||||
|
||||
},
|
||||
|
||||
|
|
@ -3725,6 +3730,7 @@ def show_config():
|
|||
print(f" Threshold: {compression.get('threshold', 0.50) * 100:.0f}%")
|
||||
print(f" Target ratio: {compression.get('target_ratio', 0.20) * 100:.0f}% of threshold preserved")
|
||||
print(f" Protect last: {compression.get('protect_last_n', 20)} messages")
|
||||
print(f" Protect first: {compression.get('protect_first_n', 3)} messages")
|
||||
_aux_comp = config.get('auxiliary', {}).get('compression', {})
|
||||
_sm = _aux_comp.get('model', '') or '(auto)'
|
||||
print(f" Model: {_sm}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue