From 3f693ea060d96b0adc397768c3b2dd47708a20ce Mon Sep 17 00:00:00 2001 From: sigoden Date: Mon, 4 Mar 2024 11:08:59 +0800 Subject: feat: compress session automaticlly (#333) * feat: compress session automaticlly * non-block * update field description * set compress_threshold * update session::clear_messages * able to override session compress_threshold * enable compress_threshold by default * make session compress_threshold optional --- README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 501a34c..2d353f5 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ wrap_code: false # Whether wrap code block auto_copy: false # Automatically copy the last output to the clipboard keybindings: emacs # REPL keybindings. values: emacs, vi prelude: '' # Set a default role or session (role:, session:) +compress_threshold: 1000 # Compress session if tokens exceed this value (valid when >=1000) clients: - type: openai @@ -296,6 +297,7 @@ Usage: .file ... [-- text...] > .set highlight false > .set save false > .set auto_copy true +> .set compress_threshold 1000 ``` ## Command -- cgit v1.2.3