<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>何以问的 Blog</title>
        <link>https://heyiwen.com/</link>
        <description>慢慢来吧</description>
        <lastBuildDate>Mon, 16 Mar 2026 11:15:01 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2026, 何以问</copyright>
        <item>
            <title><![CDATA[MacM2安装Paddleocr进行ocr文本识别]]></title>
            <link>https://heyiwen.com/article/ocr-3</link>
            <guid>https://heyiwen.com/article/ocr-3</guid>
            <pubDate>Wed, 03 Jan 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[Mac M2 Pro芯片使用Anaconda以及python 安装paddleocr 进行文本识别]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-9e43cfb269fe4094b321cb2972118cca"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-8b527d610ff3403cbfd8cccbe9c4ac41">这里使用<b><b>Anaconda来创建环境安装</b></b></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-9d85a1e400644b4dbde4307a6b3c8fc1" data-id="9d85a1e400644b4dbde4307a6b3c8fc1"><span><div id="9d85a1e400644b4dbde4307a6b3c8fc1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#9d85a1e400644b4dbde4307a6b3c8fc1" title="安装Anaconda"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装<b><b>Anaconda</b></b></span></span></h3><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-6a2d7ae9e0f047fba09d13ad4075340a" href="https://www.anaconda.com/download"><div><div class="notion-bookmark-title">Free Download | Anaconda</div><div class="notion-bookmark-description">Anaconda&#x27;s open-source Distribution is the easiest way to perform Python/R data science and machine learning on a single machine.</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fwww.anaconda.com%2Fwp-content%2Fthemes%2Fberg-theme-child%2Fassets%2Fimages%2Ffavicon%2Fandroid-icon-192x192.png?table=block&amp;id=6a2d7ae9-e0f0-47fb-a09d-13ad4075340a&amp;t=6a2d7ae9-e0f0-47fb-a09d-13ad4075340a" alt="Free Download | Anaconda" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://www.anaconda.com/download</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fwww.anaconda.com%2Fwp-content%2Fuploads%2F2023%2F08%2FBanner-A-on-Dark-alt-10.png?table=block&amp;id=6a2d7ae9-e0f0-47fb-a09d-13ad4075340a&amp;t=6a2d7ae9-e0f0-47fb-a09d-13ad4075340a" alt="Free Download | Anaconda" loading="lazy" decoding="async"/></div></a></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-874850a2ba24443a80541fb3a2eff34f" data-id="874850a2ba24443a80541fb3a2eff34f"><span><div id="874850a2ba24443a80541fb3a2eff34f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#874850a2ba24443a80541fb3a2eff34f" title="用 Anaconda 新建一个虚拟环境"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>用 Anaconda 新建一个虚拟环境</b></span></span></h4><div class="notion-row notion-block-da27e018c59c447abc3434dfb21bf051"><div class="notion-column notion-block-d7bd23e68ab844e299695fba6d8ceb34" style="width:calc((100% - (2 * min(32px, 4vw))) * 0.33333333333333337)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9e309adc088e41d9a58a69bb5464f8bd"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F277f055e-8f13-42f5-aab0-9c27de675f23%2F55865a3a-1976-4d73-8cbc-3eaae49618a9%2FUntitled.png?table=block&amp;id=9e309adc-088e-41d9-a58a-69bb5464f8bd&amp;t=9e309adc-088e-41d9-a58a-69bb5464f8bd&amp;width=227.4375&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-9d2bdcf091f14bd19421d2dae16951ff" style="width:calc((100% - (2 * min(32px, 4vw))) * 0.33333333333333337)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-c7695945d4164aa58d6997193a9bf694"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F277f055e-8f13-42f5-aab0-9c27de675f23%2F3dd1dff2-8b28-4bd2-a483-4fba1600a220%2FUntitled.png?table=block&amp;id=c7695945-d416-4aa5-8d69-97193a9bf694&amp;t=c7695945-d416-4aa5-8d69-97193a9bf694&amp;width=227.4375&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-e420a3f4344d4a44a9dd275af89bc961" style="width:calc((100% - (2 * min(32px, 4vw))) * 0.3333333333333333)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2bebfedadc3a449bb0b2c22f6ae4971a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F277f055e-8f13-42f5-aab0-9c27de675f23%2Ff01a86d8-bf2c-4fd6-b030-3ab57d047c93%2FUntitled.png?table=block&amp;id=2bebfeda-dc3a-449b-b0b2-c22f6ae4971a&amp;t=2bebfeda-dc3a-449b-b0b2-c22f6ae4971a&amp;width=227.4375&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-48e178e7eef74b53b51f91a3a3b12f57" data-id="48e178e7eef74b53b51f91a3a3b12f57"><span><div id="48e178e7eef74b53b51f91a3a3b12f57" class="notion-header-anchor"></div><a class="notion-hash-link" href="#48e178e7eef74b53b51f91a3a3b12f57" title="安装paddlepaddle"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装paddlepaddle</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-f1117be7f59c41d9a20cb1bf39b975c8" data-id="f1117be7f59c41d9a20cb1bf39b975c8"><span><div id="f1117be7f59c41d9a20cb1bf39b975c8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f1117be7f59c41d9a20cb1bf39b975c8" title="进入飞浆官网"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">进入飞浆官网</span></span></h4><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-237d3677333b4a2095f4863d9092eaa4" href="https://www.paddlepaddle.org.cn/"><div><div class="notion-bookmark-title">飞桨PaddlePaddle-源于产业实践的开源深度学习平台</div><div class="notion-bookmark-description">飞桨致力于让深度学习技术的创新与应用更简单。具有以下特点：同时支持动态图和静态图，兼顾灵活性和效率；精选应用效果最佳算法模型并提供官方支持；真正源于产业实践，提供业界最强的超大规模并行深度学习能力；推理引擎一体化设计，提供训练到多端推理的无缝对接；唯一提供系统化技术服务与支持的深度学习平台</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fpaddlepaddle-org-cn.cdn.bcebos.com%2Fpaddle-site-front%2Ffavicon-128.png?table=block&amp;id=237d3677-333b-4a20-95f4-863d9092eaa4&amp;t=237d3677-333b-4a20-95f4-863d9092eaa4" alt="飞桨PaddlePaddle-源于产业实践的开源深度学习平台" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://www.paddlepaddle.org.cn/</div></div></div></a></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-bf5fafc4ae4a4e4c8dc7215aad742bd6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F277f055e-8f13-42f5-aab0-9c27de675f23%2F3fa440c0-eeec-487c-b178-750e1a153269%2FUntitled.png?table=block&amp;id=bf5fafc4-ae4a-4e4c-8dc7-215aad742bd6&amp;t=bf5fafc4-ae4a-4e4c-8dc7-215aad742bd6&amp;width=806.3125&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1ce27b814d1146fea7da9064d23d0206">通过 Open Terminal 打开对应虚拟环境终端输入下面命令</div><div class="notion-text notion-block-c369ea2c6a8843faaa39c13fc12d0c4a"><b>检查是否安装成功</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-477d0e4b670a43bf929feabeef58ade4"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F277f055e-8f13-42f5-aab0-9c27de675f23%2Fb5b53497-4449-49b9-9a3c-880b6e3ffa17%2FUntitled.png?table=block&amp;id=477d0e4b-670a-43bf-929f-eabeef58ade4&amp;t=477d0e4b-670a-43bf-929f-eabeef58ade4&amp;width=806.296875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-15e49842adb74f8983d931d83f63da39">如果出现<code class="notion-inline-code">PaddlePaddle is installed successfully!</code>，说明已成功安装。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-b79c1cdd1bb84b35a7cbc605cd6fe0f6" data-id="b79c1cdd1bb84b35a7cbc605cd6fe0f6"><span><div id="b79c1cdd1bb84b35a7cbc605cd6fe0f6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b79c1cdd1bb84b35a7cbc605cd6fe0f6" title="安装 paddleocr 库"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b><b>安装 paddleocr 库</b></b></span></span></h4><div class="notion-callout notion-gray_background_co notion-block-faae1b328f474da3874c44887a8b687d"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">paddleocr 是paddle 下 的一个模块</div></div><div class="notion-text notion-block-394a8d73474e42169c674429a91e11e2">在新建的虚拟环境中输入</div><details class="notion-toggle notion-block-4a8e38168b7f4d539c5192628d9f70be"><summary>如果出现 ERROR: Could not build wheels for PyMuPDF, which is required to install pyproject.toml-based projects 错误</summary><div><div class="notion-text notion-block-cdb1894d0efa431b9c24ae41f2bd6825">解决办法 :</div></div></details><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-90348b7e9ef34df880a316887af801d7" data-id="90348b7e9ef34df880a316887af801d7"><span><div id="90348b7e9ef34df880a316887af801d7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#90348b7e9ef34df880a316887af801d7" title="使用命令调用OCR"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用命令调用OCR</span></span></h3><div class="notion-blank notion-block-ea117507d33c4328ab5137d06c046c1e"> </div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-d2dc797f0f654d5ba972892f50e51032" data-id="d2dc797f0f654d5ba972892f50e51032"><span><div id="d2dc797f0f654d5ba972892f50e51032" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d2dc797f0f654d5ba972892f50e51032" title="使用PythonFlask调用Paddleocr进行文本识别"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b><b>使用PythonFlask调用Paddleocr进行文本识别</b></b></span></span></h3><div class="notion-text notion-block-2d53d32e6e434aa49efcdfc8ece1f50d"><b>安装Flask</b></div><div class="notion-text notion-block-d4c30805038444bd85170e21c25b9fda"><code class="notion-inline-code">pip install flask==3.0.0</code></div><div class="notion-text notion-block-b4e9b32761aa4086aeca8906e429c347"><b>代码</b></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-c3862420bede45f49fae3211d02439c5" data-id="c3862420bede45f49fae3211d02439c5"><span><div id="c3862420bede45f49fae3211d02439c5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c3862420bede45f49fae3211d02439c5" title="运行"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">运行</span></span></h4><div class="notion-text notion-block-a8d7708d7e3c42f795ef897048ed42a9">运行之后会去下载对应的PP-OCR Series Model</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-6fafa1b064c24611b195769bd5d80a09" data-id="6fafa1b064c24611b195769bd5d80a09"><span><div id="6fafa1b064c24611b195769bd5d80a09" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6fafa1b064c24611b195769bd5d80a09" title="测试"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">测试</span></span></h4><div class="notion-text notion-block-ff72a0a6736644a8bb1ae1d6755e7c7b">准备一张图片</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-34046cd72b5a413ca76bde75e5fe2a4e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F277f055e-8f13-42f5-aab0-9c27de675f23%2F99709526-9da3-4c7d-906c-047557223fd8%2FUntitled.png?table=block&amp;id=34046cd7-2b5a-413c-a76b-de75e5fe2a4e&amp;t=34046cd7-2b5a-413c-a76b-de75e5fe2a4e&amp;width=806.28125&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2e625c9f156c44478ac826d2d9531c2c">调用接口</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-182b77d35fe84c97b250ceac2a0d1b1f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F277f055e-8f13-42f5-aab0-9c27de675f23%2F4383e296-a319-408b-a486-88e53dc91d92%2FUntitled.png?table=block&amp;id=182b77d3-5fe8-4c97-b250-ceac2a0d1b1f&amp;t=182b77d3-5fe8-4c97-b250-ceac2a0d1b1f&amp;width=806.3125&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-a4471ebe131440b69388e12467603eb6"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Payload CMS使用定时任务和电子邮件]]></title>
            <link>https://heyiwen.com/article/cms-1</link>
            <guid>https://heyiwen.com/article/cms-1</guid>
            <pubDate>Wed, 15 Oct 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Payload CMS使用定时任务和电子邮件]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-28d79a054b8880169a32dd22d3a40e4c"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28d79a054b888053a302cf651728cd6d" data-id="28d79a054b888053a302cf651728cd6d"><span><div id="28d79a054b888053a302cf651728cd6d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b888053a302cf651728cd6d" title="定时任务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>定时任务</b></span></span></h3><hr class="notion-hr notion-block-28d79a054b8880558b67e8ac3adc094b"/><div class="notion-text notion-block-28d79a054b88804f8d7acbbbbc6f8f9a">Payload CMS 的定时任务系统基于 Jobs Queue，支持按 cron 表达式定期执行任务。适用于定期发送邮件、数据同步、报表生成等场景。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b888025946bc0328c178578" data-id="28d79a054b888025946bc0328c178578"><span><div id="28d79a054b888025946bc0328c178578" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b888025946bc0328c178578" title="核心概念"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>核心概念</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-28d79a054b88807eae28ffdf2970353a"><li><b>Task（任务）</b>：定义任务逻辑和调度规则</li></ul><ul class="notion-list notion-list-disc notion-block-28d79a054b88801eaeb2fdafea84ac15"><li><b>Schedule（调度）</b>：按 cron 表达式自动入队任务</li></ul><ul class="notion-list notion-list-disc notion-block-28d79a054b8880f9969ff1fbf84ea397"><li><b>Queue（队列）</b>：任务的执行队列，支持并发控制和失败重试</li></ul><ul class="notion-list notion-list-disc notion-block-28d79a054b8880f28483f6be9a8be26a"><li><b>autoRun（自动运行）</b>：自动消费队列中的任务</li></ul><div class="notion-text notion-block-28d79a054b888017b83dc25161da699f"><b>工作流程</b>：</div><hr class="notion-hr notion-block-28d79a054b8880e288f9f46e42c56eb5"/><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b8880e59e39dadba1ce8945" data-id="28d79a054b8880e59e39dadba1ce8945"><span><div id="28d79a054b8880e59e39dadba1ce8945" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b8880e59e39dadba1ce8945" title="创建任务文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>创建任务文件</b></span></span></h4><div class="notion-text notion-block-28d79a054b88807996b9e2fdd4f37342"><b>Cron 表达式参考</b>：</div><table class="notion-simple-table notion-block-28d79a054b8880f4879dd8b22db69c8d"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-28d79a054b88803e8ed6dc971f49ae9f"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>Cron 表达式</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>说明</b></div></td></tr><tr class="notion-simple-table-row notion-block-28d79a054b8880bb9afbc83f73e732ad"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">*/5 * * * *</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">每5分钟</div></td></tr><tr class="notion-simple-table-row notion-block-28d79a054b8880fd9e5be5f3f6db0dba"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">0 * * * *</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">每小时整点</div></td></tr><tr class="notion-simple-table-row notion-block-28d79a054b888076b1f4ee4e71e77c47"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">0 0 * * *</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">每天凌晨0点</div></td></tr><tr class="notion-simple-table-row notion-block-28d79a054b88807b93fdfc29ab4d30f4"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">0 8 * * *</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">每天早上8点</div></td></tr><tr class="notion-simple-table-row notion-block-28d79a054b888092bc2af1e869c86330"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">0 0 * * 1</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">每周一凌晨0点</div></td></tr><tr class="notion-simple-table-row notion-block-28d79a054b888017895bd8a129db5336"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">0 0 1 * *</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">每月1号凌晨0点</div></td></tr></tbody></table><hr class="notion-hr notion-block-28d79a054b888007a069e96d9776f7d2"/><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b888039982ee9274973b96e" data-id="28d79a054b888039982ee9274973b96e"><span><div id="28d79a054b888039982ee9274973b96e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b888039982ee9274973b96e" title="配置 payload.config.ts"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>配置 </b><code class="notion-inline-code"><b>payload.config.ts</b></code></span></span></h4><hr class="notion-hr notion-block-28d79a054b88806ab848ca9345bb8685"/><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b8880a2a6b3fd41b9fc8631" data-id="28d79a054b8880a2a6b3fd41b9fc8631"><span><div id="28d79a054b8880a2a6b3fd41b9fc8631" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b8880a2a6b3fd41b9fc8631" title="环境变量控制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>环境变量控制</b></span></span></h4><div class="notion-text notion-block-28d79a054b888048b973df0ac86b047b">在 <code class="notion-inline-code">.env</code> 中添加：</div><div class="notion-text notion-block-28d79a054b88804fab01f134cf5e9512"><b>快速切换</b>：</div><hr class="notion-hr notion-block-28d79a054b88805da288fd8aed473554"/><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b8880d39c68f83cc02028f9" data-id="28d79a054b8880d39c68f83cc02028f9"><span><div id="28d79a054b8880d39c68f83cc02028f9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b8880d39c68f83cc02028f9" title="手动触发接口"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>手动触发接口</b></span></span></h4><hr class="notion-hr notion-block-28d79a054b8880b3b27bc4ec9ea085c1"/><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b88807db31dd8b80660c2b6" data-id="28d79a054b88807db31dd8b80660c2b6"><span><div id="28d79a054b88807db31dd8b80660c2b6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b88807db31dd8b80660c2b6" title="验证定时任务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>验证定时任务</b></span></span></h4><div class="notion-text notion-block-28d79a054b888034a35efc7b414343cc">应用启动后应该看到：</div><div class="notion-text notion-block-28d79a054b88809a8382c944a7e3f183">如果禁用了定时任务：</div><hr class="notion-hr notion-block-28d79a054b888061ba12e5fb14a70768"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28d79a054b8880c5acdbdb2dc2f08e1f" data-id="28d79a054b8880c5acdbdb2dc2f08e1f"><span><div id="28d79a054b8880c5acdbdb2dc2f08e1f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b8880c5acdbdb2dc2f08e1f" title="电子邮件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>电子邮件</b></span></span></h3><div class="notion-text notion-block-28d79a054b888037a4f2e8d9a1eb886d">Payload CMS 的邮件功能通过适配器模式接入：装包→配置→调用。核心是 payload.sendEmail() 方法，支持 SMTP、Resend、SendGrid 等主流服务。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b888088a046c72aaa01ad13" data-id="28d79a054b888088a046c72aaa01ad13"><span><div id="28d79a054b888088a046c72aaa01ad13" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b888088a046c72aaa01ad13" title="安装适配器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>安装适配器</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b88800f9d94dcf86119f189" data-id="28d79a054b88800f9d94dcf86119f189"><span><div id="28d79a054b88800f9d94dcf86119f189" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b88800f9d94dcf86119f189" title="配置 payload.config.ts"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>配置 </b><code class="notion-inline-code"><b>payload.config.ts</b></code></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b8880eaa0e7d6b78f2a496b" data-id="28d79a054b8880eaa0e7d6b78f2a496b"><span><div id="28d79a054b8880eaa0e7d6b78f2a496b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b8880eaa0e7d6b78f2a496b" title="添加环境变量配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>添加环境变量配置</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b8880778973e8f97563a703" data-id="28d79a054b8880778973e8f97563a703"><span><div id="28d79a054b8880778973e8f97563a703" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b8880778973e8f97563a703" title="添加测试接口"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>添加测试接口</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28d79a054b888031998de626070bd560" data-id="28d79a054b888031998de626070bd560"><span><div id="28d79a054b888031998de626070bd560" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28d79a054b888031998de626070bd560" title="验证"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>验证</b></span></span></h4></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cluade Code 使用指南]]></title>
            <link>https://heyiwen.com/article/ai-3</link>
            <guid>https://heyiwen.com/article/ai-3</guid>
            <pubDate>Fri, 10 Oct 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Cluade Code 使用指南]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-28879a054b8880c5849fd26c22df1247"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b8880549251fdcbef60a3a3" data-id="28879a054b8880549251fdcbef60a3a3"><span><div id="28879a054b8880549251fdcbef60a3a3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b8880549251fdcbef60a3a3" title="接入其他API"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">接入其他API</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-28879a054b8880a8bf54f8ccfbccec0c" data-id="28879a054b8880a8bf54f8ccfbccec0c"><span><div id="28879a054b8880a8bf54f8ccfbccec0c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b8880a8bf54f8ccfbccec0c" title="Claude Code Router"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Claude Code Router</span></span></h4><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-28879a054b8880a89806ce3a18202b91" href="https://github.com/musistudio/claude-code-router"><div><div class="notion-bookmark-title">GitHub - musistudio/claude-code-router: Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interact with the model while enjoying updates from Anthropic.</div><div class="notion-bookmark-description">Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interact with the model while enjoying updates from Anthropic. - musistudio/claude-code-router</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fgithub.com%2Ffluidicon.png?table=block&amp;id=28879a05-4b88-80a8-9806-ce3a18202b91&amp;t=28879a05-4b88-80a8-9806-ce3a18202b91" alt="GitHub - musistudio/claude-code-router: Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interact with the model while enjoying updates from Anthropic." loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://github.com/musistudio/claude-code-router</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fopengraph.githubassets.com%2Feeee63edee57542322bd75bd456d678f0d9c6e73c670a70e5c55b408333827d0%2Fmusistudio%2Fclaude-code-router?table=block&amp;id=28879a05-4b88-80a8-9806-ce3a18202b91&amp;t=28879a05-4b88-80a8-9806-ce3a18202b91" alt="GitHub - musistudio/claude-code-router: Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interact with the model while enjoying updates from Anthropic." loading="lazy" decoding="async"/></div></a></div><div class="notion-callout notion-gray_background_co notion-block-28879a054b8880d2a650d636a3bfa831"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b8880e5bc7cebb98de002fa">Claude Code Router 项目旨在为开发者提供一个灵活的 AI 编程基础设施，让你可以根据需求将 Claude Code 请求路由到不同的大模型，并自定义每一次请求的处理方式。它支持多种主流模型和服务商，包括 OpenRouter、DeepSeek、Ollama、Gemini、Volcengine、SiliconFlow 等，能够满足多样化的编程场景和自动化需求。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b888000b1e4f38d25a86a4c" data-id="28879a054b888000b1e4f38d25a86a4c"><span><div id="28879a054b888000b1e4f38d25a86a4c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b888000b1e4f38d25a86a4c" title="/init"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">/init</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b88806a9a5fea3fd0a808a2"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b8880ec9b48dee9e07ee790">在 Claude Code 中，‎`/init` 命令的主要作用是自动为你的项目生成一个 ‎`CLAUDE.md` 文件。<span class="notion-pink">这个文件会被 Claude 自动拉入上下文</span>，用于记录和共享项目相关的重要信息，比如：</div><ul class="notion-list notion-list-disc notion-block-28879a054b8880bcab3ac7cb6c652d65"><li>常用 bash 命令</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b888066be65cc9859484d1b"><li>关键文件和工具函数</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b8880e99f0cd4353571138b"><li>代码风格指南</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b8880359456e1910a92f04d"><li>测试说明</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b888052af8dd5afb52d0c33"><li>仓库协作规范（如分支命名、合并方式等）</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b8880d285d4c7513af53e57"><li>开发环境设置（如 pyenv、编译器等）</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b888048875efe2646a6ef3b"><li>项目中的特殊行为或警告</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b88806c96e4fb76aa3bdc73"><li>其他你希望 Claude 记住的信息</li></ul><div class="notion-text notion-block-28879a054b8880c6a943f283e7787e47">你可以在项目根目录或其他相关目录运行 ‎`/init`，Claude 会帮你生成并初始化 ‎`CLAUDE.md`，方便团队成员共享和持续优化。这个文件没有固定格式，建议保持简洁易读，随着项目发展不断调整内容，让 Claude 更好地理解你的开发习惯和需求。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b88801087fbe6c4a97351f7" data-id="28879a054b88801087fbe6c4a97351f7"><span><div id="28879a054b88801087fbe6c4a97351f7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b88801087fbe6c4a97351f7" title="/compact"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">/compact</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b888030954cf9f8fdb23d7a"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b8880e09573dcf801ff9fc0">在 Claude Code 的世界里，随着对话不断积累，模型必须处理越来越多的信息，这会造成 <b>记忆窗口被填满，性能下降</b>。为了对抗这种积压，它提供了一个 /compact 命令，让你 <b>主动压缩对话内容</b>。其作用大致是：</div><ul class="notion-list notion-list-disc notion-block-28879a054b8880d58065f3feda0b4185"><li><b>汇总以前的对话精华</b>，保留关键决策、技术细节、结构思路；</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b8880d39971c056e867da95"><li>用这份简洁总结 <b>替代全部历史内容</b>，保持对话干净、高效、可继续；</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b8880269004fc6e805f0c2e"><li>避免模型因上下文过重而偏离目标。</li></ul><div class="notion-text notion-block-28879a054b8880d2930ccd81498e793c"><b>带提示压缩</b>：你可以在命令后加上说明，比如：</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b88805e94f6cfe2d2d01d8f" data-id="28879a054b88805e94f6cfe2d2d01d8f"><span><div id="28879a054b88805e94f6cfe2d2d01d8f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b88805e94f6cfe2d2d01d8f" title="/clear"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">/clear</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b8880829b1fdf778c2da503"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b88807b9458f9e83456289d">它的作用很简单：<b>清空当前会话的上下文</b>。</div><div class="notion-text notion-block-28879a054b8880e5a2eafa31c6f58b3b">执行后，Claude 不再记得你之前说过的话，也不再带着历史对话继续推理，而是像重新打开一个新的对话窗口一样，从零开始。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b88806eb328c115c5d90178" data-id="28879a054b88806eb328c115c5d90178"><span><div id="28879a054b88806eb328c115c5d90178" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b88806eb328c115c5d90178" title="think / think hard / ultrathink"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>think / think hard / ultrathink</b></span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b88809ea965e9eabe7b60c9"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b8880068ba4c5172eb1a218">在 <b>Claude Code</b> 里，<b>think / think hard / ultrathink</b> 不是“花哨词”，而是一个<b>扩展思考</b>的开关。你把这些词放在指令里，Claude 会在<b>回答前</b>预留更多“思考预算”，先做方案拆解、对比、权衡，再给出动作和代码。预算有层级：<b>think &lt; think hard &lt; think harder &lt; ultrathink</b>，层级越高，思考越久，权衡越细，代价是<b>响应更慢、令牌消耗更高</b>。这是官方给的映射思路。</div><div class="notion-text notion-block-28879a054b8880b88392e964f66eee36"><b>如何取舍</b>很简单：问题清晰但稍有难度，用 <b>think</b>；涉及多种实现路径或影响面大，用 <b>think hard</b>；需要系统性推演与自检时，用 <b>ultrathink</b>（中间还有 <b>think harder</b> 这一档）。核心是把时间花在<b>前置规划</b>，减少来回返工。</div><div class="notion-text notion-block-28879a054b888018b904ffd7e5643d10">别把它和另一个概念混淆：Anthropic 还介绍过一个 <b>“think 工具”</b>，那是<b>在生成过程中</b>插入一次“停一停再想想”的检查步骤；而 <b>think / ultrathink</b> 这套词汇针对的是<b>生成前</b>的扩展思考。两者方向不同，但目标一致：降低草率决策。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b88801dbe0bc528e6cae660" data-id="28879a054b88801dbe0bc528e6cae660"><span><div id="28879a054b88801dbe0bc528e6cae660" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b88801dbe0bc528e6cae660" title="/permission"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>/permission</b></span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b8880908e13fe588c7e8f00"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b8880ff83bfc6c3845e94ba">用 <b>/permission</b> 定义<b>allow/deny 规则</b>。例如把 git commit 列入 <b>allow</b>，后续<b>无需人工确认</b>；把风险命令列入 <b>deny</b>，从源头阻断。</div><div class="notion-text notion-block-28879a054b8880429028ef9986c00585">如果需要<b>全自动无人值守</b>时，在启动后加 <b>--dangerously-skip-permission</b>（CCR 同理）。<b>注意</b>：这是<b>最高权限</b>，建议搭配<b>只读/临时仓库</b>或<b>CI 沙箱</b>使用。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b8880e78dc3fa0ebf90eb9b" data-id="28879a054b8880e78dc3fa0ebf90eb9b"><span><div id="28879a054b8880e78dc3fa0ebf90eb9b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b8880e78dc3fa0ebf90eb9b" title="
/resume"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>
/resume</b></span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b8880fdb4dcf8ae50e8c3c0"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b8880e2a59bd5a4e06ecbf1">能快速回到历史话题；可精准跳转某句，再<b>接着对话</b>。</div></div></div><div class="notion-blank notion-block-28879a054b888070b1bbefd9631f8c29"> </div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b8880d396a9ea527ed22dba" data-id="28879a054b8880d396a9ea527ed22dba"><span><div id="28879a054b8880d396a9ea527ed22dba" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b8880d396a9ea527ed22dba" title="/export"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>/export</b></span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b8880f2bc27f9c7b0648fac"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b888086905bc087fd33a24e">把<b>当次对话</b>复制到剪贴板，便于<b>归档</b>或<b>交叉验证</b>（例如贴给 GPT 审核推理链）。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b888092bf06d891d79ec1bb" data-id="28879a054b888092bf06d891d79ec1bb"><span><div id="28879a054b888092bf06d891d79ec1bb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b888092bf06d891d79ec1bb" title="自定义命令：用文件定义你的“工作流原语”
"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>自定义命令：用文件定义你的“工作流原语”</b>
</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b8880d9b7dee641dd0bb0b4"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b8880419216f6f0e7e7d46c">在项目的 <b>.claude/commands/</b> 下，新建一个 <b>&lt;命令名&gt;.md</b> 即得一个自定义命令。内容用<b>自然语言</b>描述“它要做什么”。支持用 <b>$arguments</b> 占位参数。</div><div class="notion-text notion-block-28879a054b888043b3afebe31db4cae0">例如创建 <b>code-review.md</b>，写明“比较 $arguments 分支与 main 的差异，并给出审核意见”。在对话中输入 <b>/code-review &lt;feature-branch&gt;</b> 即可触发。把 <b>commands</b> 放到全局配置目录，则变成<b>用户级命令</b></div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b88809683bde537fb4447b7" data-id="28879a054b88809683bde537fb4447b7"><span><div id="28879a054b88809683bde537fb4447b7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b88809683bde537fb4447b7" title="
Hook：把“代码规范与质量闸门”嵌入每次写入
"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>
Hook：把“代码规范与质量闸门”嵌入每次写入</b>
</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b8880b8a27cc62036e7b401"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b888013b647e7492056ff4e">在 <b>.claude/</b> 文件夹里新建一个 <b>settings.json</b> 文件（或者优先级更高的 <b>settings.local.json</b>）。在里面设置 <b>hooks（钩子）</b>，告诉系统<b>什么时候</b>要<b>执行什么命令</b>。比如：当 AI 修改完文件后，自动运行 npx prettier --check . 来检查代码格式。如果发现格式问题，Hook 会<b>马上检查</b>并<b>自动修正</b>。你还可以根据官方文档，添加更多检查点，用来做<b>代码检查、测试、构建</b>等质量把关。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b88808d9efded4e6da2ca16" data-id="28879a054b88808d9efded4e6da2ca16"><span><div id="28879a054b88808d9efded4e6da2ca16" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b88808d9efded4e6da2ca16" title="Sub-Agent：把复杂任务拆开并行跑
"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>Sub-Agent：把复杂任务拆开并行跑</b>
</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b888026bf70faa2418ac234"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b88809ba606d74b0d5671fb">运行 <b>/agents</b> 可以创建<b>子代理</b>。你只需要告诉它<b>负责什么工作</b>和<b>要达成什么目标</b>。当一个任务到来时,Claude Code 会<b>把任务拆成几个小任务</b>,然后给每个子代理<b>分配需要的信息</b>。这些子代理会<b>同时工作</b>,最后由主代理<b>把结果整合起来</b>。比如:一个<b>代码审核</b>子代理负责检查代码差异,另一个<b>天气查询</b>子代理负责获取天气信息,两个同时进行,互不影响,<b>最后统一汇总</b>。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b8880bab4eaf901a5af5d6a" data-id="28879a054b8880bab4eaf901a5af5d6a"><span><div id="28879a054b8880bab4eaf901a5af5d6a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b8880bab4eaf901a5af5d6a" title="GitHub CLI 集成"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>GitHub CLI 集成</b></span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b88807c8340ec4e40aafa3d"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b888082b405e59341b57bb1">安装 <b>GitHub CLI</b>，登录后 Claude Code 就能<b>读取仓库 Issue/PR</b>，在本地<b>完成修改</b>，然后<b>创建修复分支并推送</b>。典型流程：读取 <b>Issue #1</b>，实现“增加<b>提交按钮</b>”的修复，git push 推到远端，形成<b>读取问题 → 本地修改 → 推送验证</b>的闭环。</div></div></div><div class="notion-blank notion-block-28879a054b88807089efe85a7824f1dd"> </div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b8880c9939bc9f69dfc42d7" data-id="28879a054b8880c9939bc9f69dfc42d7"><span><div id="28879a054b8880c9939bc9f69dfc42d7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b8880c9939bc9f69dfc42d7" title="小技巧"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">小技巧</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b8880748ec3c36395524e9e" data-id="28879a054b8880748ec3c36395524e9e"><span><div id="28879a054b8880748ec3c36395524e9e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b8880748ec3c36395524e9e" title="！"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">！</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b8880db86c9c1b7814ad27d"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b88807f86c8d771ff61229b">在 <b>Claude Code</b> 中，当你在输入行首添加 <b>!</b> 符号时，它会：</div><div class="notion-text notion-block-28879a054b8880229806d6ef60404000">👉 <b>将该行内容视为&quot;终端命令&quot;直接执行</b>，而非普通对话内容。</div><div class="notion-text notion-block-28879a054b8880a2b1c6d4cb5ee080e2">Claude Code 会在其提供的沙盒环境或已绑定的终端中执行命令（如 ls -la），并立即展示执行结果。</div><div class="notion-text notion-block-28879a054b8880c79e1becb65d24ae37">这类似于在 VSCode 中使用集成终端，区别在于这里用 ! 作为前缀符号，明确告知 Claude &quot;这是需要执行的命令，无需解释或生成代码&quot;。</div><div class="notion-text notion-block-28879a054b8880e08d88ee68c6e407ed">重要的是：命令的 <b>执行结果</b> 会自动保存到对话上下文中</div><div class="notion-text notion-block-28879a054b8880228696f58fbd120595">示例：</div><div class="notion-text notion-block-28879a054b888060bc0cf6c483676bd1">简而言之：<b>执行外部命令 → 结果自动纳入上下文 → Claude 基于结果继续对话</b>。</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28879a054b8880da8acfcbbbde0ee3ec" data-id="28879a054b8880da8acfcbbbde0ee3ec"><span><div id="28879a054b8880da8acfcbbbde0ee3ec" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28879a054b8880da8acfcbbbde0ee3ec" title="#"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">#</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-28879a054b8880829fcbd5a9a013b9dc"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-28879a054b88807b96c4c49145603017">在 Claude Code 中输入 # 可以快速给 Claude 添加指令并自动更新 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://CLAUDE.md">CLAUDE.md</a> 文件。</div><div class="notion-text notion-block-28879a054b8880d08af7cf1870338e4d">使用 Claude Code 时，输入 <code class="notion-inline-code">#</code> 是一种便捷方式，用于添加新的说明、命令或风格指南。这些内容会自动写入到 <code class="notion-inline-code">CLAUDE.md</code> 文件中，成为后续会话的上下文参考。</div><div class="notion-text notion-block-28879a054b8880079cd5e9aec5b09280">你只需在对话中输入 <code class="notion-inline-code">#</code> 加上一条指令，例如：</div><div class="notion-text notion-block-28879a054b88802a95e9ef67f5f39ed2">Claude 会自动将这条规则添加到当前项目的 <code class="notion-inline-code">CLAUDE.md</code> 文件中。这样做有以下好处：</div><ul class="notion-list notion-list-disc notion-block-28879a054b88803fa235ffd1ddc79c0a"><li>快速记录项目规范、常用命令和代码风格</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b888078afb8da9c7cccebac"><li>确保团队成员同步最新的开发习惯和要求</li></ul><ul class="notion-list notion-list-disc notion-block-28879a054b888074a6fcc54937d41eb3"><li>提升 Claude 的理解和执行效果</li></ul><div class="notion-text notion-block-28879a054b8880939988e75ea0d8b9ac">许多工程师在日常开发中经常使用 <code class="notion-inline-code">#</code> 来及时补充重要信息到 <code class="notion-inline-code">CLAUDE.md</code>，并在提交代码时一并更新，从而促进团队协作和知识积累。</div></div></div><div class="notion-blank notion-block-28879a054b8880b198f1f2b1364b0cc8"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flowise实现自定义知识库并创建对话Agent]]></title>
            <link>https://heyiwen.com/article/agent-4</link>
            <guid>https://heyiwen.com/article/agent-4</guid>
            <pubDate>Mon, 19 May 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Flowise实现自定义知识库并创建对话Agent]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1f879a054b8880419ca3cba91b7c51eb"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b88808d8d3ad44ab9a86c8e" data-id="1f879a054b88808d8d3ad44ab9a86c8e"><span><div id="1f879a054b88808d8d3ad44ab9a86c8e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88808d8d3ad44ab9a86c8e" title="简介"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">简介</span></span></h3><div class="notion-text notion-block-1f879a054b8880bcb7fef5b9ed9835b3">在构建 AI 客服时，常见需求是让机器人基于企业自己的知识文档提供准确回答。本文将手把手教你如何使用 Flowise + 向量数据库（如 Pinecone），构建一个结合 RAG 检索增强能力的智能客服 Agent。在 FlowiseAI 中，结合文档存储与向量数据库，构建一个由 RAG（检索增强生成）驱动的客户支持Agent。利用您的业务数据，创建一个能够准确回答客户问题的智能聊天机器人。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b8880549091f754f2f67943" data-id="1f879a054b8880549091f754f2f67943"><span><div id="1f879a054b8880549091f754f2f67943" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880549091f754f2f67943" title="知识库管理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>知识库管理</b></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b888093bd0bdbb1a03bf0a6" data-id="1f879a054b888093bd0bdbb1a03bf0a6"><span><div id="1f879a054b888093bd0bdbb1a03bf0a6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b888093bd0bdbb1a03bf0a6" title="创建Document Store"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>创建Document Store</b></span></span></h4><div class="notion-text notion-block-1f879a054b888017ab7dc19535606ea7">比如这里创建一个&quot;电商运营知识库&quot;</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888035ba33fd5afbd210d2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512175406668.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8035-ba33-fd5afbd210d2" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88803fb2b6f1cc40c361d1" data-id="1f879a054b88803fb2b6f1cc40c361d1"><span><div id="1f879a054b88803fb2b6f1cc40c361d1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88803fb2b6f1cc40c361d1" title="添加文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>添加文件</b></span></span></h4><div class="notion-text notion-block-1f879a054b88802cb5e1cb773977f565">根据文件类型，加载文件并切块，比如我这里使用PDF</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880f5b8a6fd4cddbf10ce"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512175511589.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80f5-b8a6-fd4cddbf10ce" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880b6aa62da0bc8d2f737"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512175714406.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80b6-aa62-da0bc8d2f737" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880daaac8e1da0bb9fd6d" data-id="1f879a054b8880daaac8e1da0bb9fd6d"><span><div id="1f879a054b8880daaac8e1da0bb9fd6d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880daaac8e1da0bb9fd6d" title="设置文本分割器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>设置文本分割器</b></span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880d4b99be48ab55b1d03"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512175724424.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80d4-b99b-e48ab55b1d03" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88804d9cbdc12f696d3912" data-id="1f879a054b88804d9cbdc12f696d3912"><span><div id="1f879a054b88804d9cbdc12f696d3912" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88804d9cbdc12f696d3912" title="预览切块后的数据"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>预览切块后的数据</b></span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888012a844e260880638aa"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512175747826.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8012-a844-e260880638aa" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880659014cd2de1ada5ca" data-id="1f879a054b8880659014cd2de1ada5ca"><span><div id="1f879a054b8880659014cd2de1ada5ca" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880659014cd2de1ada5ca" title="完成加载"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>完成加载</b></span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880e9a97ee3c3110188a2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512175911664.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80e9-a97e-e3c3110188a2" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b888039ba76c2cfaae260bf" data-id="1f879a054b888039ba76c2cfaae260bf"><span><div id="1f879a054b888039ba76c2cfaae260bf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b888039ba76c2cfaae260bf" title="进行向量"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>进行向量</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b88807bab2dfffcaf73ef1b"><li>点击 <code class="notion-inline-code">Upsert Chunks</code></li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b88803c85e5c97844ec700b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512175959971.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-803c-85e5-c97844ec700b" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-1f879a054b8880548ce8e86f4f24305b"><li>开始逐一配置</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888092affeccd19d61f7a9"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512180102696.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8092-affe-ccd19d61f7a9" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880238764ec33aaa22c93" data-id="1f879a054b8880238764ec33aaa22c93"><span><div id="1f879a054b8880238764ec33aaa22c93" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880238764ec33aaa22c93" title="设置向量模型"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>设置向量模型</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b88801988cef428ab25ccd0"><li>这里我选择OpenAI</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880d68d1fc620cc8adb4f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512180611161.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80d6-8d1f-c620cc8adb4f" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b888099a28ce12202dc6460" data-id="1f879a054b888099a28ce12202dc6460"><span><div id="1f879a054b888099a28ce12202dc6460" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b888099a28ce12202dc6460" title="设置Vector Store"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>设置Vector Store</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b88807ebb63d996bf7f65ea"><li>这里我使用的是Pinecone</li><ul class="notion-list notion-list-disc notion-block-1f879a054b88807ebb63d996bf7f65ea"><li>可以去<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.pinecone.io/">https://www.pinecone.io/</a>注册一个账号，获取免费额度使用Vector Store</li><ul class="notion-list notion-list-disc notion-block-1f879a054b8880abaedcd92adec57a4a"><ol start="1" class="notion-list notion-list-numbered notion-block-1f879a054b88809a872ecc3b2cb680ba" style="list-style-type:decimal"><li>创建一个index</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1f879a054b8880478990ecb563afb131" style="list-style-type:decimal"><li>取一个名字</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-1f879a054b88804887c0c3faed8112dd" style="list-style-type:decimal"><li>选择向量模型</li><ol class="notion-list notion-list-numbered notion-block-1f879a054b88804887c0c3faed8112dd" style="list-style-type:lower-alpha"><ol class="notion-list notion-list-numbered notion-block-1f879a054b888002bfdbdd2130246902" style="list-style-type:lower-roman"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888058b752d917444b5d46"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512180930483.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8058-b752-d917444b5d46" alt="notion image" loading="lazy" decoding="async"/></div></figure></ol></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-1f879a054b88805b9aeaca013cd4f234" style="list-style-type:decimal"><ol class="notion-list notion-list-numbered notion-block-1f879a054b88805b9aeaca013cd4f234" style="list-style-type:lower-alpha"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880b8b5c8d33a0427a98a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512180930483.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80b8-b5c8-d33a0427a98a" alt="notion image" loading="lazy" decoding="async"/></div></figure></ol></ol><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880c88794f2a1177f212e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512180930483.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80c8-8794-f2a1177f212e" alt="notion image" loading="lazy" decoding="async"/></div></figure><ol start="1" class="notion-list notion-list-numbered notion-block-1f879a054b8880e3b4c7e473f271c104" style="list-style-type:decimal"><li>生成API Key</li></ol></ul></ul></ul><ul class="notion-list notion-list-disc notion-block-1f879a054b8880b3a2b6fa17b5a3864c"><li>回到Flowise，创建验证</li><ul class="notion-list notion-list-disc notion-block-1f879a054b8880b3a2b6fa17b5a3864c"><ul class="notion-list notion-list-disc notion-block-1f879a054b8880d9a24ac61c3cfca864"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888053b4cdfdc0ecce44e2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512181044161.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8053-b4cd-fdc0ecce44e2" alt="notion image" loading="lazy" decoding="async"/></div></figure></ul></ul></ul><ul class="notion-list notion-list-disc notion-block-1f879a054b8880d2b793ec26742dd946"><li>Pinecone Index 填你在Pinecone创建的index 名称，可以填一个Namespece名称，之后也可以根据这个名称共用知识库的数据</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880858448fda64c360745"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512180729089.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8085-8448-fda64c360745" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880638b5ae743729edebe" data-id="1f879a054b8880638b5ae743729edebe"><span><div id="1f879a054b8880638b5ae743729edebe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880638b5ae743729edebe" title="文档记录管理器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>文档记录管理器</b></span></span></h4><div class="notion-text notion-block-1f879a054b88805c8f76fee39c010fe6">Record Manager的作用是当你更新了你的知识库中的文件时，Record Manager可以根据你的变更自动增量的重新向量数据 ，这里我使用SQLite，建议生产环境使用MySQL或者Postgres</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880238527e5b032dde2c1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512181544471.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8023-8527-e5b032dde2c1" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880c7bbb6c7e1b2830200" data-id="1f879a054b8880c7bbb6c7e1b2830200"><span><div id="1f879a054b8880c7bbb6c7e1b2830200" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880c7bbb6c7e1b2830200" title="保存配置并更新"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>保存配置并更新</b></span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888080aa57d30ab2dd4f2d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512181640355.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8080-aa57-d30ab2dd4f2d" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-1f879a054b8880c284dddfbd25c69274"><li>可以看到有28块数据</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888080be32fe4dcd4893ed"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512181807735.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8080-be32-fe4dcd4893ed" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-1f879a054b88800a82cac37ad2ad006f"><li>Pinecone中可以页可以看到向量后的数据</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880958231e5780efe9795"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512181924335.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8095-8231-e5780efe9795" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880528b51f52df9f14af5" data-id="1f879a054b8880528b51f52df9f14af5"><span><div id="1f879a054b8880528b51f52df9f14af5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880528b51f52df9f14af5" title="测试检索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>测试检索</b></span></span></h4><div class="notion-text notion-block-1f879a054b88809283beffd1be851028">点击<code class="notion-inline-code">Test Retrieveval</code></div><div class="notion-text notion-block-1f879a054b8880df9aeefc11d633d88d">下面是PDF的内容</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880f98011e5bde1abc375"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512182529030.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80f9-8011-e5bde1abc375" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1f879a054b88800196def8bc79f940fd">测试结果</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880da80c6f4632d95cdb1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512182704438.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80da-80c6-f4632d95cdb1" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b8880ef95d6dd98fc8d517a" data-id="1f879a054b8880ef95d6dd98fc8d517a"><span><div id="1f879a054b8880ef95d6dd98fc8d517a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880ef95d6dd98fc8d517a" title="创建Agent实现调用知识库"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>创建Agent实现调用知识库</b></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880c5b511e3f09b84eb30" data-id="1f879a054b8880c5b511e3f09b84eb30"><span><div id="1f879a054b8880c5b511e3f09b84eb30" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880c5b511e3f09b84eb30" title="创建一个Chatflows"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>创建一个Chatflows</b></span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888043b700ffe7d0788700"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512183334498.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8043-b700-ffe7d0788700" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880cdbbdbc44ebfe226d6" data-id="1f879a054b8880cdbbdbc44ebfe226d6"><span><div id="1f879a054b8880cdbbdbc44ebfe226d6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880cdbbdbc44ebfe226d6" title="Tool Agent"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>Tool Agent</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b8880e0b2c2c5ba1f0016e7"><li>选择一个Tool Agent</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b88804e9d74c9555a8ab8ae"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512142804173.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-804e-9d74-c9555a8ab8ae" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88802e8e10ccc5f9fcbd4c" data-id="1f879a054b88802e8e10ccc5f9fcbd4c"><span><div id="1f879a054b88802e8e10ccc5f9fcbd4c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88802e8e10ccc5f9fcbd4c" title="设置System Message"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>设置System Message</b></span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888030836bd6329e92698e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512183226128.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8030-836b-d6329e92698e" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880a882a3f6f830efa0ba" data-id="1f879a054b8880a882a3f6f830efa0ba"><span><div id="1f879a054b8880a882a3f6f830efa0ba" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880a882a3f6f830efa0ba" title="ChatOpenAI"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>ChatOpenAI</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b888045a468c83a7e7d51ce"><li>选择一个Chat Model类型的节点并连接到Tool Agent</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880ef84f2d0f69c37e2fd"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512183620970.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80ef-84f2-d0f69c37e2fd" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880a2b0e3de930bfe960f" data-id="1f879a054b8880a2b0e3de930bfe960f"><span><div id="1f879a054b8880a2b0e3de930bfe960f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880a2b0e3de930bfe960f" title="Buffer Windows Memory"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>Buffer Windows Memory</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b8880a98d9bdcccb8d3ba65"><li>为保证LLM在当前对话中有上下文，需要选择一个Memory类型的节点进行关联</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888026a2d7d5f754ddb250"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512183740852.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8026-a2d7-d5f754ddb250" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88805798e3e2e537d5ecf8" data-id="1f879a054b88805798e3e2e537d5ecf8"><span><div id="1f879a054b88805798e3e2e537d5ecf8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88805798e3e2e537d5ecf8" title="Retrievever Tool"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>Retrievever Tool</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b888006a501f4653306591e"><li>选择检索工具关联到ToolAgent</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888047a041d2524310c420"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512184022190.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8047-a041-d2524310c420" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b888011824cdd996b5024f1" data-id="1f879a054b888011824cdd996b5024f1"><span><div id="1f879a054b888011824cdd996b5024f1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b888011824cdd996b5024f1" title="Document Store(Vector)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>Document Store(Vector)</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b8880708dcaff82dd4a2e41"><li>这个节点可以选择到之前创建的知识库，这里和Retrievever Tool关联</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888005bab2c9fb002c8b64"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512184138158.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8005-bab2-c9fb002c8b64" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88802ba352fd9d7427d18f" data-id="1f879a054b88802ba352fd9d7427d18f"><span><div id="1f879a054b88802ba352fd9d7427d18f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88802ba352fd9d7427d18f" title="使用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>使用</b></span></span></h4><div class="notion-text notion-block-1f879a054b8880e3a13ff61b84e2c7c5">保存之后点击对话图标开始使用</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888093bc41da1caa484ba9"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250512184504748.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8093-bc41-da1caa484ba9" alt="notion image" loading="lazy" decoding="async"/></div></figure></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DeerFlow安装配置及使用案例]]></title>
            <link>https://heyiwen.com/article/agent-3</link>
            <guid>https://heyiwen.com/article/agent-3</guid>
            <pubDate>Mon, 19 May 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[DeerFlow安装配置及使用案例]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1f879a054b888051a6bac6c24827ebbf"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b888079abd3c8a45bc2630a" data-id="1f879a054b888079abd3c8a45bc2630a"><span><div id="1f879a054b888079abd3c8a45bc2630a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b888079abd3c8a45bc2630a" title="简介"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>简介</b></span></span></h3><div class="notion-text notion-block-1f879a054b8880aebafddab1afde2f8c">DeerFlow项目由字节跳动技术团队发起和主导开发，作为一个开源深度研究框架，于2025年年初正式开源。该项目基于LangStack生态，构建于LangChain与LangGraph的开源技术栈之上，充分利用语言模型和专业的工具集成，目标是推动深度研究工作自动化。其设计思想和技术实现产生于字节跳动内部对高效研究流程的需求，强调社区驱动与贡献回馈。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b888084a3d9ece6e9cd86d7" data-id="1f879a054b888084a3d9ece6e9cd86d7"><span><div id="1f879a054b888084a3d9ece6e9cd86d7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b888084a3d9ece6e9cd86d7" title="项目目标"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>项目目标</b></span></span></h3><div class="notion-text notion-block-1f879a054b888063a2f8c39f44e88770">DeerFlow旨在提供一个多智能体（Multi-Agent）系统框架，自动化处理复杂的研究任务。通过整合语言模型与网页搜索、爬虫、Python代码执行等多种专用工具，实现端到端自动化的信息采集、分析与报告生成。目标用户包括科研人员、开发者及学生，适合学术研究、市场分析和代码分析等多场景应用。项目力求减少人工干预，提高研究效率，支持动态规划和人机协作。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b88806197fee38975301af8" data-id="1f879a054b88806197fee38975301af8"><span><div id="1f879a054b88806197fee38975301af8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88806197fee38975301af8" title="核心功能"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>核心功能</b></span></span></h3><ul class="notion-list notion-list-disc notion-block-1f879a054b888032b4c2d970fc7567a8"><li><b>多智能体架构</b>：包括协调器、规划器、研究团队和报告员等模块，分工明确，协作完成复杂任务。</li></ul><ul class="notion-list notion-list-disc notion-block-1f879a054b88804bbcdaeefb3daf4e69"><li><b>语言模型集成</b>：支持多种大型语言模型接入，包括开源模型与OpenAI API接口，借助litellm库进行统一管理。</li></ul><ul class="notion-list notion-list-disc notion-block-1f879a054b8880f98587f387071cdcec"><li><b>网络搜索与爬虫</b>：支持多搜索引擎（如Tavily、DuckDuckGo、Brave Search）以丰富信息源，具备网页爬取能力。</li></ul><ul class="notion-list notion-list-disc notion-block-1f879a054b888034adffff94f76d9dd2"><li><b>Python代码执行环境</b>：可运行代码完成数据处理和分析。</li></ul><ul class="notion-list notion-list-disc notion-block-1f879a054b88806f8e2bdbb6a9b55e76"><li><b>人机协作</b>：允许用户用自然语言实时修改研究计划和生成内容，支持AI辅助的报告编辑和润色。</li></ul><ul class="notion-list notion-list-disc notion-block-1f879a054b8880b48c1edeceafa9c784"><li><b>内容生成</b>：自动生成研究报告，可进一步转化为播客音频和文字版PPT，支持文本到语音（TTS）功能，生成高质量语音内容，借助火山引擎的音色技术。</li></ul><ul class="notion-list notion-list-disc notion-block-1f879a054b88808093bbe0c6924132fc"><li><b>开发与调试工具</b>：配备LangGraph Studio可视化调试 workflow，Replay系统支持多轮对话快速回放。</li></ul><ul class="notion-list notion-list-disc notion-block-1f879a054b88800cae04f3f8c286aa16"><li><b>跨平台界面</b>：具备Web UI和控制台UI，提升用户体验。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b88805c876dd690f213b336" data-id="1f879a054b88805c876dd690f213b336"><span><div id="1f879a054b88805c876dd690f213b336" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88805c876dd690f213b336" title="架构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>架构</b></span></span></h3><div class="notion-text notion-block-1f879a054b8880d59fdefdde691890e9">DeerFlow 实现了一个模块化的多智能体系统架构，专为自动化研究和代码分析而设计。该系统基于 LangGraph 构建，实现了灵活的基于状态的工作流，其中组件通过定义良好的消息传递系统进行通信。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888096bbedf2f079cabcfb"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250519154914458.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8096-bbed-f2f079cabcfb" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b888078b255f5f9ff3cd55a" data-id="1f879a054b888078b255f5f9ff3cd55a"><span><div id="1f879a054b888078b255f5f9ff3cd55a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b888078b255f5f9ff3cd55a" title="安装DeerFlow"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>安装DeerFlow</b></span></span></h3><div class="notion-text notion-block-1f879a054b88803e9dd3eefb4c35ed6d">可选，通过<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://pnpm.io/installation">pnpm</a>安装 Web UI 依赖：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88801294c6fc2e9ff65b38" data-id="1f879a054b88801294c6fc2e9ff65b38"><span><div id="1f879a054b88801294c6fc2e9ff65b38" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88801294c6fc2e9ff65b38" title="配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>配置</b></span></span></h4><div class="notion-text notion-block-1f879a054b888093b612caacb5d3e7da">配置<code class="notion-inline-code">.env</code>中的搜索引擎API Key</div><div class="notion-text notion-block-1f879a054b8880aea015c33f7a80bdb3">配置<code class="notion-inline-code">conf.yaml</code>中的模型配置</div><ul class="notion-list notion-list-disc notion-block-1f879a054b888073a4dcc7fef738e28d"><li><code class="notion-inline-code">conf.yaml</code></li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88805ab2e5cacdb82e191e" data-id="1f879a054b88805ab2e5cacdb82e191e"><span><div id="1f879a054b88805ab2e5cacdb82e191e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88805ab2e5cacdb82e191e" title="安装 Web UI 依赖"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>安装 Web UI 依赖</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88803e9036c3b5f7de1648" data-id="1f879a054b88803e9036c3b5f7de1648"><span><div id="1f879a054b88803e9036c3b5f7de1648" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88803e9036c3b5f7de1648" title="启动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>启动</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88805eab7dd749c915865b" data-id="1f879a054b88805eab7dd749c915865b"><span><div id="1f879a054b88805eab7dd749c915865b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88805eab7dd749c915865b" title="控制台 UI"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>控制台 UI</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880a4ac26e67ca7f3d7e5" data-id="1f879a054b8880a4ac26e67ca7f3d7e5"><span><div id="1f879a054b8880a4ac26e67ca7f3d7e5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880a4ac26e67ca7f3d7e5" title="Web UI"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>Web UI</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880638bf3cfe57b3ba6a3" data-id="1f879a054b8880638bf3cfe57b3ba6a3"><span><div id="1f879a054b8880638bf3cfe57b3ba6a3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880638bf3cfe57b3ba6a3" title="访问"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>访问</b></span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880a4aa2fe32d8cd58421"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250519154201117.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80a4-aa2f-e32d8cd58421" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b8880ddaffdcb5d72ff6097" data-id="1f879a054b8880ddaffdcb5d72ff6097"><span><div id="1f879a054b8880ddaffdcb5d72ff6097" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880ddaffdcb5d72ff6097" title="示例"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>示例</b></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880eba2d3dcf6ce87cb5c" data-id="1f879a054b8880eba2d3dcf6ce87cb5c"><span><div id="1f879a054b8880eba2d3dcf6ce87cb5c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880eba2d3dcf6ce87cb5c" title="询问"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>询问</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b888020a350dba740c78b74"><li>DeerFlow是什么项目？</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888039a847c8d3cc2087c7"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250519154342791.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8039-a847-c8d3cc2087c7" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880418c3fdb3bfd5416ff" data-id="1f879a054b8880418c3fdb3bfd5416ff"><span><div id="1f879a054b8880418c3fdb3bfd5416ff" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880418c3fdb3bfd5416ff" title="Start research"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>Start research</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b8880628c95d088c11a85e2"><li>开始搜索</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888085b8d6d4fe9221df23"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250519154437472.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8085-b8d6-d4fe9221df23" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-1f879a054b88802da1e1fe8e8bafbcd3"><li>总结内容</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880aca577c734126790d6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250519154502931.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80ac-a577-c734126790d6" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b888080804ad9489d6c542b" data-id="1f879a054b888080804ad9489d6c542b"><span><div id="1f879a054b888080804ad9489d6c542b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b888080804ad9489d6c542b" title="接入MCP"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>接入MCP</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b8880d2bb17c308b4b7689e"><li>接一个高德地图的MCP Server</li></ul><div class="notion-text notion-block-1f879a054b88804fa488fd2f10cf899a"><b>demo1：</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b88808dac4ef534468a13e5"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250519175034328.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-808d-ac4e-f534468a13e5" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1f879a054b8880f49630e98819cc4441"><b>demo2:</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b8880a691bbd2ea52772e4d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250519175005657.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-80a6-91bb-d2ea52772e4d" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88806487ddfb1277b58482" data-id="1f879a054b88806487ddfb1277b58482"><span><div id="1f879a054b88806487ddfb1277b58482" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88806487ddfb1277b58482" title="LangGraph Studio"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>LangGraph Studio</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1f879a054b88805a95d4ec1eeb0ecc30"><li>使用下面命令安装依赖并启动一个基于 LangGraph 的开发服务器</li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b88801596bdece78b9ae6bd" data-id="1f879a054b88801596bdece78b9ae6bd"><span><div id="1f879a054b88801596bdece78b9ae6bd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b88801596bdece78b9ae6bd" title="PPT生成"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>PPT生成</b></span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b888083aa57c885f9708a21"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250519175640136.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-8083-aa57-c885f9708a21" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-1f879a054b888028987cdecb6cb85752"><li>生成的PPT只有文字</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1f879a054b88802dbb07dc505b87cf97"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250519182115421.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1f879a05-4b88-802d-bb07-dc505b87cf97" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1f879a054b8880b0a0f1c64de03311fd" data-id="1f879a054b8880b0a0f1c64de03311fd"><span><div id="1f879a054b8880b0a0f1c64de03311fd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880b0a0f1c64de03311fd" title="Docker"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>Docker</b></span></span></h3><div class="notion-text notion-block-1f879a054b8880fe9f47f2956983323b">确保<code class="notion-inline-code">.env</code>和<code class="notion-inline-code">.conf.yaml</code>文件已准备就绪。</div><div class="notion-text notion-block-1f879a054b8880e6b27dfffe9d8f6932">并且<code class="notion-inline-code">web</code>目录下的存在<code class="notion-inline-code">.env</code>文件</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880138ce2e720398e853d" data-id="1f879a054b8880138ce2e720398e853d"><span><div id="1f879a054b8880138ce2e720398e853d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880138ce2e720398e853d" title="构建镜像"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>构建镜像</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1f879a054b8880b19a49fd91c19cfe67" data-id="1f879a054b8880b19a49fd91c19cfe67"><span><div id="1f879a054b8880b19a49fd91c19cfe67" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f879a054b8880b19a49fd91c19cfe67" title="启动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>启动</b></span></span></h4><blockquote class="notion-quote notion-block-1f879a054b8880df9168c1a284d12427"><div>⚠️ 注意：部署到公网时需要在构建前端的时候要在构建参数上填写后端server地址：</div><div class="notion-text notion-block-1f879a054b88802f94cbd19ea840df49">比如：docker buildx build --platform linux/amd64 --build-arg NEXT_PUBLIC_API_URL=<a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://xxxxxx/api">http://xxxxxx/api</a> -f Dockerfile -t deer-flow:frontend-latest .</div></blockquote></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[使用droidrun库实现AI控制安卓手机]]></title>
            <link>https://heyiwen.com/article/agent-2</link>
            <guid>https://heyiwen.com/article/agent-2</guid>
            <pubDate>Thu, 24 Apr 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[DroidRun 是一个框架，通过LLM代理控制 Android 设备。它允许您使用自然语言命令自动化 Android 设备交互。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1df79a054b888015a5ced9c4899cc993"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1df79a054b888092a56ecf5dc178049f" data-id="1df79a054b888092a56ecf5dc178049f"><span><div id="1df79a054b888092a56ecf5dc178049f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1df79a054b888092a56ecf5dc178049f" title="介绍"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>介绍</b></span></span></h3><div class="notion-text notion-block-1df79a054b88804c8274e40ce20787e8">DroidRun 是一个框架，通过LLM代理控制 Android 设备。它允许您使用自然语言命令自动化 Android 设备交互。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1df79a054b88803dae3dcff33a4f4463" data-id="1df79a054b88803dae3dcff33a4f4463"><span><div id="1df79a054b88803dae3dcff33a4f4463" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1df79a054b88803dae3dcff33a4f4463" title="安装环境"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>安装环境</b></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1df79a054b88801d8421fb9087faa2f9" data-id="1df79a054b88801d8421fb9087faa2f9"><span><div id="1df79a054b88801d8421fb9087faa2f9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1df79a054b88801d8421fb9087faa2f9" title="安装源码依赖"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>安装源码依赖</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1df79a054b8880ca9c62d4621bc50d0f" data-id="1df79a054b8880ca9c62d4621bc50d0f"><span><div id="1df79a054b8880ca9c62d4621bc50d0f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1df79a054b8880ca9c62d4621bc50d0f" title="安装 ADB"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>安装 ADB</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1df79a054b8880dba588c550dedb56e4"><li><b>Install ADB</b></li><ul class="notion-list notion-list-disc notion-block-1df79a054b8880dba588c550dedb56e4"><li><b>macOS</b>:</li><li><code class="notion-inline-code">brew install android-platform-tools</code></li><li><b>Windows</b>: 下载 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://developer.android.com/studio/releases/platform-tools">Android SDK Platform Tools</a> 平台工具并解压 ZIP 文件</li></ul></ul><ul class="notion-list notion-list-disc notion-block-1df79a054b88805dbeedcd6a1ca20b47"><li><b>验证安装</b></li><ul class="notion-list notion-list-disc notion-block-1df79a054b88805dbeedcd6a1ca20b47"><li><code class="notion-inline-code">(droidrun) ➜ droidrun git:(main) adb versionAndroid Debug Bridge version 1.0.41Version 35.0.2-12147458Installed as /opt/homebrew/bin/adbRunning on Darwin 24.4.0 (arm64)(droidrun) ➜ droidrun git:(main)</code></li></ul></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1df79a054b8880578d6ef3809ca7f113" data-id="1df79a054b8880578d6ef3809ca7f113"><span><div id="1df79a054b8880578d6ef3809ca7f113" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1df79a054b8880578d6ef3809ca7f113" title="安装 DroidRun Portal 应用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>安装 DroidRun Portal 应用</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1df79a054b888090ac4ffd45a60f02c6"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/droidrun/droidrun-portal/releases">下载地址</a></li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1df79a054b88802bb3cddec594dce889" data-id="1df79a054b88802bb3cddec594dce889"><span><div id="1df79a054b88802bb3cddec594dce889" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1df79a054b88802bb3cddec594dce889" title="安装到手机"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>安装到手机</b></span></span></h4><div class="notion-text notion-block-1df79a054b888062aa89d911b842560b">这里我使用的安卓虚拟机</div><div class="notion-text notion-block-1df79a054b88803bbe00d289fedcba02"><code class="notion-inline-code">droidrun setup --path=/Users/hejh/Desktop/droidrun-portal-v0.1.0.apk</code></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1df79a054b8880f49ec5e1b53e387658"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250418145922350.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1df79a05-4b88-80f4-9ec5-e1b53e387658" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1df79a054b8880289947d3d70b421b21"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250418153347906.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1df79a05-4b88-8028-9947-d3d70b421b21" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1df79a054b8880a7a7aaca18cc1acd98" data-id="1df79a054b8880a7a7aaca18cc1acd98"><span><div id="1df79a054b8880a7a7aaca18cc1acd98" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1df79a054b8880a7a7aaca18cc1acd98" title="设置 API 密钥"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>设置 API 密钥</b></span></span></h3><ul class="notion-list notion-list-disc notion-block-1df79a054b888082b569c8709e6258c4"><li>项目根目录创建一个 <code class="notion-inline-code">.env</code> 文件或设置环境变量</li></ul><blockquote class="notion-quote notion-block-1df79a054b8880bab857cd4b5f5b30ec"><div>可以只设置OPENAI_API_KEY</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1df79a054b8880918e1bdd8529db6a2f" data-id="1df79a054b8880918e1bdd8529db6a2f"><span><div id="1df79a054b8880918e1bdd8529db6a2f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1df79a054b8880918e1bdd8529db6a2f" title="验证设置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>验证设置</b></span></span></h3><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1df79a054b888099818fc8cd17f29e8d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250418153627098.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1df79a05-4b88-8099-818f-c8cd17f29e8d" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1df79a054b88805495c1da45b542eacb" data-id="1df79a054b88805495c1da45b542eacb"><span><div id="1df79a054b88805495c1da45b542eacb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1df79a054b88805495c1da45b542eacb" title="运行Demo"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>运行Demo</b></span></span></h3><ul class="notion-list notion-list-disc notion-block-1df79a054b88807a97c0e939607d748e"><li><code class="notion-inline-code">droidrun &quot;打开设置&quot; --provider openai --model gpt-4.1-mini</code></li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1df79a054b8880419445e0ce1e978b1f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250418154853407.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1df79a05-4b88-8041-9445-e0ce1e978b1f" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-1df79a054b8880d982a3fff84084a90a"><li><code class="notion-inline-code">droidrun &quot;打开Chrome，访问 www.baidu.com， 然后搜索 Weather&quot; --provider openai --model gpt-4o</code></li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1df79a054b88808fa2f9d143b491baa4"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://he-img-test.oss-cn-shanghai.aliyuncs.com/img/image-20250418162538378.png?spaceId=277f055e-8f13-42f5-aab0-9c27de675f23&amp;t=1df79a05-4b88-808f-a2f9-d143b491baa4" alt="notion image" loading="lazy" decoding="async"/></div></figure></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>