diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-22 06:54:03 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-22 06:54:03 +0800 |
| commit | d645046d2d729a55345e18f97fefcab545086f53 (patch) | |
| tree | ceef0afa1d693a827441bf2157ef7ecc9359d3ff /src/repl | |
| parent | 52cd3efd6c6588a957fd11d56580cb54ba868724 (diff) | |
| download | aichat-d645046d2d729a55345e18f97fefcab545086f53.tar.gz | |
refactor: rename bot to agent (#628)
Diffstat (limited to 'src/repl')
| -rw-r--r-- | src/repl/mod.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/repl/mod.rs b/src/repl/mod.rs index 1214fb5..d187956 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -102,10 +102,10 @@ lazy_static! { "Leave the rag", AssertState::TrueFalse(StateFlags::RAG, StateFlags::BOT), ), - ReplCommand::new(".bot", "Use a bot", AssertState::bare()), + ReplCommand::new(".agent", "Use a agent", AssertState::bare()), ReplCommand::new( - ".info bot", - "View bot info", + ".info agent", + "View agent info", AssertState::True(StateFlags::BOT), ), ReplCommand::new( @@ -114,8 +114,8 @@ lazy_static! { AssertState::True(StateFlags::BOT) ), ReplCommand::new( - ".exit bot", - "Leave the bot", + ".exit agent", + "Leave the agent", AssertState::True(StateFlags::BOT) ), ReplCommand::new( @@ -221,8 +221,8 @@ impl Repl { let info = self.config.read().rag_info()?; println!("{}", info); } - Some("bot") => { - let info = self.config.read().bot_info()?; + Some("agent") => { + let info = self.config.read().agent_info()?; println!("{}", info); } Some(_) => unknown_command()?, @@ -262,12 +262,12 @@ impl Repl { ".rag" => { Config::use_rag(&self.config, args, self.abort_signal.clone()).await?; } - ".bot" => match args { + ".agent" => match args { Some(name) => { - Config::use_bot(&self.config, name, None, self.abort_signal.clone()) + Config::use_agent(&self.config, name, None, self.abort_signal.clone()) .await?; } - None => println!(r#"Usage: .bot <name>"#), + None => println!(r#"Usage: .agent <name>"#), }, ".starter" => match args { Some(value) => { @@ -275,7 +275,7 @@ impl Repl { ask(&self.config, self.abort_signal.clone(), input, true).await?; } None => { - let banner = self.config.read().bot_banner()?; + let banner = self.config.read().agent_banner()?; let output = format!( r#"Usage: .starter <text>... @@ -362,8 +362,8 @@ Tips: use <tab> to autocomplete conversation starter text. Some("rag") => { self.config.write().exit_rag()?; } - Some("bot") => { - self.config.write().exit_bot()?; + Some("agent") => { + self.config.write().exit_agent()?; } Some(_) => unknown_command()?, None => { |
