Skip to content

Latest commit

 

History

History
88 lines (66 loc) · 4.15 KB

File metadata and controls

88 lines (66 loc) · 4.15 KB

01 · 分层栈

自底向上,能力逐层叠加。L0–L2 + A2A/RAG 扩展已实现;L3+ 待建设。

┌─────────────────────────────────────────────────────────┐
│ L5 控制面     租户、Campaign、脚本编辑器、监控            │  未开始
├─────────────────────────────────────────────────────────┤
│ L4 媒体接入   SIP / WebRTC Gateway、RTP、Dispatch        │  未开始
├─────────────────────────────────────────────────────────┤
│ L3 语音运行时  ASR / TTS / VAD / Turn / Barge-in         │  未开始
├─────────────────────────────────────────────────────────┤
│ L2 编排图     Graph、Pregel BSP、HITL、Runnable 四模式   │  ← 已完成
├─────────────────────────────────────────────────────────┤
│ L1 最小编排   Chain、Pipeline、ToolLoop、Parallel        │  ← 已完成
├─────────────────────────────────────────────────────────┤
│ L0 LLM 基座   Message、Document、Model、Stream           │  ← 已完成
└─────────────────────────────────────────────────────────┘

L0 · LLM 基座(已完成)

原语 说明
Message 对话消息(role + content + tool)
Document RAG 检索文档单元
ChatModel Generate / Stream / WithTools
Run / Context 调用生命周期与 trace

pkg/protocolpkg/llm/openaianthropicmetricscallback

L1 · 最小编排(已完成)

能力 说明
Chain / ChainBuilder 顺序执行;CompileGraph 注册 ChatModel 流式
GenericChain[I,O] / GenericGraph[I,O] 类型化 I/O
Pipeline / ToolLoop Template → Branch → ReAct
MessageRunnable Invoke / Stream / Transform / Collect 统一入口

pkg/llm/composeprompttool

L2 · 编排图(已完成)

能力 说明
Graph + Branch + SubGraph checkpoint / HITL
ProcessState[S] per-run 局部状态
GraphRun + Pregel channel BSP 超步、Last/Append/Reduce/Broadcast/Barrier
ReAct Graph StreamFrames + mid-stream resume
ADK + Multi-Agent supervisor、plan-execute、HostCompose
A2A pkg/llm/a2a JSON-RPC 2.0 + REST + SSE;Client SubscribeToTask;push webhook 重试 + dead-letter
RAG / 知识库 pkg/knowledge 策略分片 + Qdrant/Milvus;embed/retrieve 策略;Service 门面;Bleve hybrid + rerank

composeagentadka2aragsessionknowledgesearch

L3 · 语音运行时(M1 进行中)

能力 说明
protocol/media Utterance、SessionEvent、PlaybackCue
runtime/av DualLoopScheduler、SessionRuntime、Bridge Processor
media 编解码、MediaSession、EventBus(自 SoulNexus 迁入)
compose/graph_media Utterance 输入 / Echo 回复节点

pkg/protocol/mediapkg/runtime/avpkg/mediacompose/graph_media.go

详见 08-av-llm-orchestration.md

L4+ · 后续层

  • L4 Media:SIP / WebRTC Gateway;可与 A2A 互操作
  • L5 Control:Campaign、脚本编辑器、监控

依赖规则

L5 → L4 → L3 → L2 → L1 → L0

测试与文档

go test ./pkg/llm/... -cover