diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-11 14:28:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 14:28:33 +0800 |
| commit | fcdfeea54824c849a07b5826e8d234b5e7b37b1c (patch) | |
| tree | df87330d4de22b0aa12db58883c3036cadd9a2b9 /src/config/mod.rs | |
| parent | 861529374726609a56f6b8af1145a0df5c924dcc (diff) | |
| download | aichat-fcdfeea54824c849a07b5826e8d234b5e7b37b1c.tar.gz | |
refactor: rename `function_matcher` to `selected_functions` (#583)
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 3af4467..b088282 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -948,11 +948,11 @@ impl Config { pub fn select_functions(&self, model: &Model, role: &Role) -> Option<Vec<FunctionDeclaration>> { let mut functions = None; if self.function_calling { - let function_matcher = role.function_matcher(); - if let Some(matcher) = function_matcher { + let filter = role.selected_functions(); + if let Some(filter) = filter { functions = match &self.bot { - Some(bot) => bot.functions().select(&matcher), - None => self.functions.select(&matcher), + Some(bot) => bot.functions().select(&filter), + None => self.functions.select(&filter), }; if !model.supports_function_calling() { functions = None; |
