Version: 0.9.9.dev.260408
后端: 1. 粗排后分流与顺序守卫落地,支持“无明确微调偏好时粗排后直接收口”,并新增 allow_reorder / needs_refine_after_rough_build 语义,打通 chat→rough_build→execute/order_guard→deliver 路由。 2. execute 工具执行链路修复:清理乱码坏块与重复分支;新增 min_context_switch 未授权拦截;补齐 suggested 顺序基线初始化与顺序守卫联动。 3. 新增复合写工具 min_context_switch(减少上下文切换)并接入注册、参数解析、写工具白名单、提示词与文档;仅在用户明确允许打乱顺序时可用。 4. 工具口径升级:find_first_free 支持 day/day_start/day_end 范围参数并统一文案;移除 find_free 兼容别名;读写工具输出统一到“第N天(星期X)”格式。 5. prompt 同步升级:chat/execute/execute_context 增加粗排后是否继续微调、顺序授权、min_context_switch 使用边界与返回示例约束。 6. handoff 文档重命名并重写下班交接重点:下一步聚焦“工具收敛能力研究 + 运行态必要参数重置(不丢运行态)”。 7. 同步更新调试日志文件。 前端:无 仓库:无
This commit is contained in:
@@ -28,12 +28,16 @@ const (
|
||||
// 1. Route 决定后续处理路径;
|
||||
// 2. Speak 始终填写:给用户看的话;
|
||||
// 3. NeedsRoughBuild 仅在 route=execute 且满足粗排条件时为 true;
|
||||
// 4. Reason 给后端和日志看。
|
||||
// 4. NeedsRefineAfterRoughBuild 仅在 needs_rough_build=true 时有效;
|
||||
// 5. AllowReorder 表示是否允许打乱 suggested 任务顺序,仅用户明确授权时应为 true;
|
||||
// 6. Reason 给后端和日志看。
|
||||
type ChatRoutingDecision struct {
|
||||
Route ChatRoute `json:"route"`
|
||||
Speak string `json:"speak,omitempty"`
|
||||
NeedsRoughBuild bool `json:"needs_rough_build,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Route ChatRoute `json:"route"`
|
||||
Speak string `json:"speak,omitempty"`
|
||||
NeedsRoughBuild bool `json:"needs_rough_build,omitempty"`
|
||||
NeedsRefineAfterRoughBuild bool `json:"needs_refine_after_rough_build,omitempty"`
|
||||
AllowReorder bool `json:"allow_reorder,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
// Normalize 统一清洗路由决策中的字符串字段。
|
||||
@@ -68,5 +72,16 @@ func (d *ChatRoutingDecision) Validate() error {
|
||||
return fmt.Errorf("direct_reply 必须携带 speak")
|
||||
}
|
||||
|
||||
// 非 execute 路由不应携带粗排和粗排后微调标记,统一归一化为 false。
|
||||
if d.Route != ChatRouteExecute {
|
||||
d.NeedsRoughBuild = false
|
||||
d.NeedsRefineAfterRoughBuild = false
|
||||
d.AllowReorder = false
|
||||
}
|
||||
// 只有 needs_rough_build=true 时,needs_refine_after_rough_build 才有语义。
|
||||
if !d.NeedsRoughBuild {
|
||||
d.NeedsRefineAfterRoughBuild = false
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user