8.记录聚焦对象并尝试填槽(dialogue_engine.py)DialogueEngine._handle_object_message
T9.收集messages并写回slot_updates
T4.内层循环推进到下一个Action(advance_until_action)
直接返回action_listen
校验无效
resume_task
通过
是
T8.执行Action(runner.py)ActionRunner.run
读取系统流Step
两个都没有
10.保存用户最新状态(dialogue_service.py)DialogueService.process_message
endf返回回复给用户
2.加载用户历史状态(dialogue_sevice.py)调用DialogueServer.process_message
3.准备会话(dialogue_engine.py)调用DialogueEngine.process
start_flow
active_system_flow(优先判断)
active_task
否
Chitchat闲聊
生成填槽指令
Collect
Action
任务处理轨道(OBJECT对象)
Knowledge知识问答
T5.判断当前上下文优先级(state.current_task())
Task任务
T6.判断类型current_step
是否有失败提示
将当前上下文的step_id更新为next step
5.判断消息类型(domain.message.py)MessageType
启动system-collect-information系统任务
返回List:Botmessage
7.校验意图与分发(models.py)TurnPlanValidator.validate
OBJECT对象
起点
TEXT文本
6.意图规划(planner.py)TurnPlanner.predict
尝试自动填槽state.focused_object
9.提交本轮记录(dialogue_engine.py)DialogueEngine.process->commmit_pending_turn
slot是否有值
T2.判断Command类型
直接推进到next_step
构造并返回ActionCall
知识处理轨道
1,接受请求与格式转换(routers.py)调用_build_message
T1.处理命令阶段(processor.py)CommandProcessor.run根据Command修改DialogueState
start用户发送消息
取消任务(yaml启动system_task_canceled系统任务)
4.创建/开始本轮记录(dialogue_engine.py)DialogueEngine._begin_turn
闲聊处理轨道
任务处理轨道(TEXT)
cancle_flow
校验数据
恢复暂停任务(yaml启动system_task_resumed系统任务)
不通过
set_slots
T3.推进流阶段(外层循环开始)(executor.py)FlowExecutor.run_task
Start
11.构建响应并返回(routers.py)_build_response
读取业务流Step
结束当前流清理SystemContext或者Task
填槽到当前任务self.active_task.slots.update(slots)
清理slot中当前槽位信息
T7是否为action_listen
澄清轨道
是,终止外层循环