summaryrefslogtreecommitdiffstats
path: root/src/config/bot.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-06-11 14:28:33 +0800
committerGitHub <noreply@github.com>2024-06-11 14:28:33 +0800
commitfcdfeea54824c849a07b5826e8d234b5e7b37b1c (patch)
treedf87330d4de22b0aa12db58883c3036cadd9a2b9 /src/config/bot.rs
parent861529374726609a56f6b8af1145a0df5c924dcc (diff)
downloadaichat-fcdfeea54824c849a07b5826e8d234b5e7b37b1c.tar.gz
refactor: rename `function_matcher` to `selected_functions` (#583)
Diffstat (limited to 'src/config/bot.rs')
-rw-r--r--src/config/bot.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/bot.rs b/src/config/bot.rs
index 80d3a5d..a0ea58a 100644
--- a/src/config/bot.rs
+++ b/src/config/bot.rs
@@ -2,7 +2,7 @@ use super::*;
use crate::{
client::Model,
- function::{Functions, FUNCTION_ALL_MATCHER},
+ function::{Functions, FunctionsFilter, SELECTED_ALL_FUNCTIONS},
};
use anyhow::{Context, Result};
@@ -141,11 +141,11 @@ impl RoleLike for Bot {
self.config.top_p
}
- fn function_matcher(&self) -> Option<String> {
+ fn selected_functions(&self) -> Option<FunctionsFilter> {
if self.functions.is_empty() {
None
} else {
- Some(FUNCTION_ALL_MATCHER.into())
+ Some(SELECTED_ALL_FUNCTIONS.into())
}
}
@@ -162,7 +162,7 @@ impl RoleLike for Bot {
self.config.top_p = value;
}
- fn set_function_matcher(&mut self, _value: Option<String>) {}
+ fn set_selected_functions(&mut self, _value: Option<FunctionsFilter>) {}
}
#[derive(Debug, Clone, Default, Deserialize, Serialize)]