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 extraction_passes: usize,
pub enable_multipass: bool,
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: String
The model ID to use (e.g., “gemini-2.5-flash”, “gpt-4o”)
api_key: Option<String>
API key for the language model service
format_type: FormatType
Output format type
max_char_buffer: usize
Maximum characters per chunk for processing
temperature: f32
Sampling temperature (0.0 to 1.0)
fence_output: Option<bool>
Whether to wrap output in code fences
use_schema_constraints: bool
Whether to use schema constraints
batch_length: usize
Batch size for processing chunks
max_workers: usize
Maximum 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: bool
Enable debug mode
model_url: Option<String>
Custom model URL for self-hosted models
extraction_passes: usize
Number of extraction passes to improve recall
enable_multipass: bool
Enable multi-pass extraction for improved recall
multipass_min_extractions: usize
Minimum extractions per chunk to avoid re-processing
multipass_quality_threshold: f32
Quality 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