summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-05-09 03:40:16 +0000
committersigoden <sigoden@gmail.com>2024-05-09 03:40:16 +0000
commitbe7bae0475913dd6fdf65094b9633921ea69a473 (patch)
treebd6a777e27905cd9c95379038f5610b470db018e
parentbc65e880be6da8c169cd7424c04b7d0048b4d422 (diff)
downloadaichat-be7bae0475913dd6fdf65094b9633921ea69a473.tar.gz
refactor: improve revise command execution
-rw-r--r--src/main.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 2b00240..397ab1e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -217,9 +217,7 @@ async fn execute(config: &GlobalConfig, mut input: Input) -> Result<()> {
}
"🤔 Revise" => {
let revision = Text::new("Enter your revision:").prompt()?;
- let text = input.text();
- let text =
- format!("[INST] {text} [/INST]\n{eval_str}\n[INST] {revision} [/INST]\n");
+ let text = format!("{}\n{revision}", input.text());
input.set_text(text);
return execute(config, input).await;
}