From fcdfeea54824c849a07b5826e8d234b5e7b37b1c Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 11 Jun 2024 14:28:33 +0800 Subject: refactor: rename `function_matcher` to `selected_functions` (#583) --- src/config/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/config/mod.rs') 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> { 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; -- cgit v1.2.3