feat(voice): 提升桌面端语音交互与本地任务执行支持
This commit is contained in:
@@ -58,6 +58,7 @@ func (o *Orchestrator) execComposeGraph(ctx context.Context, t *contract.Task, t
|
||||
b := &board{
|
||||
uid: meta(t, contract.MetaUserID),
|
||||
sid: meta(t, contract.MetaSessionID),
|
||||
tenant: meta(t, contract.MetaTenantID),
|
||||
query: plan.Query,
|
||||
useVoice: meta(t, contract.MetaModelProfile) == contract.ModelProfileVoice, // 语音任务 → 走语音模型池
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ const defaultAgentSystem = "你是 sundynix-agentix 平台的 AI 助手。"
|
||||
// board 是图执行的"黑板":节点按拓扑序流转时读写它。
|
||||
type board struct {
|
||||
uid, sid string
|
||||
tenant string // 发起任务的租户(平台工具计费口径要跟 HTTP 提交一致,经 inject 传给 platform_*)
|
||||
query string
|
||||
useVoice bool // 该任务用 JARVIS 语音模型池(网关 Meta[model_profile]==voice)
|
||||
profile string
|
||||
|
||||
@@ -114,6 +114,8 @@ func (o *Orchestrator) agentTools(b *board, taskID string, tr *execTracer) []too
|
||||
var out []tool.BaseTool
|
||||
out = append(out, o.discoverTools(contract.ToolSubjectGo, b, taskID, tr)...)
|
||||
out = append(out, o.discoverTools(contract.ToolSubjectPy, b, taskID, tr)...)
|
||||
// 平台工具族(gateway 提供,JARVIS 大脑中枢):查任务/派报告等平台操作,同协议动态发现。
|
||||
out = append(out, o.discoverTools(contract.ToolSubjectPlatform, b, taskID, tr)...)
|
||||
return out
|
||||
}
|
||||
|
||||
@@ -132,7 +134,7 @@ func (o *Orchestrator) discoverTools(subject func(string) string, b *board, task
|
||||
if json.Unmarshal([]byte(res.Content), &cat) != nil {
|
||||
return nil
|
||||
}
|
||||
injectVal := map[string]any{"user_id": b.uid, "session_id": b.sid, "task_id": taskID, "kb": b.kb}
|
||||
injectVal := map[string]any{"user_id": b.uid, "session_id": b.sid, "task_id": taskID, "kb": b.kb, "tenant_id": b.tenant}
|
||||
|
||||
var out []tool.BaseTool
|
||||
for _, e := range cat.Tools {
|
||||
|
||||
Reference in New Issue
Block a user