From d645046d2d729a55345e18f97fefcab545086f53 Mon Sep 17 00:00:00 2001 From: sigoden Date: Sat, 22 Jun 2024 06:54:03 +0800 Subject: refactor: rename bot to agent (#628) --- src/config/input.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/config/input.rs') diff --git a/src/config/input.rs b/src/config/input.rs index b9b1746..b0b0bd9 100644 --- a/src/config/input.rs +++ b/src/config/input.rs @@ -38,12 +38,12 @@ pub struct Input { rag_name: Option, role: Role, with_session: bool, - with_bot: bool, + with_agent: bool, } impl Input { pub fn from_str(config: &GlobalConfig, text: &str, role: Option) -> Self { - let (role, with_session, with_bot) = resolve_role(&config.read(), role); + let (role, with_session, with_agent) = resolve_role(&config.read(), role); Self { config: config.clone(), text: text.to_string(), @@ -56,7 +56,7 @@ impl Input { rag_name: None, role, with_session, - with_bot, + with_agent, } } @@ -102,7 +102,7 @@ impl Input { } } - let (role, with_session, with_bot) = resolve_role(&config.read(), role); + let (role, with_session, with_agent) = resolve_role(&config.read(), role); Ok(Self { config: config.clone(), text: texts.join("\n"), @@ -115,7 +115,7 @@ impl Input { rag_name: None, role, with_session, - with_bot, + with_agent, }) } @@ -289,8 +289,8 @@ impl Input { } } - pub fn with_bot(&self) -> bool { - self.with_bot + pub fn with_agent(&self) -> bool { + self.with_agent } pub fn summary(&self) -> String { @@ -361,7 +361,7 @@ fn resolve_role(config: &Config, role: Option) -> (Role, bool, bool) { None => ( config.extract_role(), config.session.is_some(), - config.bot.is_some(), + config.agent.is_some(), ), } } -- cgit v1.2.3