summaryrefslogtreecommitdiffstats
path: root/src/function.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-06-06 06:23:54 +0800
committerGitHub <noreply@github.com>2024-06-06 06:23:54 +0800
commit5635ca6a58fb4a590419335b098b7317285bfb82 (patch)
tree84277c5f08ca25bb6111db13aa3be81e38b73be2 /src/function.rs
parent93ef6da6298f3a98127ed572659b6c24a3f5295e (diff)
downloadaichat-5635ca6a58fb4a590419335b098b7317285bfb82.tar.gz
refactor: warning model or client don't support function calling (#572)
Diffstat (limited to 'src/function.rs')
-rw-r--r--src/function.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/function.rs b/src/function.rs
index 9cb098a..29bb2c3 100644
--- a/src/function.rs
+++ b/src/function.rs
@@ -125,8 +125,7 @@ impl Function {
})
}
- pub fn select(&self, matcher: Option<&str>) -> Option<Vec<FunctionDeclaration>> {
- let matcher = matcher?;
+ pub fn select(&self, matcher: &str) -> Option<Vec<FunctionDeclaration>> {
let regex = Regex::new(&format!("^({matcher})$")).ok()?;
let output: Vec<FunctionDeclaration> = self
.declarations