feat: 篇2 第11、12章正文(模型客户端 / MCP 工具)

This commit is contained in:
2026-10-20 21:48:52 +08:00
parent 0b6ead7c51
commit c7c3fda5eb
10 changed files with 291 additions and 43 deletions

View File

@@ -38,7 +38,7 @@
<span>·</span>
<span>篇 <b class="pos">2</b> / 6</span>
</p>
<!-- AUTO:hero -->
<!-- AUTO:hero -->
<div class="modhero">
<span class="mh-no">篇 2 / 6</span>
<h1>项目拆解 · 追源码</h1>
@@ -56,7 +56,7 @@
<button class="btn" id="expandAll">展开全部小节</button>
<button class="btn" id="resetBtn">清空进度</button>
<button class="btn" id="printBtn">打印</button>
<!-- AUTO:prog -->
<!-- AUTO:prog -->
<div class="progwrap" data-chapters="5,6,7,8,9,10,11,12,13,14,15,16">
<span>已读</span><div class="bar"><i></i></div><b>0%</b>
</div>
@@ -159,7 +159,7 @@
</div>
<p class="cc-desc">从请求体构造、消息编码、工具 schema 的简化,到 SSE 增量解析与 tool_call 分片拼接,再到超时与错误处理的缺口。</p>
<details class="cc-secs">
<summary>5 个小节 · 待撰写 · 展开看知识点</summary>
<summary>5 个小节 · 展开看知识点</summary>
<div><a href="11-model-client.html#sec-11-1">11.1 请求体构造与消息编码</a><a href="11-model-client.html#sec-11-2">11.2 工具 schema 的简化:只有 query 参数</a><a href="11-model-client.html#sec-11-3">11.3 SSE 流解析与 tool_call 拼接</a><a href="11-model-client.html#sec-11-4">11.4 超时、错误处理与重试缺口</a><a href="11-model-client.html#sec-11-5">11.5 为什么叫 Eino 适配器却不是 Eino</a></div>
</details>
</div>
@@ -173,7 +173,7 @@
</div>
<p class="cc-desc">讲清 GET /sse 建连、endpoint 事件、JSON-RPC 请求-响应匹配与 tools/list 自动发现,并复现全局 router 下同名工具冲突的故障。</p>
<details class="cc-secs">
<summary>5 个小节 · 待撰写 · 展开看知识点</summary>
<summary>5 个小节 · 展开看知识点</summary>
<div><a href="12-mcp.html#sec-12-1">12.1 连接建立:GET /sse 与 endpoint 事件</a><a href="12-mcp.html#sec-12-2">12.2 JSON-RPC 请求-响应匹配</a><a href="12-mcp.html#sec-12-3">12.3 tools/list 自动发现与展开</a><a href="12-mcp.html#sec-12-4">12.4 全局 router 与同名工具的冲突</a><a href="12-mcp.html#sec-12-5">12.5 stdio 与 local:配置能写、运行不通</a></div>
</details>
</div>