VlmFallbackPolicy class sealed

Available extensions
Annotations
  • @freezed

Constructors

VlmFallbackPolicy.always()
Skip the classical OCR backend entirely. Every page is sent to the VLM.
const
factory
VlmFallbackPolicy.disabled()
No VLM fallback (default). Behaves identically to the pre-policy single-backend mode.
const
factory
VlmFallbackPolicy.onLowQuality({required double qualityThreshold})
Try the classical OCR backend first. If the quality score is below quality_threshold, send the page to the VLM.
const
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult disabled(VlmFallbackPolicy_Disabled value), required TResult onLowQuality(VlmFallbackPolicy_OnLowQuality value), required TResult always(VlmFallbackPolicy_Always value)}) → TResult

Available on VlmFallbackPolicy, provided by the VlmFallbackPolicyPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? disabled(VlmFallbackPolicy_Disabled value)?, TResult? onLowQuality(VlmFallbackPolicy_OnLowQuality value)?, TResult? always(VlmFallbackPolicy_Always value)?}) → TResult?

Available on VlmFallbackPolicy, provided by the VlmFallbackPolicyPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult disabled(VlmFallbackPolicy_Disabled value)?, TResult onLowQuality(VlmFallbackPolicy_OnLowQuality value)?, TResult always(VlmFallbackPolicy_Always value)?, required TResult orElse()}) → TResult

Available on VlmFallbackPolicy, provided by the VlmFallbackPolicyPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult disabled()?, TResult onLowQuality(double qualityThreshold)?, TResult always()?, required TResult orElse()}) → TResult

Available on VlmFallbackPolicy, provided by the VlmFallbackPolicyPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult disabled(), required TResult onLowQuality(double qualityThreshold), required TResult always()}) → TResult

Available on VlmFallbackPolicy, provided by the VlmFallbackPolicyPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? disabled()?, TResult? onLowQuality(double qualityThreshold)?, TResult? always()?}) → TResult?

Available on VlmFallbackPolicy, provided by the VlmFallbackPolicyPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) → bool
The equality operator.
inherited