落地空运群内协同与锁舱出站。
群里按 BOT 通道激活当前工单、航线报价和成交跟进;没有 TMS 报价编号时用工单字段补齐仍调锁舱,避免被本地规则拦住。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,7 +27,7 @@ class ChannelRuntime:
|
||||
企微通道运行时:inbox/outbox 各一条守护线程。
|
||||
|
||||
启动时机:FastAPI lifespan;停止:进程退出。
|
||||
inbox:自由文字走 DeepSeek A 认意图(本线程,非回调);点卡不进模型。
|
||||
inbox:私聊自由文字走 DeepSeek A 认意图(本线程,非回调);群消息和点卡不进模型。
|
||||
"""
|
||||
|
||||
def __init__(self, settings: Settings) -> None:
|
||||
@@ -70,11 +70,17 @@ class ChannelRuntime:
|
||||
continue
|
||||
try:
|
||||
message = item.message
|
||||
decision = self._router.route_inbound(
|
||||
text=message.content or "",
|
||||
sender_id=message.sender_id or "",
|
||||
event=str((message.raw or {}).get("event") or ""),
|
||||
)
|
||||
# 群消息由 dispatch 按 BOT/存档分流,不消耗 DeepSeek A,避免空运群先卡 2~3 秒。
|
||||
if (message.chat_type or "") == "group":
|
||||
from agent.routing.decision import RouteDecision
|
||||
|
||||
decision = RouteDecision(intent="ordinary_text_other")
|
||||
else:
|
||||
decision = self._router.route_inbound(
|
||||
text=message.content or "",
|
||||
sender_id=message.sender_id or "",
|
||||
event=str((message.raw or {}).get("event") or ""),
|
||||
)
|
||||
dispatch_inbound(message, decision)
|
||||
self._store.complete_inbound(item.id)
|
||||
except Exception as exc: # noqa: BLE001
|
||||
|
||||
Reference in New Issue
Block a user