fix(extractor): streaming with guardrails + catalyst_type normalization
- Switch Ollama calls from non-streaming to streaming with early termination - Add loop detection, max token limit, and stall timeout guards - Add catalyst_type alias normalizer to handle model hallucinations - Add explicit enum values in extraction prompt for catalyst_type - Add streaming config knobs to OllamaConfig
This commit is contained in:
@@ -47,6 +47,10 @@ class OllamaConfig:
|
||||
retry_base_delay: float = 1.0
|
||||
retry_max_delay: float = 10.0
|
||||
retry_backoff_multiplier: float = 2.0
|
||||
max_tokens: int = 4096
|
||||
stall_timeout: float = 30.0
|
||||
loop_window: int = 64
|
||||
loop_threshold: float = 0.5
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user