feat: DSL→对话编译 — Eino 图用节点字段而非整段 JSON 喂模型
dispatcher 真正解析 DSL 图:input 节点文本=用户消息,agent 节点 system=系统提示词,
不再把整段 DSL JSON 当 prompt 丢给模型。
- dispatcher/internal/dsl: Compile(graph)→Plan{System,Query,Tools}
(input.text/agent.prompt→query, agent.system→system, tool.tool→tools, 兜底默认)
- eino/graph: recall 调 dsl.Compile,模板加 {system}(Agent 系统提示词+画像注入)
- eino/orchestrator: 写回历史落真实 query 而非 DSL 原文
- frontend nodeCatalog: input 节点改 text 字段(用户输入,必填),检查器可编辑
- 验证: 全模块+前端 build✓; 真实 DeepSeek——curl DSL(input '中国首都?')→'北京';
真实浏览器——加 input 节点输入'NATS是什么'→运行→DeepSeek 简洁正确作答
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -30,10 +30,10 @@ export const NODE_KINDS: Record<string, NodeKind> = {
|
||||
badge: "bg-amber-100 text-amber-700",
|
||||
desc: "用户提问 / 文件 / 变量",
|
||||
fields: [
|
||||
{ key: "text", label: "用户输入", type: "textarea", placeholder: "要发送给模型的内容…", required: true },
|
||||
{ key: "source", label: "来源", type: "select", options: ["用户输入", "本地文件", "变量"] },
|
||||
{ key: "placeholder", label: "占位文案", type: "text", placeholder: "请输入…" },
|
||||
],
|
||||
defaults: { source: "用户输入", placeholder: "请输入…" },
|
||||
defaults: { text: "", source: "用户输入" },
|
||||
},
|
||||
retriever: {
|
||||
kind: "retriever",
|
||||
|
||||
Reference in New Issue
Block a user