pub struct ToolRegistryImprovement { /* private fields */ }Expand description
ToolRegistry improvement extension (migrated to UnifiedCache)
Implementations§
Source§impl ToolRegistryImprovement
impl ToolRegistryImprovement
Sourcepub fn new(obs_context: Arc<ObservabilityContext>) -> Self
pub fn new(obs_context: Arc<ObservabilityContext>) -> Self
Create new registry extension (now using UnifiedCache)
Sourcepub fn record_execution(
&self,
tool_name: &str,
arguments: &str,
success: bool,
quality_score: f32,
duration_ms: u64,
)
pub fn record_execution( &self, tool_name: &str, arguments: &str, success: bool, quality_score: f32, duration_ms: u64, )
Record tool execution
Sourcepub fn get_tool_metrics(&self, tool_name: &str) -> Option<ToolMetrics>
pub fn get_tool_metrics(&self, tool_name: &str) -> Option<ToolMetrics>
Get tool metrics
Sourcepub fn get_all_metrics(&self) -> Vec<ToolMetrics>
pub fn get_all_metrics(&self) -> Vec<ToolMetrics>
Get all tool metrics
Sourcepub fn get_summary(&self) -> ExecutionSummary
pub fn get_summary(&self) -> ExecutionSummary
Get execution summary
Sourcepub fn predict_next_tool(&self) -> Option<String>
pub fn predict_next_tool(&self) -> Option<String>
Predict next tool based on patterns
Sourcepub fn cache_result(&self, tool: &str, args: &str, result: &str)
pub fn cache_result(&self, tool: &str, args: &str, result: &str)
Cache result for tool execution (migrated to UnifiedCache)
Sourcepub fn get_cached_result(&self, tool: &str, args: &str) -> Option<String>
pub fn get_cached_result(&self, tool: &str, args: &str) -> Option<String>
Try to get cached result (migrated to UnifiedCache)
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear cache (migrated to UnifiedCache)
Sourcepub fn cache_stats(&self) -> CacheStats
pub fn cache_stats(&self) -> CacheStats
Get cache stats (migrated to UnifiedCache)
Sourcepub fn rank_tools(&self) -> Vec<(String, f32)>
pub fn rank_tools(&self) -> Vec<(String, f32)>
Rank tools by effectiveness
Auto Trait Implementations§
impl !RefUnwindSafe for ToolRegistryImprovement
impl !UnwindSafe for ToolRegistryImprovement
impl Forget for ToolRegistryImprovement
impl Freeze for ToolRegistryImprovement
impl Move for ToolRegistryImprovement
impl Send for ToolRegistryImprovement
impl Sync for ToolRegistryImprovement
impl Unpin for ToolRegistryImprovement
impl UnsafeUnpin for ToolRegistryImprovement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more