reasonkit/thinktool/
thinktool_executor.rs1use crate::error::{Error, Result};
2use crate::evaluation::Profile;
3
4#[derive(Debug, Default)]
8pub struct ThinkToolExecutor;
9
10impl ThinkToolExecutor {
11 pub fn new() -> Self {
12 Self
13 }
14
15 pub async fn run(&self, prompt: &str, profile: Profile) -> Result<String> {
20 if prompt.trim().is_empty() {
21 return Err(Error::Validation("Prompt is empty".to_string()));
22 }
23
24 let mut protocol = String::new();
25 protocol.push_str("Protocol: Generated Reasoning Protocol\n");
26 protocol.push_str(&format!("Profile: {:?}\n\n", profile));
27 protocol.push_str("Prompt:\n");
28 protocol.push_str(prompt);
29 protocol.push('\n');
30
31 Ok(protocol)
32 }
33}