summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-06-22 06:54:03 +0800
committerGitHub <noreply@github.com>2024-06-22 06:54:03 +0800
commitd645046d2d729a55345e18f97fefcab545086f53 (patch)
treeceef0afa1d693a827441bf2157ef7ecc9359d3ff /src/main.rs
parent52cd3efd6c6588a957fd11d56580cb54ba868724 (diff)
downloadaichat-d645046d2d729a55345e18f97fefcab545086f53.tar.gz
refactor: rename bot to agent (#628)
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs
index d9f258a..871bd0c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -16,8 +16,8 @@ extern crate log;
use crate::cli::Cli;
use crate::client::{chat_completion_streaming, list_chat_models, ChatCompletionsOutput};
use crate::config::{
- list_bots, Config, GlobalConfig, Input, WorkingMode, CODE_ROLE, EXPLAIN_SHELL_ROLE, SHELL_ROLE,
- TEMP_SESSION_NAME,
+ list_agents, Config, GlobalConfig, Input, WorkingMode, CODE_ROLE, EXPLAIN_SHELL_ROLE,
+ SHELL_ROLE, TEMP_SESSION_NAME,
};
use crate::function::{eval_tool_calls, need_send_tool_results};
use crate::render::{render_error, MarkdownRender};
@@ -70,9 +70,9 @@ async fn main() -> Result<()> {
.for_each(|v| println!("{}", v.name()));
return Ok(());
}
- if cli.list_bots {
- let bots = list_bots().join("\n");
- println!("{bots}");
+ if cli.list_agents {
+ let agents = list_agents().join("\n");
+ println!("{agents}");
return Ok(());
}
if cli.list_rags {
@@ -90,12 +90,12 @@ async fn main() -> Result<()> {
config.write().dry_run = true;
}
- if let Some(bot) = &cli.bot {
+ if let Some(agent) = &cli.agent {
let session = cli.session.as_ref().map(|v| match v {
Some(v) => v.as_str(),
None => TEMP_SESSION_NAME,
});
- Config::use_bot(&config, bot, session, abort_signal.clone()).await?
+ Config::use_agent(&config, agent, session, abort_signal.clone()).await?
} else {
if let Some(prompt) = &cli.prompt {
config.write().use_prompt(prompt)?;