Check if this model supports function calling
(&self)
| 180 | |
| 181 | /// Check if this model supports function calling |
| 182 | fn model_supports_function_calling(&self) -> bool { |
| 183 | // List of known function calling models on Replicate |
| 184 | let function_calling_models = [ |
| 185 | "openai/gpt-5", |
| 186 | "openai/gpt-5-structured", |
| 187 | "lucataco/glaive-function-calling-v1", |
| 188 | "homanp/llama-2-13b-function-calling", |
| 189 | "lucataco/hermes-2-pro-llama-3-8b", |
| 190 | "lucataco/dolphin-2.9-llama3-8b", |
| 191 | "ibm-granite/granite-3.3-8b-instruct", |
| 192 | ]; |
| 193 | |
| 194 | function_calling_models |
| 195 | .iter() |
| 196 | .any(|&model| self.model.starts_with(model)) |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | /// Replicate prediction request structure |
no outgoing calls
no test coverage detected