feat: 准备loop

This commit is contained in:
2026-09-22 23:37:39 +08:00
parent 0af2455eaf
commit 006112600a
11 changed files with 450 additions and 99 deletions
+9
View File
@@ -40,5 +40,14 @@ class Settings:
default_factory=lambda: int(os.getenv("TYPESAFE_MAX_RETRIES", "2"))
)
# 意图门控使用 Jev confidence,阈值需按真实语料校准
intent_min_confidence: float = field(
default_factory=lambda: float(os.getenv("INTENT_MIN_CONFIDENCE", "0.7"))
)
def __post_init__(self):
if not 0 <= self.intent_min_confidence <= 1:
raise ValueError("INTENT_MIN_CONFIDENCE 必须在 0 到 1 之间")
settings = Settings()