feat: 准备loop
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user