From 580ed6bea370345f76ca69ecb4c1cc30afa689c5 Mon Sep 17 00:00:00 2001 From: sigoden Date: Fri, 16 Aug 2024 18:44:13 +0800 Subject: feat: no check model's support for function calls (#791) --- src/config/mod.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/config/mod.rs') diff --git a/src/config/mod.rs b/src/config/mod.rs index 9fb2b77..508b768 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1116,7 +1116,7 @@ impl Config { Ok(()) } - pub fn select_functions(&self, model: &Model, role: &Role) -> Option> { + pub fn select_functions(&self, role: &Role) -> Option> { let mut functions = vec![]; if self.function_calling { if let Some(use_tools) = role.use_tools() { @@ -1176,12 +1176,6 @@ impl Config { ); functions = agent_functions; } - if !functions.is_empty() && !model.supports_function_calling() { - functions.clear(); - if *IS_STDOUT_TERMINAL { - eprintln!("{}", warning_text("WARNING: This LLM or client does not support function calling, despite the context requiring it.")); - } - } }; if functions.is_empty() { None -- cgit v1.2.3