pub struct GroundRequest {
pub image: ContentBlock,
pub prompt: String,
pub model: Option<String>,
pub labels: Option<Vec<String>>,
}Expand description
A request for structured visual grounding.
Unlike crate::GenerateRequest, this is the dedicated entry
point for localization tasks — callers get back typed
BoundingBoxes rather than having to grep them out of a text
response. Internally it still runs through the generate path and
parses Qwen-style spans from the output; the dedicated type exists
so callers can express intent explicitly and so future routing can
prefer models with the Grounding capability.
Fields§
§image: ContentBlockImage content to ground against. Exactly one image is expected — multi-image grounding is provider-specific and not yet standardized across VL models.
prompt: StringFree-form text prompt describing what to localize (e.g. “Find all the street signs”).
model: Option<String>Optional model override. When unset, routes to the preferred
model declaring the Grounding capability.
labels: Option<Vec<String>>Optional explicit label list. When provided, callers can post-filter the returned boxes to these label names. Not currently sent to the model (Qwen2.5-VL derives labels from the prompt); reserved for providers that accept a controlled vocabulary on the request.
Trait Implementations§
Source§impl Clone for GroundRequest
impl Clone for GroundRequest
Source§fn clone(&self) -> GroundRequest
fn clone(&self) -> GroundRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GroundRequest
impl Debug for GroundRequest
Source§impl<'de> Deserialize<'de> for GroundRequest
impl<'de> Deserialize<'de> for GroundRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for GroundRequest
impl RefUnwindSafe for GroundRequest
impl Send for GroundRequest
impl Sync for GroundRequest
impl Unpin for GroundRequest
impl UnsafeUnpin for GroundRequest
impl UnwindSafe for GroundRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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