improve xiaoniu group awareness and solver suppression
This commit is contained in:
@@ -15,9 +15,19 @@ class ResponsePlanner:
|
||||
return "social_short"
|
||||
return "social_short" if flow_state in {"deep_engaged"} else "refuse_or_skip"
|
||||
|
||||
def should_reply(self, trigger: Dict, flow_state: str, allow_proactive: bool) -> bool:
|
||||
def should_reply(
|
||||
self,
|
||||
trigger: Dict,
|
||||
flow_state: str,
|
||||
allow_proactive: bool,
|
||||
acceptance_state: str = "neutral",
|
||||
conversation_hints: Dict | None = None,
|
||||
) -> bool:
|
||||
conversation_hints = conversation_hints or {}
|
||||
if trigger.get("is_at"):
|
||||
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"):
|
||||
return True
|
||||
if trigger.get("is_followup"):
|
||||
@@ -28,4 +38,8 @@ class ResponsePlanner:
|
||||
return False
|
||||
if not allow_proactive:
|
||||
return False
|
||||
return flow_state in {"deep_engaged"} and trigger.get("priority", 0) >= 0.65
|
||||
if acceptance_state == "cold":
|
||||
return False
|
||||
if acceptance_state == "neutral":
|
||||
return flow_state in {"deep_engaged"} and trigger.get("priority", 0) >= 0.8
|
||||
return flow_state in {"engaged", "deep_engaged"} and trigger.get("priority", 0) >= 0.65
|
||||
|
||||
Reference in New Issue
Block a user