Files
ai-agent-book/book/images/fig5-8.svg
T
liqiang b119135836
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
2026-08-20 13:12:50 +00:00

60 lines
10 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 880 520" width="880" height="520" style="background:#ffffff">
<defs><marker id="ah" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#333333"/></marker><marker id="ah-light" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#999999"/></marker></defs>
<rect x="20" y="60" width="200" height="60" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="120" y="82" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">用户输入</text>
<text x="120" y="100" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">&quot;我想订去北京的机票&quot;</text>
<line x1="220" y1="90" x2="260" y2="90" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="260" y="55" width="260" height="140" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="390" y="75" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">LLM 分析 → 生成表单代码</text>
<rect x="270" y="90" width="240" height="140" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="276" y="103" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central">&lt;form id=&quot;clarify&quot;&gt;</text>
<text x="276" y="116" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;input type=&quot;text&quot;</text>
<text x="276" y="129" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> name=&quot;from&quot; label=&quot;出发城市&quot;/&gt;</text>
<text x="276" y="142" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;input type=&quot;date&quot;</text>
<text x="276" y="155" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> name=&quot;depart&quot; label=&quot;出发日&quot;/&gt;</text>
<text x="276" y="168" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;select name=&quot;type&quot;&gt;</text>
<text x="276" y="181" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;option&gt;单程&lt;/option&gt;</text>
<text x="276" y="194" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;option&gt;往返&lt;/option&gt;</text>
<text x="276" y="207" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;/select&gt;</text>
<text x="276" y="220" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central">&lt;/form&gt;</text>
<line x1="520" y1="130" x2="560" y2="130" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="560" y="55" width="300" height="200" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2"/>
<text x="710" y="75" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">渲染后的表单界面</text>
<text x="580" y="95" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">出发城市</text>
<rect x="660" y="83" width="180" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="668" y="95" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">上海</text>
<text x="580" y="135" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">出发日期</text>
<rect x="660" y="123" width="180" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="668" y="135" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">2025-08-15</text>
<text x="580" y="175" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">旅行类型</text>
<rect x="660" y="163" width="180" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="668" y="175" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">往返 ▾</text>
<text x="580" y="215" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">返程日期</text>
<rect x="660" y="203" width="180" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="668" y="215" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">2025-08-22</text>
<rect x="660" y="238" width="80" height="26" rx="13" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="700.0" y="251.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">提交</text>
<line x1="710" y1="268" x2="710" y2="300" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="560" y="300" width="300" height="110" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="710" y="318" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">结构化 JSON 返回</text>
<rect x="570" y="330" width="280" height="74" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="578" y="344" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">{&quot;from&quot;: &quot;上海&quot;,</text>
<text x="578" y="360" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central"> &quot;depart&quot;: &quot;2025-08-15&quot;,</text>
<text x="578" y="376" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central"> &quot;type&quot;: &quot;往返&quot;,</text>
<text x="578" y="392" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central"> &quot;return&quot;: &quot;2025-08-22&quot;}</text>
<line x1="560" y1="390" x2="400" y2="440" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="100" y="430" width="500" height="50" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="350" y="448" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Agent 携带完整参数继续执行任务</text>
<text x="350" y="468" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">search_flights(from='上海', to='北京', depart='2025-08-15', ...)</text>
<rect x="20" y="280" width="250" height="140" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="145" y="300" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">对比: 纯文本 vs 表单</text>
<text x="30" y="318" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">文本问答: 10 轮对话</text>
<text x="30" y="331" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> Q1: 从哪出发? A: 上海</text>
<text x="30" y="344" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> Q2: 几号? A: 8月15</text>
<text x="30" y="357" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> Q3: 单程还是往返? ...</text>
<text x="30" y="370" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"></text>
<text x="30" y="383" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">动态表单: 1 次提交</text>
<text x="30" y="396" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> 所有信息一次收集完成</text>
<text x="30" y="409" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> 级联逻辑自动处理</text>
<text x="440.0" y="510" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">表单代码由 LLM 动态生成 → 级联逻辑: 选&quot;往返&quot;时自动显示返程日期</text>
</svg>