pub struct ExtractConfig {Show 19 fields
pub model_id: String,
pub api_key: Option<String>,
pub format_type: FormatType,
pub max_char_buffer: usize,
pub temperature: f32,
pub fence_output: Option<bool>,
pub use_schema_constraints: bool,
pub batch_length: usize,
pub max_workers: usize,
pub additional_context: Option<String>,
pub resolver_params: HashMap<String, Value>,
pub language_model_params: HashMap<String, Value>,
pub debug: bool,
pub model_url: Option<String>,
pub enable_multipass: bool,
pub multipass_max_passes: usize,
pub multipass_min_extractions: usize,
pub multipass_quality_threshold: f32,
pub progress_handler: Option<Arc<dyn ProgressHandler>>,
}Expand description
Configuration for the extract function
Fields§
§model_id: StringThe model ID to use (e.g., “gpt-4o-mini”, “gpt-4o”)
api_key: Option<String>API key for the language model service
format_type: FormatTypeOutput format type
max_char_buffer: usizeMaximum characters per chunk for processing
temperature: f32Sampling temperature (0.0 to 1.0)
fence_output: Option<bool>Whether to wrap output in code fences
use_schema_constraints: boolWhether to use schema constraints
batch_length: usizeBatch size for processing chunks
max_workers: usizeMaximum number of concurrent workers
additional_context: Option<String>Additional context for the prompt
resolver_params: HashMap<String, Value>Custom resolver parameters
language_model_params: HashMap<String, Value>Custom language model parameters
debug: boolEnable debug mode
model_url: Option<String>Custom model URL for self-hosted models
enable_multipass: boolEnable multi-pass extraction for improved recall
multipass_max_passes: usizeMaximum number of passes when multi-pass extraction is enabled (default: 2)
multipass_min_extractions: usizeMinimum extractions per chunk to avoid re-processing
multipass_quality_threshold: f32Quality threshold for keeping extractions (0.0 to 1.0)
progress_handler: Option<Arc<dyn ProgressHandler>>Progress handler for reporting extraction progress (not serialized)
Implementations§
Source§impl ExtractConfig
impl ExtractConfig
Sourcepub fn with_progress_handler(self, handler: Arc<dyn ProgressHandler>) -> Self
pub fn with_progress_handler(self, handler: Arc<dyn ProgressHandler>) -> Self
Set a progress handler for this configuration
Sourcepub fn with_console_progress(self) -> Self
pub fn with_console_progress(self) -> Self
Enable console progress output with default settings
Sourcepub fn with_quiet_mode(self) -> Self
pub fn with_quiet_mode(self) -> Self
Enable quiet mode (no progress output)
Sourcepub fn with_verbose_progress(self) -> Self
pub fn with_verbose_progress(self) -> Self
Enable verbose console output
Trait Implementations§
Source§impl Clone for ExtractConfig
impl Clone for ExtractConfig
Source§fn clone(&self) -> ExtractConfig
fn clone(&self) -> ExtractConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more