Files
ai-agent-book/book-es/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">Entrada del usuario</text>
<text x="120" y="100" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">&quot;Quiero reservar un vuelo a Pekín&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="11.5" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Análisis LLM → Generar código de formulario</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;Ciudad origen&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;Fecha salida&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;Solo ida&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;Ida y vuelta&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">Interfaz de formulario renderizada</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">Ciudad Origen</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">Shanghái</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">Fecha Salida</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">Tipo de Viaje</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">Ida y vuelta ▾</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">Fecha Regreso</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">Enviar</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">Respuesta JSON estructurada</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;Shanghái&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;Ida y vuelta&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="18" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">El Agente continúa la ejecución con parámetros completos</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='Shanghái', to='Pekín', 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="14.5" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Comparación: Texto vs Formulario</text>
<text x="30" y="318" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Preguntas en texto: 10 rondas</text>
<text x="30" y="331" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> P1: ¿Origen? R: Shanghái</text>
<text x="30" y="344" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> P2: ¿Fecha? R: 15 de agosto</text>
<text x="30" y="357" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> P3: ¿Ida o vuelta? ...</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">Formulario dinámico: 1 envío</text>
<text x="30" y="396" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> Toda la info se junta a la vez</text>
<text x="30" y="409" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> Lógica en cascada automática</text>
<text x="440.0" y="510" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12.5" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">El código del formulario se genera dinámicamente por el LLM → Lógica en cascada: al elegir &quot;Ida y vuelta&quot;, la fecha de regreso se muestra automáticamente</text>
</svg>