relax xiaoniu reply planner gating
This commit is contained in:
@@ -25,26 +25,35 @@ class ResponsePlanner:
|
||||
) -> bool:
|
||||
conversation_hints = conversation_hints or {}
|
||||
trigger_type = str(trigger.get("trigger_type", "") or "")
|
||||
directed = bool(trigger.get("is_directed"))
|
||||
if trigger.get("is_at") or trigger_type == "at_trigger":
|
||||
return True
|
||||
if trigger_type == "quote_followup_trigger" and trigger.get("is_directed"):
|
||||
if trigger_type == "quote_followup_trigger" and directed:
|
||||
return True
|
||||
if trigger.get("is_question") and conversation_hints.get("has_recent_human_solver") and flow_state != "deep_engaged":
|
||||
return False
|
||||
if trigger.get("is_question"):
|
||||
if trigger.get("is_directed"):
|
||||
if directed:
|
||||
return True
|
||||
if acceptance_state == "warm" and flow_state == "deep_engaged" and trigger.get("priority", 0) >= 0.95:
|
||||
return True
|
||||
return False
|
||||
if trigger.get("is_followup"):
|
||||
return False
|
||||
if directed:
|
||||
return True
|
||||
return acceptance_state == "warm" and flow_state in {"engaged", "deep_engaged"}
|
||||
if trigger.get("is_social_call"):
|
||||
if acceptance_state == "cold":
|
||||
return False
|
||||
if directed:
|
||||
return flow_state in {"warming", "engaged", "deep_engaged"} or acceptance_state == "warm"
|
||||
return flow_state in {"engaged", "deep_engaged"}
|
||||
if trigger.get("is_returning_member"):
|
||||
return False
|
||||
if directed:
|
||||
return True
|
||||
if acceptance_state == "cold":
|
||||
return False
|
||||
return flow_state in {"warming", "engaged", "deep_engaged"} or acceptance_state == "warm"
|
||||
if not allow_proactive:
|
||||
return False
|
||||
if acceptance_state == "cold":
|
||||
|
||||
Reference in New Issue
Block a user