pub struct ToolSimulator { /* private fields */ }Expand description
Simulates tool responses by consulting a JudgeClient and validating
the result against the registered ToolSchema::response_schema.
Implementations§
Source§impl ToolSimulator
impl ToolSimulator
pub fn new( tools: Vec<ToolSchema>, judge: Arc<dyn JudgeClient>, model_id: impl Into<String>, ) -> Self
pub fn with_registry( tools: Vec<ToolSchema>, judge: Arc<dyn JudgeClient>, model_id: impl Into<String>, registry: Arc<StateRegistry>, ) -> Self
pub fn registry(&self) -> &Arc<StateRegistry> ⓘ
pub fn tool_names(&self) -> impl Iterator<Item = &str>
pub fn model_id(&self) -> &str
Auto Trait Implementations§
impl Freeze for ToolSimulator
impl !RefUnwindSafe for ToolSimulator
impl Send for ToolSimulator
impl Sync for ToolSimulator
impl Unpin for ToolSimulator
impl UnsafeUnpin for ToolSimulator
impl !UnwindSafe for ToolSimulator
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