pub struct VisionSignal {
pub recent_image_count: usize,
pub has_image_in_latest_turn: bool,
pub image_producing_tools: Vec<String>,
}Expand description
Signal derived from image content in the conversation.
Detects image blocks in user messages and tool results (e.g. screenshots) to determine whether a vision-capable model is needed.
Fields§
§recent_image_count: usizeNumber of image blocks found in the recent window.
has_image_in_latest_turn: boolWhether the latest user turn contains an image.
image_producing_tools: Vec<String>Tool names that produced images (e.g. “browse”, “browse_script”).
Implementations§
Source§impl VisionSignal
impl VisionSignal
Sourcepub fn extract(messages: &[Message], window: usize) -> VisionSignal
pub fn extract(messages: &[Message], window: usize) -> VisionSignal
Extract vision signal from the last window messages.
Sourcepub fn requires_vision(&self) -> bool
pub fn requires_vision(&self) -> bool
Whether any image content requires a vision-capable model.
Sourcepub fn normalized(&self) -> f64
pub fn normalized(&self) -> f64
Normalize to [0, 1] for scoring.
- 0 images → 0.0 (no effect)
- 1 image → 0.7
- 2+ images → 0.9 → approaching 1.0
Trait Implementations§
Source§impl Clone for VisionSignal
impl Clone for VisionSignal
Source§fn clone(&self) -> VisionSignal
fn clone(&self) -> VisionSignal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VisionSignal
impl Debug for VisionSignal
Source§impl Default for VisionSignal
impl Default for VisionSignal
Source§fn default() -> VisionSignal
fn default() -> VisionSignal
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VisionSignal
impl RefUnwindSafe for VisionSignal
impl Send for VisionSignal
impl Sync for VisionSignal
impl Unpin for VisionSignal
impl UnsafeUnpin for VisionSignal
impl UnwindSafe for VisionSignal
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