MCPcopy Create free account
hub / github.com/bcefghj/smart-cs-multi-agent / process

Method process

python-impl/agents/intent_router.py:101–122  ·  view source on GitHub ↗

作为Graph节点处理状态

(self, state: dict[str, Any])

Source from the content-addressed store, hash-verified

99
100 @trace_agent_call("intent_router_process")
101 async def process(self, state: dict[str, Any]) -> dict[str, Any]:
102 """作为Graph节点处理状态"""
103 messages = state.get("messages", [])
104 if not messages:
105 return state
106
107 last_message = messages[-1].content if messages else ""
108 intent_result = await self.classify(last_message)
109
110 return {
111 **state,
112 "intent": intent_result.suggested_agent,
113 "sub_results": {
114 **state.get("sub_results", {}),
115 "intent_router": {
116 "primary": intent_result.primary_intent.value,
117 "secondary": intent_result.secondary_intent,
118 "confidence": intent_result.confidence,
119 "entities": intent_result.entities,
120 },
121 },
122 }

Callers

nothing calls this directly

Calls 1

classifyMethod · 0.95

Tested by

no test coverage detected