diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-06 06:23:54 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-06 06:23:54 +0800 |
| commit | 5635ca6a58fb4a590419335b098b7317285bfb82 (patch) | |
| tree | 84277c5f08ca25bb6111db13aa3be81e38b73be2 /src/function.rs | |
| parent | 93ef6da6298f3a98127ed572659b6c24a3f5295e (diff) | |
| download | aichat-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.rs | 3 |
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 |
