id: 7a386d82802a4a1796fd5cc3d7a71f46
parent_id: 
item_type: 1
item_id: 8e5462f9f2224ddc8340d98f2ad90f08
item_updated_time: 1764345642408
title_diff: "[{\"diffs\":[[1,\"开源项目_金融分析工具TradingAgents\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":24}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>开源项目_金融分析工具TradingAgents</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"content-class\\\" content=\\\"yinxiang.peso.superNote\\\"/>\\\r\\\n  <meta name=\\\"application-data:yinxiang.noteLayout\\\" content=\\\"{\\\"lineSpace\\\":\\\"recommend\\\",\\\"paragraphSpace\\\":\\\"recommend\\\"}\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"47246\\\"></a>\\\r\\\n<h1>开源项目_金融分析工具TradingAgents</h1>\\\r\\\n\\\r\\\n<div><span style=\\\"margin:0px;\\\"><div style=\\\"padding:8px 0px;margin:8px auto;max-width:700px;\\\"> <div><span></span></div>\\\n<p></p>\\\n<div style=\\\"--en-blockquote:true;box-sizing: border-box; padding-left: 19px; padding-top: 6px; padding-bottom: 6px; border-left: 3px solid #b4c0cc; background-position: initial initial; background-repeat: initial initial; margin-top: 6px\\\"><div>原文链接: <a href=\\\"https://mp.weixin.qq.com/s?__biz=MzU2NjIzMjcxOQ==&amp;mid=2247487400&amp;idx=1&amp;sn=d28ec7ec00cf1c3968af10935f6f9b75&amp;chksm=fdedf8d8e66ec8792196d18651c5fbfb0116e032086d6ee0aa70d81e9622c85182864ef7656f&amp;mpshare=1&amp;scene=1&amp;srcid=0818SfzcHGIb4foypx8VAPZL&amp;sharer_shareinfo=933270b8e3a6cfcfed822020dad51651&amp;sharer_shareinfo_first=933270b8e3a6cfcfed822020dad51651#rd\\\"><span>https://mp.weixin.qq.com/s?__biz=MzU2NjIzMjcxOQ==&amp;mid=224748...</span></a></div></div>\\\n<p></p>\\\n<div><span></span></div>\\\n<div style=\\\"\\\"><div><div><h1 style=\\\"margin:0\\\"> 开源项目_金融分析工具TradingAgents</h1><div><span style=\\\"position:relative\\\">原创</span><span> Yan.Xie </span><span><a style=\\\"position:relative\\\"> 算法学习分享 </a></span><span><em></em></span></div><div style=\\\";\\\"><div style=\\\"font-size: 16px;color: black;padding: 0 10px;line-height: 1.6;word-spacing: 0px;letter-spacing: 0px;word-break: break-word;word-wrap: break-word;text-align: left;font-family: Optima, 'Microsoft YaHei', PingFangSC-light, serif;margin-top: -10px;\\\"><h2 style=\\\"margin:0\\\"><span><span><span style=\\\"color:rgba(0, 0, 0, 0.9);font-size:17px;font-family:&quot;mp-quote&quot;, &quot;PingFang SC&quot;, system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;line-height:1.6;letter-spacing:0.034em;font-style:normal;font-weight:normal;\\\"><br/></span></span></span></h2><h2 style=\\\"margin:0\\\"><span><span><span>TradingAgent</span><span>s</span><i style=\\\"font-style: normal;-webkit-font-smoothing: antialiased;font-family: cos-icon !important;display: inline-block;font-size: 9px;line-height: 1;margin-top: var(--cos-space-none);vertical-align: text-top;margin-left: 1px;\\\"></i><span> </span></span></span><span>是一个由</span><span><span> </span><span>加州大学洛杉矶分</span><span>校</span><i style=\\\"font-style: normal;-webkit-font-smoothing: antialiased;font-family: cos-icon !important;display: inline-block;font-size: 9px;line-height: 1;margin-top: var(--cos-space-none);vertical-align: text-top;margin-left: 1px;\\\"></i><span> </span></span><span>和</span><span><span> </span><span>麻省理工学</span><span>院</span><i style=\\\"font-style: normal;-webkit-font-smoothing: antialiased;font-family: cos-icon !important;display: inline-block;font-size: 9px;line-height: 1;margin-top: var(--cos-space-none);vertical-align: text-top;margin-left: 1px;\\\"></i><span> </span></span><span>联合开发的</span><span><span> </span><span>多智能体金融交易框</span><span>架</span><i style=\\\"font-style: normal;-webkit-font-smoothing: antialiased;font-family: cos-icon !important;display: inline-block;font-size: 9px;line-height: 1;margin-top: var(--cos-space-none);vertical-align: text-top;margin-left: 1px;\\\"></i><span> </span></span><span>，旨在通过</span><span><span> </span><span>大型语言模</span><span>型</span><i style=\\\"font-style: normal;-webkit-font-smoothing: antialiased;font-family: cos-icon !important;display: inline-block;font-size: 9px;line-height: 1;margin-top: var(--cos-space-none);vertical-align: text-top;margin-left: 1px;\\\"></i><span> </span></span><span>（LLM）驱动的多个专业化智能体协作完成金融交易决策。</span></h2><h2 style=\\\"margin-top:30px;margin-bottom:15px;line-height:1.5;font-size:18px;font-weight:bold;margin:2em auto 1em;color:#009874;background-color:rgba(0,152,116,0.1);padding:0.5em 1em;text-align:left;border-left:4px solid #009688\\\"><span>1 源码分析</span></h2><div style=\\\"padding-top: 8px;padding-bottom: 8px;line-height: 1.8;margin: 5px 0px;color: #3e3e3e;font-size: 14px;font-weight: 400;text-align: left;text-indent: 0px;word-spacing: 0px;\\\"><img src=\\\":/d2dcced2823f46d893c001ef634a98fd\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" alt=\\\"image\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;display: block;margin: 0 auto;width: auto;max-width: 100%;\\\"/></div><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;font-size:14px;list-style-type:disc\\\"><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>标准版：https://github.com/TauricResearch/TradingAgents，18.2K star（2 个月前更新）</span></div></li><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;font-size:14px;list-style-type:square\\\"><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>为简化内容，本文仅介绍标准版。</span></div></li></ul><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>中文加强版：https://github.com/hsliuping/TradingAgents-CN，4.7K star（一周前更新）</span></div></li><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;font-size:14px;list-style-type:square\\\"><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>针对 A 股信息源进行调整</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>加强了新闻功能的使用</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>加强了 Docker 部署部分</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>Streamlit 界面</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>基于国内模型优化</span></div></li></ul></ul><h3 style=\\\"margin-top:30px;margin-bottom:15px;line-height:1.5;font-size:16px;font-weight:bold;margin:2em 8px 1em 0;color:#009874;text-align:left;padding-left:10px;border-left:3px solid #009688\\\"><span>1.1 数据来源</span></h3><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>用法见：获取金融数据_总览</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;line-height:1.5;font-size:16px;font-weight:bold;margin:2em 8px 1em 0;color:#009874;text-align:left;padding-left:10px;border-left:3px solid #009688\\\"><span>1.2 模型</span></h3><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>实验中使用 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #5f5deee7;line-height: 1.5;font-size: 14px;padding: 3px 5px;border-radius: 2px;\\\"><span>o1-preview</span></code><span> 和 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #5f5deee7;line-height: 1.5;font-size: 14px;padding: 3px 5px;border-radius: 2px;\\\"><span>gpt-4o</span></code><span> 分别作为深度思考与快速思考的大语言模型。但测试时建议使用 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #5f5deee7;line-height: 1.5;font-size: 14px;padding: 3px 5px;border-radius: 2px;\\\"><span>o4-mini</span></code><span> 和 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #5f5deee7;line-height: 1.5;font-size: 14px;padding: 3px 5px;border-radius: 2px;\\\"><span>gpt-4.1-mini</span></code><span> 以节省成本，框架会发起大量 API 调用。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;line-height:1.5;font-size:16px;font-weight:bold;margin:2em 8px 1em 0;color:#009874;text-align:left;padding-left:10px;border-left:3px solid #009688\\\"><span>1.3 代码</span></h3><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>概览：该项目由 Python 语言编写，代码 3500+ 行，分为三个主要部分：</span></p><ol style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:decimal;font-size:14px\\\"><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>agent：定义了每个组和组内各成员的功能及实现，请参见具体 Prompt。</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>dataflow：实现各种工具功能，如新闻抓取、信息和数据采集，以及指标计算。</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>graph：构建组与成员之间的关系框架，是系统的调用入口，包含以下组件：</span></div></li><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;font-size:14px;list-style-type:disc\\\"><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>ConditionalLogic：处理条件逻辑</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>GraphSetup：设置和配置图结构</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>Propagator：管理信息传播和状态</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>Reflector：负责反思机制和记忆更新</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>SignalProcessor：处理交易信号并生成最终决策</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>TradingAgentsGraph：核心功能入口</span></div></li></ul></ol><pre style=\\\"margin-top: 10px;margin-bottom: 10px;\\\"><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span>12345678910111213</span></span><div><span>├── assets 资源数据</span></div><div><span>│   └── <span>cli</span></span></div><div><span>├── <span>cli</span> 与用户界面交互，实时跟踪各个 agent 的状态和执行流</span></div><div><span>│   └── <span>static</span></span></div><div><span>└── tradingagents（下面详述）</span></div><div><span>    ├── agents</span></div><div><span>    │   ├── analysts</span></div><div><span>    │   ├── managers</span></div><div><span>    │   ├── researchers</span></div><div><span>    │   ├── risk_mgmt</span></div><div><span>    │   ├── trader</span></div><div><span>    │   └── utils</span></div><div><span>    ├── dataflows</span></div></div></pre></div></div></pre><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;font-size:14px;list-style-type:disc\\\"><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>使用的库接口都非常简便，极为用户友好，无需在细节上浪费过多时间，用起来轻松愉快。</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>新闻来源包括：FinnHub、Google 新闻、Reddit，也尝试通过 OpenAI 获取新闻信息。处理方式是：将计算的指标和收集的信息提交给大模型，由其筛选出最重要的 topN 个指标并进行解释，最后提供建议。</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>指标计算使用了 Python 的 StockStats 库。</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>记忆存储使用 ChromaDB 管理，在思考过程中每个代理都会记录，并进行嵌入。</span></div></li><li style=\\\"font-size: 14px;color: #000;margin-bottom: 10px;\\\"><div><span>接口大多与美股相关。尽管使用了 FinnHub 数据，但只是读取了之前下载的数据文件，没有真正从 FinnHub、SimFin 下载数据。调用 yfinance 库时频繁出现 429 错误，不过 GoogleNews_Utils 库依旧可用。实际使用时还需要修改。</span></div></li></ul><h2 style=\\\"margin-top:30px;margin-bottom:15px;line-height:1.5;font-size:18px;font-weight:bold;margin:2em auto 1em;color:#009874;background-color:rgba(0,152,116,0.1);padding:0.5em 1em;text-align:left;border-left:4px solid #009688\\\"><span>2 依赖工具介绍</span></h2><h3 style=\\\"margin-top:30px;margin-bottom:15px;line-height:1.5;font-size:16px;font-weight:bold;margin:2em 8px 1em 0;color:#009874;text-align:left;padding-left:10px;border-left:3px solid #009688\\\"><span>2.1 ChromaDB</span></h3><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>ChromaDB （通常称为 Chroma ）是一个开源的向量数据库，专注于存储、索引和查询向量数据，主要用于自然语言处理（NLP）和计算机视觉等领域。它提供轻量化数据存储方案，支持多模态嵌入检索，并可与大型语言模型（如 Llama3 ）结合使用，实现精准文档查询。</span></p><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>基于 SQLite 数据库，无需复杂配置即可运行，适合中小型项目。</span></p><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>ChromaDB 支持这两种模式：</span></p><h4 style=\\\"margin-top:30px;margin-bottom:15px;line-height:1.3;font-size:15px;font-weight:bold;margin:1.5em 8px 1em;orphans:2;text-align:left;color:#009874;padding-left:10px;border-left:2px solid #009688\\\"><span>2.1.1 客户端 - 服务器模式（多客户端共享）</span></h4><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>可以启动一个 ChromaDB 服务器，多个客户端连接：</span></p><h1 style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:rgb(62,62,62);font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>启动 ChromaDB 服务器</span></h1><pre style=\\\"margin-top: 10px;margin-bottom: 10px;\\\"><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>chroma run <span>--host</span> localhost <span>--port</span> <span>8000</span></span></div></pre></div></div></pre><h1 style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:rgb(62,62,62);font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>客户端连接到服务器</span></h1><pre style=\\\"margin-top: 10px;margin-bottom: 10px;\\\"><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"></div></pre><h4 style=\\\"margin-top:30px;margin-bottom:15px;line-height:1.3;font-size:15px;font-weight:bold;margin:1.5em 8px 1em;orphans:2;text-align:left;color:#009874;padding-left:10px;border-left:2px solid #009688\\\"><span>2.1.2 嵌入式模式（单客户端，类似 SQLite）</span></h4><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>就像当前代码中使用的方式，直接创建本地客户端：</span></p><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>当前代码使用的方式 - 嵌入式模式</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span>client</span> = chromadb.Client(Settings(allow_reset=<span>True</span>))</span></div></pre></div><pre style=\\\"margin-top: 10px;margin-bottom: 10px;\\\"><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"></div></pre><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>或者指定持久化路径</span></p><pre style=\\\"margin-top: 10px;margin-bottom: 10px;\\\"><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span>client</span> = chromadb.PersistentClient(path=<span>&quot;/path/to/chroma/data&quot;</span>)</span></div></pre></div></div></pre><h3 style=\\\"margin-top:30px;margin-bottom:15px;line-height:1.5;font-size:16px;font-weight:bold;margin:2em 8px 1em 0;color:#009874;text-align:left;padding-left:10px;border-left:3px solid #009688\\\"><span>2.2 LangGraph</span></h3><p style=\\\"padding-top:8px;padding-bottom:8px;line-height:1.8;margin:5px 0;color:#3e3e3e;font-size:14px;font-weight:400;text-align:left;text-indent:0;word-spacing:0\\\"><span>LangGraph 是一种基于 LangChain 构建的智能体编排框架，通过状态机驱动，将 Agent 系统设计为有向图流程图。</span></p></div></div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":21567}]"
metadata_diff: {"new":{"id":"8e5462f9f2224ddc8340d98f2ad90f08","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348851188,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:04:34.893Z
created_time: 2025-11-28T21:04:34.893Z
type_: 13