Remove chat rate limit

This commit is contained in:
2026-08-14 11:57:58 +07:00
parent d5ea65cd6e
commit 9be5819710
8 changed files with 260 additions and 40 deletions
+14 -1
View File
@@ -335,7 +335,20 @@ class RagAgent:
),
turn_type=tt,
)
if frame.condition_relation != ConditionRelation.INDICATION:
# UNKNOWN is treated as INDICATION here, not as a third rejection
# state: turn_type is already condition_to_drug/symptom_to_drug at
# this point, which only exists because the turn was read as
# asking which drug treats the condition -- that already settles
# the direction. Only an explicit reverse-relation reading
# (ADVERSE_EFFECT/CONTRAINDICATION) should abstain here; UNKNOWN
# is the model hedging on an ordinary question, not a genuine
# reverse-relation query (found live 2026-08-13: bare "X thì dùng
# thuốc gì" turns were reliably classified with the right
# turn_type but condition_relation="unknown", incorrectly
# aborting a plain treatment-lookup question).
if frame.condition_relation in (
ConditionRelation.ADVERSE_EFFECT, ConditionRelation.CONTRAINDICATION,
):
return AgentReply(
"abstain",
"unsupported_reverse_relation",