diff options
| author | sigoden <sigoden@gmail.com> | 2024-05-22 21:37:24 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-22 21:37:24 +0800 |
| commit | 50b13d2de9c5573108f4b1c26306ad674ebb9f80 (patch) | |
| tree | 2fff9f731f526da449dd50e99663308a71e34fed /src/config/input.rs | |
| parent | ba3bcfd67c1d6fea5d3d3c5908c975682ee7909b (diff) | |
| download | aichat-50b13d2de9c5573108f4b1c26306ad674ebb9f80.tar.gz | |
refactor: rename `function_filter` to `function_matcher` (#535)
Diffstat (limited to 'src/config/input.rs')
| -rw-r--r-- | src/config/input.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/input.rs b/src/config/input.rs index 78da9f2..fd42bf8 100644 --- a/src/config/input.rs +++ b/src/config/input.rs @@ -167,14 +167,14 @@ impl Input { let mut functions = None; if self.config.read().function_calling && model.supports_function_calling() { let config = self.config.read(); - let function_filter = if let Some(session) = self.session(&config.session) { - session.function_filter() + let function_matcher = if let Some(session) = self.session(&config.session) { + session.function_matcher() } else if let Some(role) = self.role() { - role.function_filter.as_deref() + role.function_matcher.as_deref() } else { None }; - functions = config.function.filtered_declarations(function_filter); + functions = config.function.select(function_matcher); }; Ok(SendData { messages, |
