summaryrefslogtreecommitdiffstats
path: root/src/config/role.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-03-04 11:08:59 +0800
committerGitHub <noreply@github.com>2024-03-04 11:08:59 +0800
commit3f693ea060d96b0adc397768c3b2dd47708a20ce (patch)
treed805b526aa7423d839a1c52907057e13efa0f38c /src/config/role.rs
parent9e15a3409e7080f0cf06b6dcfc0077142e3e8972 (diff)
downloadaichat-3f693ea060d96b0adc397768c3b2dd47708a20ce.tar.gz
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
Diffstat (limited to 'src/config/role.rs')
-rw-r--r--src/config/role.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config/role.rs b/src/config/role.rs
index 1acf027..2bff545 100644
--- a/src/config/role.rs
+++ b/src/config/role.rs
@@ -72,7 +72,7 @@ For example if the prompt is "Hello world Python", you should return "print('Hel
}
}
- pub fn info(&self) -> Result<String> {
+ pub fn export(&self) -> Result<String> {
let output = serde_yaml::to_string(&self)
.with_context(|| format!("Unable to show info about role {}", &self.name))?;
Ok(output.trim_end().to_string())