pub struct CaptioningConfig {
pub llm: LlmConfig,
pub prompt: Option<String>,
pub min_image_area: u32,
}Expand description
Configuration for the VLM captioning post-processor.
Fields§
§llm: LlmConfigLLM configuration used for the VLM call.
prompt: Option<String>Optional custom caption prompt. None uses the default RegionKind::Caption
prompt that ships with crate::llm::region_extractor.
min_image_area: u32Skip images whose width * height is below this threshold (in pixels).
Default 1_000 filters out icons and decorations.
Implementations§
Source§impl CaptioningConfig
impl CaptioningConfig
Sourcepub fn default_min_image_area() -> u32
pub fn default_min_image_area() -> u32
Default Self::min_image_area: 1000 px.
Public and on the type rather than a free private fn because generated bindings
have to call it to reproduce the default, and a private one is out of their reach.
Trait Implementations§
Source§impl Clone for CaptioningConfig
impl Clone for CaptioningConfig
Source§fn clone(&self) -> CaptioningConfig
fn clone(&self) -> CaptioningConfig
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 CaptioningConfig
impl Debug for CaptioningConfig
Source§impl<'de> Deserialize<'de> for CaptioningConfig
impl<'de> Deserialize<'de> for CaptioningConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CaptioningConfig
impl PartialEq for CaptioningConfig
Source§impl Serialize for CaptioningConfig
impl Serialize for CaptioningConfig
impl StructuralPartialEq for CaptioningConfig
Auto Trait Implementations§
impl Freeze for CaptioningConfig
impl RefUnwindSafe for CaptioningConfig
impl Send for CaptioningConfig
impl Sync for CaptioningConfig
impl Unpin for CaptioningConfig
impl UnsafeUnpin for CaptioningConfig
impl UnwindSafe for CaptioningConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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