Files
baibot-withmcp/src/controller/image/determination/mod.rs
Slavi Pantaleev a84135ff32 fmt
2025-05-10 11:47:50 +03:00

17 lines
438 B
Rust

use crate::controller::ControllerType;
mod tests;
pub fn determine_controller(text: &str) -> ControllerType {
let text = text.trim();
if let Some(prompt) = text.strip_prefix("create") {
return ControllerType::ImageGeneration(prompt.trim().to_owned());
}
if let Some(prompt) = text.strip_prefix("edit") {
return ControllerType::ImageEdit(prompt.trim().to_owned());
}
ControllerType::UsageHelp
}