pub trait ThinkToolModule: Send + Sync {
// Required methods
fn config(&self) -> &ThinkToolModuleConfig;
fn execute(&self, context: &ThinkToolContext) -> Result<ThinkToolOutput>;
// Provided methods
fn name(&self) -> &str { ... }
fn version(&self) -> &str { ... }
fn description(&self) -> &str { ... }
fn confidence_weight(&self) -> f64 { ... }
}Expand description
Core trait for ThinkTool modules
All ThinkTool modules must implement this trait to provide synchronous execution capability and configuration access.
For async execution, also implement AsyncThinkToolModule.
Required Methods§
Sourcefn config(&self) -> &ThinkToolModuleConfig
fn config(&self) -> &ThinkToolModuleConfig
Get the module configuration
Sourcefn execute(&self, context: &ThinkToolContext) -> Result<ThinkToolOutput>
fn execute(&self, context: &ThinkToolContext) -> Result<ThinkToolOutput>
Provided Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get the module description (convenience method)
Sourcefn confidence_weight(&self) -> f64
fn confidence_weight(&self) -> f64
Get the confidence weight for this module