feat: enforce full AI outbound generation and reduce template replies

This commit is contained in:
2026-03-02 11:09:26 +08:00
parent 6433708597
commit 9d0276be41
5 changed files with 415 additions and 34 deletions

View File

@@ -70,10 +70,9 @@ class AgentPreRuleService:
)
async def _rule_pred_meaningless_short_text(self, ctx: RuleContext) -> bool:
from core.pydantic_ai_agent import _is_meaningless_short_text
message = ctx.get("message")
return _is_meaningless_short_text(message.msg)
state = ctx.get("state")
return self.agent._should_handle_as_meaningless_short_text(state, message.msg)
async def _rule_act_meaningless_short_text(self, ctx: RuleContext) -> RuleResult:
from core.pydantic_ai_agent import AgentResponse