{"id":3775,"date":"2026-08-17T15:12:09","date_gmt":"2026-08-17T07:12:09","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=3775"},"modified":"2026-08-17T15:12:09","modified_gmt":"2026-08-17T07:12:09","slug":"%e5%88%ab%e8%ae%a9-agent-%e7%9b%b2%e7%9b%ae%e4%b9%b1%e8%b0%83%e7%94%a8%e5%b7%a5%e5%85%b7%ef%bc%9aplan%e2%80%91and%e2%80%91execute-%e8%a7%a3%e5%86%b3%e4%bb%bb%e5%8a%a1%e6%b7%b7%e4%b9%b1%e9%9a%be","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=3775","title":{"rendered":"\u522b\u8ba9 Agent \u76f2\u76ee\u4e71\u8c03\u7528\u5de5\u5177\uff1aPlan\u2011and\u2011Execute \u89e3\u51b3\u4efb\u52a1\u6df7\u4e71\u96be\u9898"},"content":{"rendered":"<section id=\"wenyan\" data-provider=\"WenYan\" style=\"font-family: system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Sans&quot;, Roboto, sans-serif; word-break: break-word; overflow-wrap: break-word; color: rgb(0, 0, 0); font-size: 16px; line-height: 1.75; caret-color: rgb(0, 0, 0);\">\n<blockquote style=\"color: rgb(85, 85, 85); background-color: rgb(255, 249, 235); background-image: none; padding: 16px 20px; margin: 20px 0px; border-width: 0px 0px 0px 4px; border-style: none none none solid; border-color: currentcolor currentcolor currentcolor rgb(248, 180, 63); border-radius: 6px; font-style: normal; quotes: none;\">\n<p style=\"margin: 0.55em 0px; color: rgb(85, 85, 85); text-indent: 0px; padding: 0px; line-height: 1.75; font-style: normal; background: transparent;\">\u4e0a\u7bc7\u4f60\u7ed9 Agent \u88c5\u4e0a\u4e86 ReAct \u5f15\u64ce\u2014\u2014\u5b83\u80fd\u53cd\u590d\u601d\u8003\u3001\u53cd\u590d\u8c03\u5de5\u5177\uff0c\u76f4\u5230\u4efb\u52a1\u5b8c\u6210\u3002\u4f46\u9762\u5bf9\u590d\u6742\u4efb\u52a1\u65f6\uff0c\u8fb9\u505a\u8fb9\u60f3\u5bb9\u6613\u8dd1\u504f\u3002\u8fd9\u7bc7\u8bb2 Plan-and-Execute\u2014\u2014\u5148\u89c4\u5212\u518d\u6267\u884c\uff0c\u8ba9 Agent \u505a\u4e8b\u66f4\u6709\u7ae0\u6cd5\u3002<\/p>\n<\/blockquote>\n<hr style=\"border-width: 1px medium medium; border-style: solid none none; border-color: rgb(240, 230, 208) currentcolor currentcolor; border-image: none; margin: 24px 0px;\">\n<h2 style=\"display: inline-block; position: relative; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 32px; margin-bottom: 16px; padding: 0px 6px 2px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; text-align: left; background: linear-gradient(to top, rgb(248, 180, 63) 42%, transparent 42%); box-decoration-break: clone; -webkit-box-decoration-break: clone; font-size: 17px;\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u5c0f\u660e\u9047\u5230\u4e86\u590d\u6742\u4efb\u52a1<\/span><\/h2>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u5c0f\u660e\u5174\u51b2\u51b2\u5730\u7ed9 Agent \u4e0b\u4e86\u4e00\u4e2a\u4efb\u52a1\uff1a<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\">\u4f60\uff1a\u8c03\u7814 AI \u7f16\u7a0b\u5de5\u5177\u73b0\u72b6\uff0c\u5199\u4e00\u4efd\u7b80\u8981\u62a5\u544a\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">ReAct \u6a21\u5f0f\u7684 Agent \u5f00\u59cb\u5de5\u4f5c\u4e86\uff1a<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\">[\u6b65\u9aa4 1\/5]\n[\u8c03\u7528\u5de5\u5177]: web_search\n[\u53c2\u6570]: {\"query\": \"AI \u7f16\u7a0b\u5de5\u5177\"}\n[\u7ed3\u679c]: Copilot\u3001Cursor\u3001Codeium...\n\n[\u6b65\u9aa4 2\/5]\n[\u8c03\u7528\u5de5\u5177]: web_search\n[\u53c2\u6570]: {\"query\": \"AI \u7f16\u7a0b\"}\n[\u7ed3\u679c]: (\u8ddf\u4e0a\u6b21\u7c7b\u4f3c...)\n\n[\u6b65\u9aa4 3\/5]\nAgent\uff1aAI \u7f16\u7a0b\u5de5\u5177\u4e3b\u8981\u5305\u62ec GitHub Copilot...\uff08\u4e00\u6bb5\u7b80\u77ed\u7684\u603b\u7ed3\uff09\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u5c0f\u660e\u76b1\u7709\u5934\uff1a&#8221;\u8fd9\u5c31\u5b8c\u4e86\uff1f\u5b83\u641c\u4e86\u4e24\u8f6e\u5c31\u7ed9\u7b54\u6848\u4e86\uff0c\u4f46\u6211\u60f3\u7684\u662f\u2014\u2014\u5148\u641c\u5de5\u5177\u5217\u8868 \u2192 \u6bcf\u4e2a\u5de5\u5177\u7684\u8be6\u60c5 \u2192 \u5bf9\u6bd4\u5206\u6790 \u2192 \u5199\u62a5\u544a\u3002\u5b83\u5b8c\u5168\u6ca1\u6309\u8fd9\u4e2a\u601d\u8def\u8d70\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u8001\u5f20\u8bf4\uff1a&#8221;ReAct \u7684\u7279\u70b9\u662f<strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u8fb9\u505a\u8fb9\u60f3<\/strong>\u3002\u6a21\u578b\u5728\u6bcf\u4e00\u6b65\u5224\u65ad&#8217;\u8fd8\u9700\u8981\u4ec0\u4e48\u4fe1\u606f&#8217;\uff0c\u4f46\u9762\u5bf9\u590d\u6742\u4efb\u52a1\u65f6\uff0c\u8fd9\u79cd\u81ea\u5e95\u5411\u4e0a\u7684\u65b9\u5f0f\u5bb9\u6613\uff1a<\/p>\n<ol style=\"margin: 8px 0px; padding-left: 28px; list-style: outside decimal;\">\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u65b9\u5411\u8dd1\u504f<\/strong>\u2014\u2014\u641c\u7740\u641c\u7740\u5c31\u504f\u4e86<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u9057\u6f0f\u6b65\u9aa4<\/strong>\u2014\u2014\u6a21\u578b\u53ef\u80fd\u5fd8\u4e86\u67d0\u4e9b\u73af\u8282<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u6d45\u5c1d\u8f84\u6b62<\/strong>\u2014\u2014\u641c\u4e00\u4e24\u8f6e\u5c31\u8ba4\u4e3a&#8217;\u591f\u4e86'&#8221;<\/section>\n<\/li>\n<\/ol>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u90a3\u600e\u4e48\u529e\uff1f&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u4f60\u9700\u8981\u7684\u4e0d\u662f\u8fb9\u505a\u8fb9\u60f3\uff0c\u800c\u662f<strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u5148\u60f3\u6e05\u695a\u518d\u505a<\/strong>\u2014\u2014\u5148\u5236\u5b9a\u5b8c\u6574\u7684\u6267\u884c\u8ba1\u5212\uff0c\u7528\u6237\u786e\u8ba4\u540e\uff0c\u518d\u6309\u8ba1\u5212\u4e00\u6b65\u6b65\u6267\u884c\u3002&#8221;<\/p>\n<hr style=\"border-width: 1px medium medium; border-style: solid none none; border-color: rgb(240, 230, 208) currentcolor currentcolor; border-image: none; margin: 24px 0px;\">\n<h2 style=\"display: inline-block; position: relative; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 32px; margin-bottom: 16px; padding: 0px 6px 2px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; text-align: left; background: linear-gradient(to top, rgb(248, 180, 63) 42%, transparent 42%); box-decoration-break: clone; -webkit-box-decoration-break: clone; font-size: 17px;\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">Plan-and-Execute \u662f\u4ec0\u4e48<\/span><\/h2>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;Plan-and-Execute \u628a\u4e00\u4e2a\u4efb\u52a1\u5206\u6210\u4e24\u4e2a\u9636\u6bb5\uff1a&#8221;<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\">\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502  Planner  \u2502   \u2502     Executor        \u2502\n\u2502  \uff08\u89c4\u5212\u8005\uff09  \u2502   \u2502     \uff08\u6267\u884c\u8005\uff09         \u2502\n\u2502       \u2502   \u2502                 \u2502\n\u2502 \u62c6\u89e3\u4efb\u52a1  \u2502\u2500\u2500\u2500\u2500\u2192\u2502 \u6b65\u9aa41\uff1aweb_search \"AI\u7f16\u7a0b\u5de5\u5177\u5217\u8868\" \u2502\n\u2502 \u8f93\u51fa\u6b65\u9aa4\u6e05\u5355 \u2502   \u2502   \u2193 \u62ff\u5230\u7ed3\u679c           \u2502\n\u2502       \u2502   \u2502 \u6b65\u9aa42\uff1aweb_search \"Cursor\u529f\u80fd\u8be6\u60c5\" \u2502\n\u2502       \u2502   \u2502   \u2193 \u62ff\u5230\u7ed3\u679c\uff08\u5e26\u524d\u5e8f\uff09       \u2502\n\u2502 \u7528\u6237\u786e\u8ba4  \u2502   \u2502 \u6b65\u9aa43\uff1aweb_search \"Copilot\u5bf9\u6bd4\"   \u2502\n\u2502       \u2502   \u2502   \u2193 \u62ff\u5230\u7ed3\u679c           \u2502\n\u2502       \u2502   \u2502 \u6b65\u9aa44\uff1a\u6574\u5408\u64b0\u5199\u62a5\u544a         \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u8ddf ReAct \u7684\u5173\u952e\u533a\u522b\uff1a&#8221;<\/p>\n<table style=\"display: inline-block !important; width: auto; max-width: 100%; overflow: auto; border-spacing: 0px; border-collapse: collapse; margin: 1rem 0px;\">\n<thead style=\"background: rgb(255, 249, 235); color: rgb(51, 51, 51); text-align: left;\">\n<tr>\n<th style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200);\">\u7ef4\u5ea6<\/th>\n<th style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200);\">ReAct<\/th>\n<th style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200);\">Plan-and-Execute<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u7b56\u7565<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u8fb9\u505a\u8fb9\u60f3<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u5148\u89c4\u5212\u540e\u6267\u884c<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u6a21\u578b\u51b3\u7b56<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u6bcf\u6b65\u51b3\u5b9a\u4e0b\u4e00\u6b65\u505a\u4ec0\u4e48<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u4e00\u6b21\u6027\u51b3\u5b9a\u5168\u90e8\u6b65\u9aa4<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u53ef\u63a7\u6027<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u4f9d\u8d56\u6a21\u578b\u5224\u65ad<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u7528\u6237\u53ef\u4ee5\u5ba1\u67e5\u8ba1\u5212<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u9002\u5408\u573a\u666f<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u5355\u6b21\u590d\u6742\u95ee\u7b54\u3001\u52a8\u6001\u4efb\u52a1<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u8c03\u7814\u62a5\u544a\u3001\u591a\u6b65\u5206\u6790<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u6027\u80fd<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u5355\u6b65\u7b49\u5f85\u65f6\u95f4\u957f<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u8ba1\u5212\u53ef\u9884\u89c8\uff0c\u6267\u884c\u53ef\u9884\u6d4b<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u5931\u8d25\u5904\u7406<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u6a21\u578b\u81ea\u9002\u5e94\u8c03\u6574<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u9700\u8981\u9884\u8bbe\u5bb9\u9519\u903b\u8f91<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u5c0f\u660e\u61c2\u4e86\uff1a&#8221;\u5c31\u50cf\u6211\u5199\u6587\u7ae0\u2014\u2014\u5148\u5217\u5927\u7eb2\uff0c\u786e\u8ba4\u65b9\u5411\u5bf9\u4e86\uff0c\u518d\u9010\u6bb5\u586b\u5145\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u5bf9\u3002Plan-and-Execute \u5c31\u662f Agent \u7684&#8217;\u5148\u5217\u5927\u7eb2&#8217;\u3002&#8221;<\/p>\n<hr style=\"border-width: 1px medium medium; border-style: solid none none; border-color: rgb(240, 230, 208) currentcolor currentcolor; border-image: none; margin: 24px 0px;\">\n<h2 style=\"display: inline-block; position: relative; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 32px; margin-bottom: 16px; padding: 0px 6px 2px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; text-align: left; background: linear-gradient(to top, rgb(248, 180, 63) 42%, transparent 42%); box-decoration-break: clone; -webkit-box-decoration-break: clone; font-size: 17px;\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u4ee3\u7801\u5b9e\u6218\uff1aPlanner \u2014\u2014 \u53ea\u89c4\u5212\uff0c\u4e0d\u6267\u884c<\/span><\/h2>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u8001\u5f20\u6253\u5f00 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">planner.py<\/code>\uff1a<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs language-python\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\">PLANNER_PROMPT = <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\"\"\u4f60\u662f\u4e00\u4e2a\u4efb\u52a1\u89c4\u5212\u4e13\u5bb6\u3002\n\n\u7528\u6237\u7ed9\u4f60\u4e00\u4e2a\u590d\u6742\u4efb\u52a1\uff0c\u628a\u5b83\u5206\u89e3\u6210 3-6 \u4e2a\u6e05\u6670\u3001\u53ef\u6267\u884c\u7684\u6b65\u9aa4\u3002\n\n\u53ef\u7528\u5de5\u5177\uff1aweb_search\uff08\u641c\u7d22\uff09\u3001get_weather\uff08\u5929\u6c14\uff09\u3001\n      calculate\uff08\u8ba1\u7b97\uff09\u3001get_current_time\uff08\u65f6\u95f4\uff09\n\n\u8981\u6c42\uff1a\n- \u6bcf\u6b65\u8981\u5177\u4f53\uff0c\u80fd\u76f4\u63a5\u6267\u884c\n- \u9700\u8981\u5de5\u5177\u7684\u6b65\u9aa4\u6807\u660e\u5de5\u5177\u540d\uff0c\u4e0d\u9700\u8981\u7684\u586b null\n- \u6b65\u9aa4\u6570\u63a7\u5236\u5728 3-6 \u6b65\n\n\u53ea\u8fd4\u56de JSON\uff0c\u4e0d\u8981\u5176\u4ed6\u6587\u5b57\uff1a\n{\n  \"goal\": \"\u4efb\u52a1\u603b\u76ee\u6807\u4e00\u53e5\u8bdd\u63cf\u8ff0\",\n  \"steps\": [\n  {\"step\": 1, \"description\": \"\u5177\u4f53\u6b65\u9aa4\u63cf\u8ff0\", \"tool\": \"\u5de5\u5177\u540d\u6216null\"},\n  {\"step\": 2, \"description\": \"\u5177\u4f53\u6b65\u9aa4\u63cf\u8ff0\", \"tool\": \"\u5de5\u5177\u540d\u6216null\"}\n  ]\n}\"\"\"<\/span>\n\n<span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">def<\/span> <span class=\"hljs-title function_\" style=\"color: rgb(38, 139, 210);\">make_plan<\/span>(<span class=\"hljs-params\">task: <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">str<\/span><\/span>) -&gt; <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">dict<\/span>:\n  messages = [\n    {<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"role\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"system\"<\/span>, <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"content\"<\/span>: PLANNER_PROMPT},\n    {<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"role\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"user\"<\/span>, <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"content\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\u8bf7\u4e3a\u8fd9\u4e2a\u4efb\u52a1\u5236\u5b9a\u6267\u884c\u8ba1\u5212\uff1a<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{task}<\/span>\"<\/span>},\n  ]\n  response = chat(messages, tools=<span class=\"hljs-literal\" style=\"color: rgb(203, 75, 22);\">None<\/span>)   <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u6ce8\u610f\uff1atools=None<\/span>\n  text = response.content <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">or<\/span> <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\"<\/span>\n  <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u89e3\u6790 JSON\uff0c\u5bb9\u9519\u5904\u7406...<\/span>\n  <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">return<\/span> json.loads(text)\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u4e09\u4e2a\u5173\u952e\u8bbe\u8ba1\uff1a<\/p>\n<ol style=\"margin: 8px 0px; padding-left: 28px; list-style: outside decimal;\">\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\"><code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">tools=None<\/code><\/strong> \u2014\u2014 Planner \u4e0d\u8c03\u7528\u4efb\u4f55\u5de5\u5177\u3002\u5b83\u53ea\u9700\u8981\u628a\u4efb\u52a1\u62c6\u6210\u6b65\u9aa4\u6e05\u5355\uff0c\u4e0d\u9700\u8981\u6267\u884c\u3002<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u6bcf\u6b65\u58f0\u660e\u5de5\u5177\u540d<\/strong> \u2014\u2014 \u6b65\u9aa4\u91cc\u6807\u6ce8 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">\"tool\": \"web_search\"<\/code> \u6216 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">\"tool\": null<\/code>\uff0c\u8fd9\u6837 Executor \u77e5\u9053\u54ea\u4e9b\u6b65\u9aa4\u9700\u8981\u8c03\u5de5\u5177\u3001\u54ea\u4e9b\u6b65\u9aa4\u53ea\u9700\u8981\u6a21\u578b\u63a8\u7406\u3002<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">JSON \u8f93\u51fa<\/strong> \u2014\u2014 \u7ed3\u6784\u5316\u8ba1\u5212\uff0c\u65b9\u4fbf\u7a0b\u5e8f\u89e3\u6790\u548c\u6b65\u9aa4\u904d\u5386\u3002&#8221;<\/section>\n<\/li>\n<\/ol>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u6ce8\u610f\u5bb9\u9519\uff1a\u4e07\u4e00 JSON \u89e3\u6790\u5931\u8d25\uff08\u6a21\u578b\u8f93\u51fa\u591a\u4e86\u51e0\u53e5\u5e9f\u8bdd\uff09\uff0c\u7528\u6b63\u5219\u515c\u5e95\u63d0\u53d6 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">{...}<\/code>\u3002\u5982\u679c\u8fde\u6b63\u5219\u90fd\u6551\u4e0d\u56de\u6765\uff0c\u56de\u9000\u4e3a\u5355\u6b65\u8ba1\u5212\u2014\u2014\u628a\u6574\u4e2a\u4efb\u52a1\u5f53\u4e00\u6b65\u6267\u884c\u3002&#8221;<\/p>\n<hr style=\"border-width: 1px medium medium; border-style: solid none none; border-color: rgb(240, 230, 208) currentcolor currentcolor; border-image: none; margin: 24px 0px;\">\n<h2 style=\"display: inline-block; position: relative; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 32px; margin-bottom: 16px; padding: 0px 6px 2px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; text-align: left; background: linear-gradient(to top, rgb(248, 180, 63) 42%, transparent 42%); box-decoration-break: clone; -webkit-box-decoration-break: clone; font-size: 17px;\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u4ee3\u7801\u5b9e\u6218\uff1aExecutor \u2014\u2014 \u6309\u8ba1\u5212\u9010\u6b65\u6267\u884c<\/span><\/h2>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u8ba1\u5212\u6709\u4e86\uff0c\u63a5\u4e0b\u6765 Executor \u6309\u6b65\u9aa4\u6e05\u5355\u9010\u6b65\u6267\u884c\uff1a&#8221;<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs language-python\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\"><span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">def<\/span> <span class=\"hljs-title function_\" style=\"color: rgb(38, 139, 210);\">execute_plan<\/span>(<span class=\"hljs-params\">plan: <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">dict<\/span><\/span>) -&gt; <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">str<\/span>:\n  goal = plan.get(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"goal\"<\/span>, <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\u672a\u77e5\u4efb\u52a1\"<\/span>)\n  steps = plan.get(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"steps\"<\/span>, [])\n  collected: <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">list<\/span>[<span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">str<\/span>] = []   <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u6536\u96c6\u6bcf\u6b65\u7ed3\u679c<\/span>\n\n  <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">for<\/span> step_info <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">in<\/span> steps:\n    description = step_info[<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"description\"<\/span>]\n    tool_name = step_info.get(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"tool\"<\/span>)\n\n    <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">if<\/span> tool_name:\n      <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u5de5\u5177\u6b65\u9aa4\uff1a\u7528 FC \u63a8\u65ad\u53c2\u6570 \u2192 \u6267\u884c<\/span>\n      params = _infer_params_via_fc(\n        tool_name, description, goal, prior_results=collected\n      )\n      result = execute_tool(tool_name, params)\n    <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">else<\/span>:\n      <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u975e\u5de5\u5177\u6b65\u9aa4\uff1a\u76f4\u63a5\u8ba9 LLM \u5b8c\u6210<\/span>\n      msg = chat([{\n        <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"role\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"user\"<\/span>,\n        <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"content\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\u8bf7\u5b8c\u6210\u8fd9\u4e2a\u6b65\u9aa4\uff1a<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{description}<\/span>\"<\/span>\n      }])\n      result = msg.content <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">or<\/span> <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\"<\/span>\n\n    collected.append(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\u6b65\u9aa4<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{step_num}<\/span>\uff08<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{description}<\/span>\uff09\uff1a\\n<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{result}<\/span>\"<\/span>)\n\n  <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u6240\u6709\u6b65\u9aa4\u6267\u884c\u5b8c\uff0c\u6574\u5408\u6210\u6700\u7ec8\u62a5\u544a<\/span>\n  summary = chat([{\n    <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"role\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"user\"<\/span>,\n    <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"content\"<\/span>: (\n      <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\u4f60\u5b8c\u6210\u4e86\u4efb\u52a1\uff1a<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{goal}<\/span>\\n\\n\"<\/span>\n      <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\u4ee5\u4e0b\u662f\u6bcf\u4e2a\u6b65\u9aa4\u7684\u6267\u884c\u7ed3\u679c\uff1a\\n<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{all_results}<\/span>\\n\\n\"<\/span>\n      <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\u8bf7\u57fa\u4e8e\u4ee5\u4e0a\u6240\u6709\u4fe1\u606f\uff0c\u7ed9\u7528\u6237\u4e00\u4e2a\u5b8c\u6574\u3001\u6e05\u6670\u7684\u6700\u7ec8\u7b54\u6848\u3002\"<\/span>\n    ),\n  }])\n  <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">return<\/span> summary.content <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">or<\/span> <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\"<\/span>\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;Executor \u7684\u6838\u5fc3\u903b\u8f91\u5c31\u4e09\u5c42\uff1a<\/p>\n<ol style=\"margin: 8px 0px; padding-left: 28px; list-style: outside decimal;\">\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u904d\u5386\u6b65\u9aa4<\/strong> \u2192 \u6bcf\u6b65\u5224\u65ad\u662f\u5de5\u5177\u6b65\u9aa4\u8fd8\u662f\u63a8\u7406\u6b65\u9aa4<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u6267\u884c<\/strong> \u2192 \u5de5\u5177\u6b65\u9aa4\u8c03\u5de5\u5177\uff0c\u63a8\u7406\u6b65\u9aa4\u8c03 LLM<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u6c47\u603b<\/strong> \u2192 \u6240\u6709\u6b65\u9aa4\u7ed3\u679c\u62fc\u6210\u4e00\u4e2a\u5927 prompt\uff0c\u8ba9\u6a21\u578b\u5199\u6700\u7ec8\u62a5\u544a&#8221;<\/section>\n<\/li>\n<\/ol>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u5173\u952e\u6570\u636e\u7ed3\u6784\u662f <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">collected<\/code> \u5217\u8868\u2014\u2014\u6bcf\u6267\u884c\u5b8c\u4e00\u6b65\u5c31\u628a\u7ed3\u679c\u8ffd\u52a0\u8fdb\u53bb\u3002\u8fd9\u4e2a\u5217\u8868\u6709\u4e24\u4e2a\u7528\u9014\uff1a<\/p>\n<ul style=\"margin: 8px 0px; padding-left: 28px; list-style: outside disc;\">\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>\u4f20\u7ed9 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">_infer_params_via_fc<\/code>\uff08\u8ba9\u4e0b\u4e00\u6b65\u63a8\u65ad\u53c2\u6570\u65f6\u80fd\u53c2\u8003\u524d\u5e8f\u7ed3\u679c\uff09<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>\u6700\u540e\u6c47\u603b\u65f6\u5582\u7ed9\u6a21\u578b\u5199\u62a5\u544a&#8221;<\/section>\n<\/li>\n<\/ul>\n<hr style=\"border-width: 1px medium medium; border-style: solid none none; border-color: rgb(240, 230, 208) currentcolor currentcolor; border-image: none; margin: 24px 0px;\">\n<h2 style=\"display: inline-block; position: relative; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 32px; margin-bottom: 16px; padding: 0px 6px 2px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; text-align: left; background: linear-gradient(to top, rgb(248, 180, 63) 42%, transparent 42%); box-decoration-break: clone; -webkit-box-decoration-break: clone; font-size: 17px;\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u6838\u5fc3\u6280\u672f\uff1a\u53ea\u66b4\u9732\u4e00\u4e2a\u5de5\u5177\u7684 FC<\/span><\/h2>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u8fd9\u91cc\u6709\u4e00\u4e2a\u5173\u952e\u6280\u5de7\u2014\u2014<code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">_infer_params_via_fc<\/code>\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u5c0f\u660e\u95ee\uff1a&#8221;\u4e3a\u4ec0\u4e48\u4e0d\u8ba9\u6a21\u578b\u76f4\u63a5\u9009\u5de5\u5177\u3001\u5b9a\u53c2\u6570\uff1f\u50cf ReAct \u90a3\u6837\u81ea\u7136\u5730 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">tool_calls<\/code>\uff1f&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u8001\u5f20\u8bf4\uff1a&#8221;\u56e0\u4e3a\u5728 Plan-and-Execute \u91cc\uff0c<strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u9009\u5de5\u5177\u8fd9\u4ef6\u4e8b Planner \u5df2\u7ecf\u505a\u5b8c\u4e86<\/strong>\u3002Executor \u7684\u9636\u6bb5\uff0c\u5de5\u5177\u5df2\u7ecf\u5b9a\u4e86\u2014\u2014\u4f60\u53ea\u9700\u8981\u8ba9\u6a21\u578b\u63a8\u65ad\u53c2\u6570\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u4ed6\u6253\u5f00 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">executor.py<\/code> \u7684\u8fd9\u4e2a\u51fd\u6570\uff1a<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs language-python\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\"><span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">def<\/span> <span class=\"hljs-title function_\" style=\"color: rgb(38, 139, 210);\">_infer_params_via_fc<\/span>(<span class=\"hljs-params\">\n  tool_name: <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">str<\/span>,\n  step_description: <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">str<\/span>,\n  goal: <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">str<\/span>,\n  prior_results: <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">list<\/span>[<span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">str<\/span>] | <span class=\"hljs-literal\" style=\"color: rgb(203, 75, 22);\">None<\/span> = <span class=\"hljs-literal\" style=\"color: rgb(203, 75, 22);\">None<\/span>,\n<\/span>) -&gt; <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">dict<\/span> | <span class=\"hljs-literal\" style=\"color: rgb(203, 75, 22);\">None<\/span>:\n  <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># 1. \u4ece\u5168\u90e8\u5de5\u5177\u4e2d\uff0c\u53ea\u53d6\u51fa\u5f53\u524d\u8fd9\u4e00\u4e2a<\/span>\n  all_tools = get_tools_schema()\n  tools = [t <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">for<\/span> t <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">in<\/span> all_tools\n       <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">if<\/span> t[<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"function\"<\/span>][<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"name\"<\/span>] == tool_name]\n\n  <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># 2. \u62fc\u63a5\u524d\u5e8f\u7ed3\u679c\uff08\u8ba9\u6a21\u578b\u77e5\u9053\u4e4b\u524d\u53d1\u751f\u4e86\u4ec0\u4e48\uff09<\/span>\n  prior_block = <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\"<\/span>\n  <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">if<\/span> prior_results:\n    joined = <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\\n---\\n\"<\/span>.join(prior_results[-<span class=\"hljs-number\" style=\"color: rgb(203, 75, 22);\">3<\/span>:])\n    prior_block = <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\\n\\n\u524d\u5e8f\u6b65\u9aa4\u7ed3\u679c\uff08\u4f9b\u53c2\u8003\uff09\uff1a\\n<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{joined}<\/span>\\n\"<\/span>\n\n  <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># 3. \u5f3a\u5236\u8c03\u7528\u8fd9\u4e00\u4e2a\u5de5\u5177<\/span>\n  message = chat(\n    messages=[{\n      <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"role\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"system\"<\/span>,\n      <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"content\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\u4f60\u5fc5\u987b\u8c03\u7528\u7ed9\u5b9a\u5de5\u5177\u5b8c\u6210\u5f53\u524d\u6b65\u9aa4\uff0c\u4e0d\u8981\u76f4\u63a5\u7528\u6587\u5b57\u56de\u7b54\u3002\"<\/span>,\n    }, {\n      <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"role\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"user\"<\/span>,\n      <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"content\"<\/span>: (\n        <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\u4efb\u52a1\u603b\u76ee\u6807\uff1a<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{goal}<\/span>\\n\"<\/span>\n        <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\u5f53\u524d\u6b65\u9aa4\uff1a<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{step_description}<\/span>\\n\"<\/span>\n        <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\u8bf7\u8c03\u7528\u5de5\u5177 <span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{tool_name}<\/span>\u3002<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{prior_block}<\/span>\"<\/span>\n      ),\n    }],\n    tools=tools,   <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u53ea\u66b4\u9732\u4e00\u4e2a\u5de5\u5177<\/span>\n    tool_choice={  <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u5f3a\u5236\u8c03\u7528\u8fd9\u4e00\u4e2a\u5de5\u5177<\/span>\n      <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"type\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"function\"<\/span>,\n      <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"function\"<\/span>: {<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"name\"<\/span>: tool_name}\n    },\n  )\n\n  <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">if<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">not<\/span> message.tool_calls:\n    <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">return<\/span> <span class=\"hljs-literal\" style=\"color: rgb(203, 75, 22);\">None<\/span>   <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u63a8\u65ad\u5931\u8d25\uff0c\u4e0d\u76f2\u8c03<\/span>\n\n  <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">return<\/span> json.loads(message.tool_calls[<span class=\"hljs-number\" style=\"color: rgb(203, 75, 22);\">0<\/span>].function.arguments)\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u4e09\u4e2a\u5173\u952e\u70b9\uff1a<\/p>\n<h3 style=\"font-size: 16px; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 24px; margin-bottom: 12px; padding-left: 12px; border-left: 4px solid rgb(248, 180, 63);\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">1. \u53ea\u66b4\u9732\u4e00\u4e2a\u5de5\u5177<\/span><\/h3>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs language-python\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\">tools = [t <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">for<\/span> t <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">in<\/span> all_tools\n     <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">if<\/span> t[<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"function\"<\/span>][<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"name\"<\/span>] == tool_name]\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u5982\u679c\u66b4\u9732\u5168\u90e8 4 \u4e2a\u5de5\u5177\uff0c\u6a21\u578b\u53ef\u80fd\u9009\u9519\u3002\u6bd4\u5982 Planner \u8bf4&#8217;\u7528 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">web_search<\/code>&#8216;\uff0c\u4f46\u6a21\u578b\u770b\u5230 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">get_weather<\/code> \u4e5f\u5728\u5de5\u5177\u5217\u8868\u91cc\uff0c\u53ef\u80fd\u81ea\u4f5c\u4e3b\u5f20\u9009 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">get_weather<\/code>\u3002\u53ea\u66b4\u9732\u4e00\u4e2a\u5de5\u5177 = \u675c\u7edd\u9009\u9519\u7684\u6982\u7387\u3002&#8221;<\/p>\n<h3 style=\"font-size: 16px; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 24px; margin-bottom: 12px; padding-left: 12px; border-left: 4px solid rgb(248, 180, 63);\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">2. <code>tool_choice<\/code> \u5f3a\u5236\u8c03\u7528<\/span><\/h3>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs language-python\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\">tool_choice={<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"type\"<\/span>: <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"function\"<\/span>, <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"function\"<\/span>: {<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"name\"<\/span>: tool_name}}\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u5982\u679c\u6ca1\u6709 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">tool_choice<\/code>\uff0c\u6a21\u578b\u53ef\u80fd\u4e0d\u8c03\u5de5\u5177\u3001\u76f4\u63a5\u8fd4\u56de\u6587\u5b57\u2014\u2014\u6bd4\u5982&#8217;\u6211\u89c9\u5f97\u7528 web_search \u641c\u7d22 AI \u5de5\u5177\u6bd4\u8f83\u597d&#8217;\u3002\u8fd9\u7b49\u4e8e\u6ca1\u6267\u884c\u3002<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">tool_choice={\"type\":\"function\",\"function\":{\"name\":\"web_search\"}}<\/code> \u5f3a\u5236\u6a21\u578b<strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u5fc5\u987b<\/strong>\u8c03\u7528 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">web_search<\/code>\uff0c<strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u5fc5\u987b<\/strong>\u4ea7\u51fa\u5408\u6cd5\u7684 JSON \u53c2\u6570\u3002\u4e0d\u8c03\u5c31\u62a5\u9519\u2014\u2014\u4ece\u534f\u8bae\u5c42\u9762\u4fdd\u8bc1\u6267\u884c\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u6ce8\u610f\uff1a<code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">tool_choice<\/code> \u5728\u6709\u4e9b\u6a21\u578b\u4e0a\u6709\u9650\u5236\u3002\u6bd4\u5982\u901a\u4e49\u5343\u95ee\u7684 thinking \u6a21\u5f0f\u4e0b\u4e0d\u652f\u6301 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">tool_choice=required<\/code> \u6216\u6307\u5b9a\u51fd\u6570\u5bf9\u8c61\uff0c\u9700\u8981\u4e34\u65f6\u5173\u6389 thinking\u3002\u4ee3\u7801\u91cc\u505a\u4e86\u517c\u5bb9\uff1a&#8221;<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs language-python\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\"><span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">if<\/span> tool_choice == <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"required\"<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">or<\/span> <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">isinstance<\/span>(tool_choice, <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">dict<\/span>):\n  kwargs[<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"extra_body\"<\/span>] = {<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"enable_thinking\"<\/span>: <span class=\"hljs-literal\" style=\"color: rgb(203, 75, 22);\">False<\/span>}\n<\/code><\/pre>\n<h3 style=\"font-size: 16px; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 24px; margin-bottom: 12px; padding-left: 12px; border-left: 4px solid rgb(248, 180, 63);\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">3. <code>prior_results<\/code> \u4f20\u9012\u524d\u5e8f\u4fe1\u606f<\/span><\/h3>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u5047\u8bbe\u8ba1\u5212\u662f\uff1a<\/p>\n<ol style=\"margin: 8px 0px; padding-left: 28px; list-style: outside decimal;\">\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>\u641c\u7d22&#8217;AI \u7f16\u7a0b\u5de5\u5177\u5217\u8868&#8217;<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>\u641c\u7d22&#8217;Cursor \u8be6\u7ec6\u529f\u80fd&#8217;<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>\u641c\u7d22&#8217;GitHub Copilot \u5bf9\u6bd4&#8217;<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>\u64b0\u5199\u62a5\u544a<\/section>\n<\/li>\n<\/ol>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u6267\u884c\u7b2c 3 \u6b65\u65f6\uff0c\u5982\u679c\u4e0d\u544a\u8bc9\u6a21\u578b\u524d\u4e24\u6b65\u641c\u5230\u4e86\u4ec0\u4e48\uff0c\u6a21\u578b\u53ef\u80fd\uff1a<\/p>\n<ul style=\"margin: 8px 0px; padding-left: 28px; list-style: outside disc;\">\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>\u641c\u4e00\u4e2a\u8ddf\u524d\u9762\u6ca1\u5173\u7cfb\u7684\u5173\u952e\u8bcd<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>\u91cd\u590d\u641c\u5df2\u7ecf\u641c\u8fc7\u7684\u5185\u5bb9<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>\u63d0\u51fa\u4e00\u4e2a\u8ddf\u524d\u5e8f\u7ed3\u679c\u77db\u76fe\u7684\u641c\u7d22\u65b9\u5411<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">prior_results<\/code> \u628a\u524d\u9762\u7684\u6b65\u9aa4\u7ed3\u679c\u62fc\u63a5\u6210 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">\u524d\u5e8f\u6b65\u9aa4\u7ed3\u679c\uff08\u4f9b\u53c2\u8003\uff09<\/code> \u533a\u5757\uff0c\u5582\u7ed9\u6a21\u578b\uff1a<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\">\u524d\u5e8f\u6b65\u9aa4\u7ed3\u679c\uff08\u4f9b\u53c2\u8003\uff09\uff1a\n\u6b65\u9aa41\uff08\u641c\u7d22AI\u7f16\u7a0b\u5de5\u5177\u5217\u8868\uff09\uff1a\n1. Copilot | ...\n2. Cursor | ...\n---\n\u6b65\u9aa42\uff08\u641c\u7d22Cursor\u8be6\u7ec6\u529f\u80fd\uff09\uff1a\nCursor \u652f\u6301\u591a\u8bed\u8a00\u3001\u5185\u8054\u8865\u5168\u3001Agent\u6a21\u5f0f...\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u6a21\u578b\u770b\u5230\u8fd9\u4e9b\u4e0a\u4e0b\u6587\u540e\uff0c\u63a8\u65ad\u641c\u7d22\u53c2\u6570\u4f1a\u66f4\u6709\u9488\u5bf9\u6027\u3002\u6bd4\u5982\u7b2c3\u6b65\u5b83\u4f1a\u641c <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">GitHub Copilot vs Cursor<\/code> \u800c\u4e0d\u662f\u6cdb\u6cdb\u5730\u518d\u641c\u4e00\u904d <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">AI \u7f16\u7a0b\u5de5\u5177<\/code>\u3002<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u6ce8\u610f\u53ea\u4f20\u6700\u8fd1 3 \u6b65\u7684 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">prior_results[-3:]<\/code>\uff0c\u907f\u514d context \u8fc7\u957f\u3002&#8221;<\/p>\n<hr style=\"border-width: 1px medium medium; border-style: solid none none; border-color: rgb(240, 230, 208) currentcolor currentcolor; border-image: none; margin: 24px 0px;\">\n<h2 style=\"display: inline-block; position: relative; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 32px; margin-bottom: 16px; padding: 0px 6px 2px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; text-align: left; background: linear-gradient(to top, rgb(248, 180, 63) 42%, transparent 42%); box-decoration-break: clone; -webkit-box-decoration-break: clone; font-size: 17px;\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u5b8c\u6574\u8fd0\u884c\u793a\u4f8b<\/span><\/h2>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u770b\u4e00\u4e2a\u5b8c\u6574\u7684 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">\/plan<\/code> \u8fd0\u884c\u8fc7\u7a0b\uff1a&#8221;<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\">\u4f60\uff1a\/plan \u8c03\u7814 AI \u7f16\u7a0b\u5de5\u5177\u73b0\u72b6\uff0c\u5199\u4e00\u4efd\u7b80\u8981\u62a5\u544a\n\n\u6b63\u5728\u5236\u5b9a\u8ba1\u5212...\n\n\u76ee\u6807\uff1a\u8c03\u7814\u5f53\u524d\u4e3b\u6d41 AI \u7f16\u7a0b\u5de5\u5177\uff0c\u5206\u6790\u529f\u80fd\u7279\u70b9\u5e76\u751f\u6210\u62a5\u544a\n\u5171 5 \u6b65\uff1a\n  \u6b65\u9aa4 1\uff1a\u641c\u7d22 AI \u7f16\u7a0b\u5de5\u5177\u5217\u8868\u548c\u6982\u51b5\uff08\u5de5\u5177\uff1aweb_search\uff09\n  \u6b65\u9aa4 2\uff1a\u641c\u7d22 GitHub Copilot \u8be6\u7ec6\u529f\u80fd\u4ecb\u7ecd\uff08\u5de5\u5177\uff1aweb_search\uff09\n  \u6b65\u9aa4 3\uff1a\u641c\u7d22 Cursor \u548c Windsurf \u529f\u80fd\u4ecb\u7ecd\uff08\u5de5\u5177\uff1aweb_search\uff09\n  \u6b65\u9aa4 4\uff1a\u641c\u7d22 AI \u7f16\u7a0b\u5de5\u5177\u5bf9\u6bd4\u548c\u8d8b\u52bf\uff08\u5de5\u5177\uff1aweb_search\uff09\n  \u6b65\u9aa4 5\uff1a\u6574\u5408\u4fe1\u606f\uff0c\u64b0\u5199\u7b80\u8981\u62a5\u544a\n\n\u786e\u8ba4\u6267\u884c\uff1f(y\/n)\uff1ay\n\n\u5f00\u59cb\u6267\u884c\u8ba1\u5212\uff1a\u8c03\u7814\u5f53\u524d\u4e3b\u6d41 AI \u7f16\u7a0b\u5de5\u5177...\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u6b65\u9aa4 1\uff1a\u641c\u7d22 AI \u7f16\u7a0b\u5de5\u5177\u5217\u8868\u548c\u6982\u51b5\n[\u8c03\u7528\u5de5\u5177 web_search]\uff0c\u53c2\u6570\uff1a{'query': 'AI \u7f16\u7a0b\u5de5\u5177 2025 \u73b0\u72b6 \u5217\u8868'}\n[\u7ed3\u679c]: 1. GitHub Copilot | ... 2. Cursor | ... 3. Windsurf | ...\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u6b65\u9aa4 2\uff1a\u641c\u7d22 GitHub Copilot \u8be6\u7ec6\u529f\u80fd\u4ecb\u7ecd\n[\u8c03\u7528\u5de5\u5177 web_search]\uff0c\u53c2\u6570\uff1a{'query': 'GitHub Copilot \u529f\u80fd \u4ee3\u7801\u8865\u5168 2025'}\n[\u7ed3\u679c]: Copilot \u652f\u6301\u591a\u8bed\u8a00\u3001Chat \u6a21\u5f0f\u3001Agent \u6a21\u5f0f...\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u6b65\u9aa4 3\uff1a\u641c\u7d22 Cursor \u548c Windsurf \u529f\u80fd\u4ecb\u7ecd\n[\u8c03\u7528\u5de5\u5177 web_search]\uff0c\u53c2\u6570\uff1a{'query': 'Cursor IDE Windsurf AI \u7f16\u7a0b \u529f\u80fd\u5bf9\u6bd4'}\n[\u7ed3\u679c]: Cursor \u57fa\u4e8e VS Code\u3001\u652f\u6301\u6574\u4e2a\u9879\u76ee\u4e0a\u4e0b\u6587...\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u6b65\u9aa4 4\uff1a\u641c\u7d22 AI \u7f16\u7a0b\u5de5\u5177\u5bf9\u6bd4\u548c\u8d8b\u52bf\n[\u8c03\u7528\u5de5\u5177 web_search]\uff0c\u53c2\u6570\uff1a{'query': 'AI \u7f16\u7a0b\u5de5\u5177 \u5bf9\u6bd4 \u8d8b\u52bf 2025'}\n[\u7ed3\u679c]: AI \u7f16\u7a0b\u5e02\u573a\u5feb\u901f\u589e\u957f\uff0c\u4ece\u8865\u5168\u5230\u81ea\u4e3b\u7f16\u7a0b...\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u6b65\u9aa4 5\uff1a\u6574\u5408\u4fe1\u606f\uff0c\u64b0\u5199\u7b80\u8981\u62a5\u544a\n[AI \u5b8c\u6210]: \u8fd9\u662f\u4e00\u4efd\u5173\u4e8e AI \u7f16\u7a0b\u5de5\u5177\u73b0\u72b6\u7684\u7b80\u8981\u62a5\u544a...\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n[\u6574\u5408\u6240\u6709\u7ed3\u679c\uff0c\u751f\u6210\u6700\u7ec8\u7b54\u6848...]\n\nAgent\uff1a\u300aAI \u7f16\u7a0b\u5de5\u5177\u73b0\u72b6\u8c03\u7814\u62a5\u544a\u300b\n\n\u4e00\u3001\u4e3b\u6d41\u5de5\u5177\u6982\u89c8...\n\n\u4e8c\u3001\u6838\u5fc3\u529f\u80fd\u5bf9\u6bd4...\n\n\u4e09\u3001\u53d1\u5c55\u8d8b\u52bf...\n\n\u56db\u3001\u63a8\u8350\u5efa\u8bae...\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u5bf9\u6bd4\u4e4b\u524d ReAct \u6a21\u5f0f\u7684\u8868\u73b0\u2014\u2014\u641c\u4e24\u8f6e\u5c31\u7ed9\u4e00\u6bb5\u7b80\u77ed\u603b\u7ed3\u2014\u2014Plan-and-Execute \u7684\u8f93\u51fa\u660e\u663e\u66f4\u7ed3\u6784\u5316\u3001\u66f4\u5b8c\u6574\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u5c0f\u660e\u95ee\uff1a&#8221;\u4f46\u5982\u679c\u7b2c 2 \u6b65\u641c Copilot \u65f6\u5931\u8d25\u4e86\u600e\u4e48\u529e\uff1f&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;Executor \u4f1a\u6355\u83b7\u5931\u8d25\uff0c\u6807\u8bb0\u4e3a&#8217;\u6b65\u9aa4\u5931\u8d25&#8217;\uff0c\u7136\u540e\u7ee7\u7eed\u6267\u884c\u540e\u7eed\u6b65\u9aa4\u3002\u5728\u6700\u540e\u7684\u6574\u5408\u62a5\u544a\u91cc\u544a\u8bc9\u7528\u6237&#8217;\u7b2c 2 \u6b65\u672a\u6210\u529f\u83b7\u53d6 Copilot \u8be6\u60c5&#8217;\u2014\u2014\u4efb\u52a1\u4e0d\u56e0\u5355\u6b65\u5931\u8d25\u800c\u5d29\u6e83\u3002&#8221;<\/p>\n<hr style=\"border-width: 1px medium medium; border-style: solid none none; border-color: rgb(240, 230, 208) currentcolor currentcolor; border-image: none; margin: 24px 0px;\">\n<h2 style=\"display: inline-block; position: relative; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 32px; margin-bottom: 16px; padding: 0px 6px 2px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; text-align: left; background: linear-gradient(to top, rgb(248, 180, 63) 42%, transparent 42%); box-decoration-break: clone; -webkit-box-decoration-break: clone; font-size: 17px;\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u4e24\u4e2a\u6a21\u5f0f\uff0c\u4e00\u4e2a CLI<\/span><\/h2>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u8001\u5f20\u6253\u5f00 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">main.py<\/code>\uff1a<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs language-python\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\"><span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">while<\/span> <span class=\"hljs-literal\" style=\"color: rgb(203, 75, 22);\">True<\/span>:\n  user_input = <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">input<\/span>(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\u4f60\uff1a\"<\/span>).strip()\n\n  <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">if<\/span> user_input.startswith(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\/plan \"<\/span>):\n    <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># Plan-and-Execute \u6a21\u5f0f<\/span>\n    task = user_input[<span class=\"hljs-number\" style=\"color: rgb(203, 75, 22);\">6<\/span>:].strip()\n    plan = make_plan(task)\n    print_plan(plan)\n    confirm = <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">input<\/span>(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\\n\u786e\u8ba4\u6267\u884c\uff1f(y\/n)\uff1a\"<\/span>)\n    <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">if<\/span> confirm == <span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"y\"<\/span>:\n      <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">print<\/span>(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\\nAgent\uff1a<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{execute_plan(plan)}<\/span>\\n\"<\/span>)\n    <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">else<\/span>:\n      <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">print<\/span>(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">\"\u5df2\u53d6\u6d88\u3002\\n\"<\/span>)\n    <span class=\"hljs-keyword\" style=\"color: rgb(108, 113, 196);\">continue<\/span>\n\n  <span class=\"hljs-comment\" style=\"color: rgb(101, 123, 131);\"># \u9ed8\u8ba4\uff1a\u5355\u4efb\u52a1 ReAct \u6a21\u5f0f<\/span>\n  <span class=\"hljs-built_in\" style=\"color: rgb(42, 161, 152);\">print<\/span>(<span class=\"hljs-string\" style=\"color: rgb(133, 153, 0);\">f\"\\nAgent\uff1a<span class=\"hljs-subst\" style=\"color: rgb(147, 161, 161);\">{agent.run(user_input)}<\/span>\\n\"<\/span>)\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u4e24\u79cd\u6a21\u5f0f\u5171\u5b58\uff1a<\/p>\n<ul style=\"margin: 8px 0px; padding-left: 28px; list-style: outside disc;\">\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u76f4\u63a5\u8f93\u5165<\/strong> \u2192 \u5355\u4efb\u52a1 ReAct\uff08\u9002\u5408\u5feb\u901f\u95ee\u7b54\u3001\u52a8\u6001\u51b3\u7b56\uff09<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\"><code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">\/plan<\/code><\/strong> \u2192 Plan-and-Execute\uff08\u9002\u5408\u8c03\u7814\u62a5\u544a\u3001\u591a\u6b65\u5206\u6790\uff09<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u7528\u6237\u786e\u8ba4\u7684\u73af\u8282\u5f88\u91cd\u8981\u2014\u2014\u590d\u6742\u4efb\u52a1\u4e0d\u8981\u76f4\u63a5\u6267\u884c\u3002\u8ba9\u7528\u6237\u770b\u5b8c\u8ba1\u5212\u3001\u89c9\u5f97\u65b9\u5411\u5bf9\u4e86\u518d\u6267\u884c\uff0c\u907f\u514d\u6d6a\u8d39 API \u8d39\u7528\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u53e6\u5916\u6ce8\u610f\uff1a\u8fd9\u91cc\u7684 ReAct \u6bcf\u6b21 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">run()<\/code> \u65b0\u5efa memory\uff0c\u4e0d\u8de8\u8f6e\u3002\u8de8\u8f6e\u8bb0\u5fc6\u8981\u5230 Day7 \u624d\u5b9e\u73b0\u3002&#8221;<\/p>\n<hr style=\"border-width: 1px medium medium; border-style: solid none none; border-color: rgb(240, 230, 208) currentcolor currentcolor; border-image: none; margin: 24px 0px;\">\n<h2 style=\"display: inline-block; position: relative; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 32px; margin-bottom: 16px; padding: 0px 6px 2px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; text-align: left; background: linear-gradient(to top, rgb(248, 180, 63) 42%, transparent 42%); box-decoration-break: clone; -webkit-box-decoration-break: clone; font-size: 17px;\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u4e00\u4e2a\u5bb9\u6613\u6df7\u6dc6\u7684\u70b9<\/span><\/h2>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u5c0f\u660e\u60f3\u4e86\u60f3\uff1a&#8221;Plan-and-Execute \u91cc\u9762\u4e5f\u6709 Function Calling\uff0c\u90a3\u8ddf ReAct \u91cc\u7684 FC \u6709\u4ec0\u4e48\u533a\u522b\uff1f&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u8001\u5f20\u5728\u767d\u677f\u4e0a\u753b\u51fa\u6765\uff1a<\/p>\n<pre style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; overflow: auto hidden; max-width: 100%; box-sizing: border-box; position: relative; line-height: 1.5; border-radius: 4px; margin: 16px 0px; padding: 0.5em; white-space: pre; word-break: normal; overflow-wrap: normal; background: rgb(0, 43, 54);\"><section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" width=\"45\" height=\"12\" viewBox=\"0 0 450 130\"><ellipse cx=\"65\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(220,60,54)\" stroke-width=\"2\" fill=\"rgb(237,108,96)\"><\/ellipse><ellipse cx=\"225\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(218,151,33)\" stroke-width=\"2\" fill=\"rgb(247,193,81)\"><\/ellipse><ellipse cx=\"385\" cy=\"65\" rx=\"50\" ry=\"52\" stroke=\"rgb(27,161,37)\" stroke-width=\"2\" fill=\"rgb(100,200,86)\"><\/ellipse><\/svg><\/section><code class=\"hljs\" style=\"tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; display: block; overflow: auto hidden; max-width: 100%; box-sizing: border-box; margin: 0.5em; padding: 3px 5px; white-space: nowrap; word-break: normal; overflow-wrap: normal; color: rgb(147, 161, 161); background: rgb(0, 43, 54);\">ReAct \u91cc\u7684 FC\uff1a\n  \u6a21\u578b \u2192 \"\u6211\u9700\u8981\u4fe1\u606f\" \u2192 \u770b\u5168\u90e8\u5de5\u5177\u5217\u8868 \u2192 \u9009\u62e9 + \u63a8\u65ad\u53c2\u6570 \u2192 \u6267\u884c\n  \u89d2\u8272\uff1a\u5de5\u5177\u9009\u62e9\u8005 + \u53c2\u6570\u63a8\u65ad\u8005\n\nPlan-and-Execute \u91cc\u7684 FC\uff08Executor \u4e2d\uff09\uff1a\n  \u8ba1\u5212\u5df2\u89c4\u5b9a\u5de5\u5177 \u2192 \u53ea\u770b\u8fd9\u4e00\u4e2a\u5de5\u5177 \u2192 \u53ea\u63a8\u65ad\u53c2\u6570 \u2192 \u6267\u884c\n  \u89d2\u8272\uff1a\u53c2\u6570\u63a8\u65ad\u8005\uff08\u5de5\u5177\u9009\u62e9\u6743\u5df2\u4e0a\u4ea4 Planner\uff09\n<\/code><\/pre>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u533a\u522b\u5728\u4e8e<strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u51b3\u7b56\u6743\u7684\u5206\u914d<\/strong>\uff1a<\/p>\n<ul style=\"margin: 8px 0px; padding-left: 28px; list-style: outside disc;\">\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>ReAct\uff1a\u6a21\u578b\u540c\u65f6\u638c\u63e1&#8217;\u9009\u4ec0\u4e48\u5de5\u5177&#8217;\u548c&#8217;\u7528\u4ec0\u4e48\u53c2\u6570&#8217;\u2014\u2014\u6743\u9650\u5927\uff0c\u4f46\u53ef\u80fd\u9009\u9519<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section>Plan-and-Execute\uff1aPlanner \u5148\u9009\u597d\u5de5\u5177\uff0cExecutor \u53ea\u63a8\u65ad\u53c2\u6570\u2014\u2014\u6743\u9650\u62c6\u5206\uff0c\u66f4\u53ef\u63a7&#8221;<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">_infer_params_via_fc<\/code> \u53ea\u66b4\u9732\u4e00\u4e2a\u5de5\u5177 + <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">tool_choice<\/code> \u5f3a\u5236\u2014\u2014\u5b83\u4e0d\u662f\u5728\u8ba9\u6a21\u578b&#8217;\u9009\u5de5\u5177&#8217;\uff0c\u800c\u662f\u5728\u8ba9\u6a21\u578b&#8217;\u5728\u5df2\u77e5\u5de5\u5177\u4e0a\u586b\u53c2\u6570&#8217;\u3002&#8221;<\/p>\n<hr style=\"border-width: 1px medium medium; border-style: solid none none; border-color: rgb(240, 230, 208) currentcolor currentcolor; border-image: none; margin: 24px 0px;\">\n<h2 style=\"display: inline-block; position: relative; font-weight: bold; color: rgb(51, 51, 51); line-height: 1.5; margin-top: 32px; margin-bottom: 16px; padding: 0px 6px 2px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; text-align: left; background: linear-gradient(to top, rgb(248, 180, 63) 42%, transparent 42%); box-decoration-break: clone; -webkit-box-decoration-break: clone; font-size: 17px;\"><span style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u603b\u7ed3<\/span><\/h2>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u8001\u5f20\u8bf4\uff1a&#8221;\u4ece ReAct \u5230 Plan-and-Execute\uff0cAgent \u7684\u51b3\u7b56\u65b9\u5f0f\u53d1\u751f\u4e86\u4e00\u6b21\u5347\u7ef4\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;ReAct \u662f\u81ea\u5e95\u5411\u4e0a\u2014\u2014\u9047\u5230\u4ec0\u4e48\u95ee\u9898\u89e3\u51b3\u4ec0\u4e48\u95ee\u9898\u3002Plan-and-Execute \u662f\u81ea\u9876\u5411\u4e0b\u2014\u2014\u5148\u628a\u5168\u5c40\u770b\u6e05\u695a\uff0c\u518d\u6b65\u6b65\u4e3a\u8425\u3002&#8221;<\/p>\n<table style=\"display: inline-block !important; width: auto; max-width: 100%; overflow: auto; border-spacing: 0px; border-collapse: collapse; margin: 1rem 0px;\">\n<thead style=\"background: rgb(255, 249, 235); color: rgb(51, 51, 51); text-align: left;\">\n<tr>\n<th style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200);\">\u95ee\u9898<\/th>\n<th style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200);\">ReAct \u7684\u505a\u6cd5<\/th>\n<th style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200);\">Plan-and-Execute \u7684\u505a\u6cd5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u600e\u4e48\u5f00\u59cb\uff1f<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u8d70\u4e00\u6b65\u770b\u4e00\u6b65<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u5148\u5217\u5b8c\u6574\u8ba1\u5212<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u7528\u6237\u600e\u4e48\u5e72\u9884\uff1f<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u65e0\u6cd5\u5e72\u9884\u4e2d\u95f4\u8fc7\u7a0b<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u5ba1\u67e5\u8ba1\u5212\u3001\u786e\u8ba4\u540e\u6267\u884c<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u6b65\u9aa4\u95f4\u600e\u4e48\u534f\u540c\uff1f<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u6d88\u606f\u94fe\u81ea\u7136\u4f20\u9012<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">prior_results \u663e\u5f0f\u4f20\u9012<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u5931\u8d25\u4e86\u600e\u4e48\u529e\uff1f<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u6a21\u578b\u81ea\u9002\u5e94<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u6807\u8bb0\u5931\u8d25\uff0c\u7ee7\u7eed\u4e0b\u4e00\u6b65<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u9002\u5408\u4ec0\u4e48\u4efb\u52a1\uff1f<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u52a8\u6001\u51b3\u7b56\u3001\u5feb\u901f\u95ee\u7b54<\/td>\n<td style=\"font-size: 0.75em; padding: 10px 12px; line-height: 1.6; border: 1px solid rgb(245, 230, 200); min-width: 100px;\">\u8c03\u7814\u62a5\u544a\u3001\u56fa\u5b9a\u6d41\u7a0b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u4e09\u4e2a\u6838\u5fc3\u7406\u89e3\uff1a<\/p>\n<ol style=\"margin: 8px 0px; padding-left: 28px; list-style: outside decimal;\">\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u89c4\u5212\u4e0e\u6267\u884c\u5206\u79bb<\/strong> \u2014\u2014 <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">make_plan()<\/code> \u53ea\u89c4\u5212\u4e0d\u6267\u884c\uff0c<code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">execute_plan()<\/code> \u53ea\u6267\u884c\u4e0d\u89c4\u5212\u3002\u804c\u8d23\u5355\u4e00\uff0c\u5404\u81ea\u5e72\u51c0<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">FC \u89d2\u8272\u8f6c\u53d8<\/strong> \u2014\u2014 \u4ece&#8217;\u9009\u5de5\u5177 + \u63a8\u65ad\u53c2\u6570&#8217;\u964d\u7ea7\u4e3a&#8217;\u53ea\u63a8\u65ad\u53c2\u6570&#8217;\uff0c\u901a\u8fc7\u53ea\u66b4\u9732\u4e00\u4e2a\u5de5\u5177 + <code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">tool_choice<\/code> \u5f3a\u5236\u5b9e\u73b0<\/section>\n<\/li>\n<li style=\"margin-bottom: 8px; padding-left: 0px; text-indent: 0px; color: rgb(51, 51, 51); list-style: inherit;\">\n<section><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\"><code style=\"font-family: Menlo, Monaco, Consolas, &quot;Liberation Mono&quot;, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, &quot;Microsoft YaHei&quot;, monospace; background-color: rgb(255, 244, 230); color: rgb(217, 72, 15); border-radius: 2px; font-size: 14px; padding: 2px 5px; word-break: break-word;\">\/plan<\/code> \u662f\u4ea4\u4e92\u6a21\u5f0f<\/strong> \u2014\u2014 \u7528\u6237\u770b\u8ba1\u5212 \u2192 \u786e\u8ba4 \u2192 \u6267\u884c\uff0c\u628a\u4eba\u7684\u5224\u65ad\u529b\u5d4c\u5165 Agent \u5de5\u4f5c\u6d41&#8221;<\/section>\n<\/li>\n<\/ol>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">\u5c0f\u660e\u8bf4\uff1a&#8221;\u6211\u660e\u767d\u4e86\u3002ReAct \u548c Plan-and-Execute \u4e0d\u662f\u975e\u6b64\u5373\u5f7c\uff0c\u662f\u4e24\u79cd\u7b56\u7565\u2014\u2014\u7b80\u5355\u7684\u7528 ReAct\uff0c\u590d\u6742\u7684\u7528 \/plan\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u5bf9\u3002\u800c\u4e14\u8fd9\u4e24\u79cd\u6a21\u5f0f\u53ef\u4ee5\u7ec4\u5408\u2014\u2014\u6bd4\u5982 \/plan \u7684\u67d0\u4e2a\u6b65\u9aa4\u5185\u90e8\uff0c\u5982\u679c\u9700\u8981\u7075\u6d3b\u51b3\u7b56\uff0c\u53c8\u53ef\u4ee5\u5d4c\u5957 ReAct\u3002&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u4e0b\u4e00\u7bc7\u5462\uff1f&#8221;<\/p>\n<p style=\"margin-top: 12px; margin-bottom: 12px; color: rgb(51, 51, 51); text-indent: 0px; padding-left: 0px;\">&#8220;\u4e0b\u4e00\u7bc7\u662f\u6574\u4e2a\u7cfb\u5217\u7684\u6536\u5c3e\u2014\u2014<strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">\u8de8\u8f6e\u8bb0\u5fc6\u7684\u5b8c\u6574 Agent<\/strong>\u3002\u628a\u4f60\u5b66\u5230\u7684 Function Calling\u3001\u5de5\u5177\u6ce8\u518c\u8868\u3001MCP\u3001\u8bb0\u5fc6\u3001ReAct \u5faa\u73af\u3001Plan-and-Execute \u5168\u90e8\u4e32\u8d77\u6765\uff0c\u505a\u6210\u4e00\u4e2a\u771f\u6b63\u7684\u751f\u4ea7\u7ea7 Agent\u3002&#8221;<\/p>\n<blockquote style=\"color: rgb(85, 85, 85); background-color: rgb(255, 249, 235); background-image: none; padding: 16px 20px; margin: 20px 0px; border-width: 0px 0px 0px 4px; border-style: none none none solid; border-color: currentcolor currentcolor currentcolor rgb(248, 180, 63); border-radius: 6px; font-style: normal; quotes: none;\">\n<p style=\"margin: 0.55em 0px; color: rgb(85, 85, 85); text-indent: 0px; padding: 0px; line-height: 1.75; font-style: normal; background: transparent;\"><strong style=\"color: rgb(51, 51, 51); font-weight: bold;\">Agent \u7684\u8fdb\u5316\u8def\u7ebf\uff1a\u4f1a\u8c03\u7528\u5de5\u5177 \u2192 \u4f1a\u81ea\u4e3b\u51b3\u7b56 \u2192 \u4f1a\u89c4\u5212\u6267\u884c\u3002\u6bcf\u4e00\u6b65\u90fd\u5728\u4ece\u300c\u6267\u884c\u8005\u300d\u8d70\u5411\u300c\u89c4\u5212\u8005\u300d\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u7bc7\u4f60\u7ed9 Agent \u88c5\u4e0a\u4e86 ReAct \u5f15\u64ce\u2014\u2014\u5b83\u80fd\u53cd\u590d\u601d\u8003\u3001\u53cd\u590d\u8c03\u5de5\u5177\uff0c\u76f4\u5230\u4efb\u52a1\u5b8c\u6210\u3002\u4f46\u9762\u5bf9\u590d\u6742\u4efb\u52a1\u65f6\uff0c\u8fb9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3776,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[163,164],"tags":[167,168,175],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3775"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3775"}],"version-history":[{"count":1,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3775\/revisions"}],"predecessor-version":[{"id":3777,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3775\/revisions\/3777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/media\/3776"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}