Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.
Python calibrationclassificationdecision-modelhuggingfacejevmodernbertmultilingualnlppythonpytorchroutingtyped-decisionszero-shot
docs(integrations): say that LayaLowConfidenceError is opt-in and covers tool selection
Aashishb9d6a2b2aef4
diff --git a/laya/integrations/_errors.py b/laya/integrations/_errors.pyindex a126abfb..be4bf7e0 100644--- a/laya/integrations/_errors.py+++ b/laya/integrations/_errors.py@@ -3,7 +3,14 @@ from typing import Any, Dictclass LayaLowConfidenceError(ValueError):- """Raised when a routing decision falls below the confidence threshold and no fallback is set."""+ """Raised by a guarded integration when a decision falls below the confidence threshold.++ Only `LayaCrewRouter` and `LayaSingleSelector` raise it, and only at the caller's request:+ the gate needs `confidence_threshold > 0.0`, a `fallback_agent_index` / `fallback_index`+ absorbs the low-confidence decision when one is set, and with neither the decision is+ returned as it came. So `raise_on_low_confidence=True` (default `False`) is what turns it+ into an exception, and it covers a tool selection as well as agent routing.+ """def __init__(self, message: str, confidence: float, threshold: float, raw_decision: Dict[str, Any]):super().__init__(message)