{"id":751,"date":"2026-07-29T22:34:50","date_gmt":"2026-07-29T14:34:50","guid":{"rendered":"https:\/\/book.yuekegu.com\/index.php\/2026\/07\/29\/%e5%9f%ba%e4%ba%8e%e5%a4%a7%e6%a8%a1%e5%9e%8b%e7%9a%84%e9%ab%98%e4%b8%ad%e6%95%b0%e5%ad%a6%e4%b8%aa%e6%80%a7%e5%8c%96%e5%ad%a6%e4%b9%a0%e6%99%ba%e8%83%bd%e4%bd%93-phase-1-%e5%bc%80%e5%8f%91\/"},"modified":"2026-07-29T22:34:50","modified_gmt":"2026-07-29T14:34:50","slug":"%e5%9f%ba%e4%ba%8e%e5%a4%a7%e6%a8%a1%e5%9e%8b%e7%9a%84%e9%ab%98%e4%b8%ad%e6%95%b0%e5%ad%a6%e4%b8%aa%e6%80%a7%e5%8c%96%e5%ad%a6%e4%b9%a0%e6%99%ba%e8%83%bd%e4%bd%93-phase-1-%e5%bc%80%e5%8f%91","status":"publish","type":"post","link":"https:\/\/book.yuekegu.com\/index.php\/2026\/07\/29\/%e5%9f%ba%e4%ba%8e%e5%a4%a7%e6%a8%a1%e5%9e%8b%e7%9a%84%e9%ab%98%e4%b8%ad%e6%95%b0%e5%ad%a6%e4%b8%aa%e6%80%a7%e5%8c%96%e5%ad%a6%e4%b9%a0%e6%99%ba%e8%83%bd%e4%bd%93-phase-1-%e5%bc%80%e5%8f%91\/","title":{"rendered":"\u57fa\u4e8e\u5927\u6a21\u578b\u7684\u9ad8\u4e2d\u6570\u5b66\u4e2a\u6027\u5316\u5b66\u4e60\u667a\u80fd\u4f53 \u2014 Phase 1 \u5f00\u53d1\u603b\u7ed3"},"content":{"rendered":"<h2>\u76ee\u6807<\/h2>\n<p>\u5c06\u8bba\u6587\u300a\u57fa\u4e8e\u5927\u6a21\u578b\u7684\u9ad8\u4e2d\u6570\u5b66\u4e2a\u6027\u5316\u5b66\u4e60\u667a\u80fd\u4f53\u7cfb\u7edf\u8bbe\u8ba1\u300b\u4ece\u6982\u5ff5\u65b9\u6848\u63a8\u8fdb\u5230\u53ef\u8fd0\u884c\u7684\u4ee3\u7801\u5b9e\u73b0\uff0c\u91c7\u7528\u5206\u9636\u6bb5\u589e\u91cf\u6784\u5efa\u7b56\u7565\u3002<\/p>\n<h2>\u6280\u672f\u6808<\/h2>\n<ul>\n<li>\u540e\u7aef\uff1aPython FastAPI + LangChain + ChromaDB<\/li>\n<li>\u524d\u7aef\uff1aNext.js 14 + Tailwind CSS + KaTeX<\/li>\n<li>\u6a21\u578b\uff1aDeepSeek v4 Flash\uff08API\uff09<\/li>\n<li>\u6570\u636e\u5e93\uff1aMySQL + ChromaDB\uff08\u5411\u91cf\uff09<\/li>\n<\/ul>\n<h2>Phase 1 \u5b8c\u6210\u9879<\/h2>\n<ul>\n<li><strong>\u540e\u7aef API<\/strong> \u2014 POST \/api\/chat \u5bf9\u8bdd\u63a5\u53e3\uff0c\u652f\u6301\u56db\u7ea7\u5f15\u5bfc\u7b56\u7565\uff08Socratic \/ Scaffolding \/ Coaching \/ Direct\uff09<\/li>\n<li><strong>RAG \u77e5\u8bc6\u5e93<\/strong> \u2014 ChromaDB \u5411\u91cf\u68c0\u7d22\uff08\u9ad8\u4e2d\u6570\u5b66\u77e5\u8bc6\u70b9\uff1a\u51fd\u6570\u3001\u5bfc\u6570\u7b49\uff09\uff0c\u5f53\u524d DeepSeek \u4e0d\u652f\u6301 embedding\uff0c\u5df2\u505a\u5f02\u5e38\u964d\u7ea7<\/li>\n<li><strong>\u5bf9\u8bdd\u7ba1\u7406<\/strong> \u2014 \u5185\u5b58\u4f1a\u8bdd\uff0c\u652f\u6301 conversation_id \u7eed\u63a5\u5386\u53f2<\/li>\n<li><strong>\u524d\u7aef\u754c\u9762<\/strong> \u2014 \u5bf9\u8bdd\u6c14\u6ce1\u3001LaTeX \u6570\u5b66\u516c\u5f0f\u6e32\u67d3\u3001\u56db\u7ea7\u5f15\u5bfc\u9009\u62e9\u5668\u3001\u6d41\u5f0f\u52a0\u8f7d\u72b6\u6001<\/li>\n<li><strong>MySQL \u6570\u636e\u5e93<\/strong> \u2014 math_agent \u5e93\u5df2\u521b\u5efa<\/li>\n<\/ul>\n<h2>\u8e29\u5751\u8bb0\u5f55<\/h2>\n<ol>\n<li><strong>API Key \u88ab\u8986\u76d6<\/strong> \u2014 \u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u6709\u8fc7\u671f\u7684 OPENAI_API_KEY\uff0cload_dotenv() \u9ed8\u8ba4\u4e0d\u8986\u76d6\u5df2\u5b58\u5728\u7684\u73af\u5883\u53d8\u91cf\uff0c\u9700\u52a0 override=True<\/li>\n<li><strong>DeepSeek \u4e0d\u652f\u6301 OpenAI Embedding<\/strong> \u2014 RAG \u641c\u7d22\u76f4\u63a5\u62a5 500\uff0c\u52a0 try\/except \u964d\u7ea7\u8fd4\u56de\u7a7a\u7ed3\u679c\uff0c\u540e\u7eed\u9700\u6362\u7528\u672c\u5730 embedding \u6a21\u578b\uff08\u5982 sentence-transformers\uff09<\/li>\n<li><strong>Windows \u7aef\u53e3\u50f5\u5c38<\/strong> \u2014 \u8fdb\u7a0b\u88ab\u6740\u540e\u7aef\u53e3\u4ecd LISTENING\uff0c\u9700 taskkill \/F \/PID pid \/T \u6216\u6362\u7aef\u53e3<\/li>\n<li><strong>npm install \u8d85\u65f6<\/strong> \u2014 \u9ed8\u8ba4 registry \u6781\u6162\uff0c\u6362 https:\/\/registry.npmmirror.com \u89e3\u51b3<\/li>\n<li><strong>Next.js SWC \u4e8c\u8fdb\u5236\u5f02\u5e38<\/strong> \u2014 \u91cd\u65b0\u5b89\u88c5 node_modules \u540e\u6062\u590d<\/li>\n<\/ol>\n<h2>\u8fd0\u884c\u72b6\u6001<\/h2>\n<ul>\n<li>\u540e\u7aef\uff1ahttp:\/\/localhost:8002 \u2705 \/api\/health \u6b63\u5e38\uff0c\/api\/chat \u6b63\u5e38\u5e94\u7b54<\/li>\n<li>\u524d\u7aef\uff1ahttp:\/\/localhost:3000 \u2705 Next.js 14 \u6b63\u5e38\u6e32\u67d3<\/li>\n<\/ul>\n<h2>\u5f85\u529e<\/h2>\n<ul>\n<li>\u6784\u5efa\u77e5\u8bc6\u5e93\u5411\u91cf\u7d22\u5f15\uff08\u9700 embedding \u6a21\u578b\u5c31\u7eea\u540e\uff09<\/li>\n<li>\u8fc1\u79fb\u5230\u672c\u5730 embedding \u6a21\u578b\uff08sentence-transformers\uff09<\/li>\n<li>Phase 2\uff1a\u9519\u9898\u672c Agent + \u77e5\u8bc6\u56fe\u8c31 Agent<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6807 \u5c06\u8bba\u6587\u300a\u57fa\u4e8e\u5927\u6a21\u578b\u7684\u9ad8\u4e2d\u6570\u5b66\u4e2a\u6027\u5316\u5b66\u4e60\u667a\u80fd\u4f53\u7cfb\u7edf\u8bbe\u8ba1\u300b\u4ece\u6982\u5ff5\u65b9\u6848\u63a8\u8fdb\u5230\u53ef\u8fd0\u884c\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-751","post","type-post","status-publish","format-standard","hentry","category-43"],"_links":{"self":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/comments?post=751"}],"version-history":[{"count":0,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/751\/revisions"}],"wp:attachment":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/media?parent=751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/categories?post=751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/tags?post=751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}