{"id":64712,"date":"2026-01-23T23:40:38","date_gmt":"2026-01-23T15:40:38","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/64712.html"},"modified":"2026-01-23T23:40:38","modified_gmt":"2026-01-23T15:40:38","slug":"%e9%9b%b6%e5%9f%ba%e7%a1%80%e5%ad%a6ai%e5%a4%a7%e6%a8%a1%e5%9e%8b%e4%b9%8bllm%e5%ad%98%e5%82%a8%e4%bc%98%e5%8c%96%ef%bc%9a%e5%a4%a7%e9%87%8fqa%e4%b8%8e%e9%95%bf%e5%af%b9%e8%af%9d%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/64712.html","title":{"rendered":"\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316\uff1a\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218"},"content":{"rendered":"<table>\n<tr>\u5927\u5bb6\u597d&#xff0c;\u6211\u662f\u5de5\u85e4\u5b66\u7f16\u7a0b &#x1f989;\u4e00\u4e2a\u6b63\u5728\u52aa\u529b\u5b66\u4e60\u7684\u5c0f\u535a\u4e3b&#xff0c;\u671f\u5f85\u4f60\u7684\u5173\u6ce8<\/tr>\n<tbody>\n<tr>\n<td>\u5b9e\u6218\u4ee3\u7801\u7cfb\u5217\u6700\u65b0\u6587\u7ae0&#x1f609;<\/td>\n<td>C&#043;&#043;\u5b9e\u73b0\u56fe\u4e66\u7ba1\u7406\u7cfb\u7edf&#xff08;Qt C&#043;&#043; GUI\u754c\u9762\u7248&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>SpringBoot\u5b9e\u6218\u7cfb\u5217&#x1f437;<\/td>\n<td>\u3010SpringBoot\u5b9e\u6218\u7cfb\u5217\u3011SpringBoot3.X \u6574\u5408 MinIO \u5b58\u50a8\u539f\u751f\u65b9\u6848<\/td>\n<\/tr>\n<tr>\n<td>\u5206\u5e93\u5206\u8868<\/td>\n<td>\u5206\u5e93\u5206\u8868\u4e4b\u5b9e\u6218-sharding-JDBC\u5206\u5e93\u5206\u8868\u6267\u884c\u6d41\u7a0b\u539f\u7406\u5256\u6790<\/td>\n<\/tr>\n<tr>\n<td>\u6d88\u606f\u961f\u5217<\/td>\n<td>\u6df1\u5165\u6d45\u51fa RabbitMQ-RabbitMQ\u6d88\u606f\u786e\u8ba4\u673a\u5236&#xff08;ACK&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>AI\u5927\u6a21\u578b<\/td>\n<td>\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u8bb0\u5fc6\u529f\u80fd\u4e4bBaseChatMemory\u5b9e\u6218<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u524d\u60c5\u6458\u8981<\/h3>\n<p>1\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u8bfb\u61c2AI\u5927\u6a21\u578b 2\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u4ece0\u52301\u8c03\u7528\u5927\u6a21\u578bAPI 3\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bSpringAI 4\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bAI\u5927\u6a21\u578b\u5e38\u89c1\u6982\u5ff5 5\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u5927\u6a21\u578b\u79c1\u6709\u5316\u90e8\u7f72\u5168\u6307\u5357 6\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bAI\u5927\u6a21\u578b\u53ef\u89c6\u5316\u754c\u9762 7\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain 8\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain\u516d\u5927\u6838\u5fc3\u6a21\u5757\u4e0e\u5927\u6a21\u578bIO\u4ea4\u4e92\u94fe\u8def 9\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bPrompt\u63d0\u793a\u8bcd\u5de5\u7a0b 10\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain-PromptTemplate 11\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bChatModel\u804a\u5929\u6a21\u578b\u4e0eChatPromptTemplate\u5b9e\u6218 12\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain\u94fe 13\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bStream\u6d41\u5f0f\u8f93\u51fa\u5b9e\u6218 14\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain Output Parser 15\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u89e3\u6790\u5668PydanticOutputParser 16\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u5927\u6a21\u578b\u7684\u201c\u5e7b\u89c9\u201d 17\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bRAG\u6280\u672f 18\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bRAG\u7cfb\u7edf\u94fe\u8def\u89e3\u6790\u4e0eDocument Loaders\u591a\u6848\u4f8b\u5b9e\u6218 19\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain PyPDFLoader\u5b9e\u6218\u4e0ePDF\u56fe\u7247\u63d0\u53d6\u5168\u89e3\u6790 20\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain WebBaseLoader\u4e0eDocx2txtLoader\u5b9e\u6218 21\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bRAG\u7cfb\u7edf\u94fe\u8def\u6784\u5efa&#xff1a;\u6587\u6863\u5207\u5272\u8f6c\u6362\u5168\u89e3\u6790 22\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain \u6587\u672c\u5206\u5272\u5668\u5b9e\u6218&#xff1a;CharacterTextSplitter \u4e0e RecursiveCharacterTextSplitter \u5168\u89e3\u6790 23\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bEmbedding\u4e0eLLM\u5927\u6a21\u578b\u5bf9\u6bd4\u5168\u89e3\u6790 24\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain Embedding\u6846\u67b6\u5168\u89e3\u6790 25\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u5d4c\u5165\u6a21\u578b\u6027\u80fd\u4f18\u5316 26\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u5411\u91cf\u6570\u636e\u5e93\u4ecb\u7ecd\u4e0e\u6280\u672f\u9009\u578b\u601d\u8003 27\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bMilvus\u5411\u91cf\u6570\u636e\u5e93\u5168\u89e3\u6790 28\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bMilvus\u6838\u5fc3&#xff1a;\u5206\u533a-\u5206\u7247-\u6bb5\u7ed3\u6784\u5168\u89e3&#043;\u6700\u4f73\u5b9e\u8df5 29\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bMilvus\u90e8\u7f72\u67b6\u6784\u9009\u578b&#043;Linux\u5b9e\u6218&#xff1a;Docker\u4e00\u952e\u90e8\u7f72&#043;WebUI\u4f7f\u7528 30\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bMilvus\u5b9e\u6218&#xff1a;Attu\u53ef\u89c6\u5316\u5b89\u88c5&#043;Python\u6574\u5408\u5168\u6848\u4f8b 31\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bMilvus\u7d22\u5f15\u5b9e\u6218 32\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bMilvus DML\u5b9e\u6218 33\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bMilvus\u5411\u91cfSearch\u67e5\u8be2\u7efc\u5408\u6848\u4f8b\u5b9e\u6218 33\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u65b0\u7248LangChain\u5411\u91cf\u6570\u636e\u5e93VectorStore\u8bbe\u8ba1\u5168\u89e3\u6790 34\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u76f8\u4f3c\u5ea6Search\u4e0eMMR\u6700\u5927\u8fb9\u754c\u76f8\u5173\u641c\u7d22\u5b9e\u6218 35\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain\u6574\u5408Milvus&#xff1a;\u65b0\u589e\u4e0e\u5220\u9664\u6570\u636e\u5b9e\u6218 36\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain&#043;Milvus\u5b9e\u6218&#xff1a;\u76f8\u4f3c\u6027\u641c\u7d22\u4e0eMMR\u591a\u6837\u5316\u68c0\u7d22\u5168\u89e3\u6790 37\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain Retriever 38\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bMultiQueryRetriever\u591a\u67e5\u8be2\u68c0\u7d22\u5168\u89e3\u6790 39\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain\u6838\u5fc3&#xff1a;Runnable\u63a5\u53e3\u5e95\u5c42\u5b9e\u73b0 40\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bRunnablePassthrough 41\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bRunnableParallel 42\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bRunnableLambda 43\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bRunnableBranch 44\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bAgent\u667a\u80fd\u4f53 45\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain Tool\u5de5\u5177 46\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u7ed1\u5b9aTool\u5de5\u5177\u5b9e\u6218 47\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain Tool\u5f02\u5e38\u5904\u7406 48\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bCoT\u601d\u7ef4\u94fe\u548cReAct\u63a8\u7406\u884c\u52a8 49\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bZero-Shot\u548cFew-Shot 50\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLangChain\u667a\u80fd\u4f53\u6267\u884c\u5f15\u64ceAgentExecutor 51\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u4e2a\u4eba\u52a9\u7406\u667a\u80fd\u4f53\u4e4btool_calling_agent\u5b9e\u6218 52\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4b\u65c5\u6e38\u89c4\u5212\u667a\u80fd\u4f53\u4e4breact_agent\u5b9e\u6218 53\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5927\u6a21\u578b\u5b58\u50a8\u8bb0\u5fc6\u529f\u80fd 54\u3001\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5927\u6a21\u578b\u5b58\u50a8\u8bb0\u5fc6\u529f\u80fd<\/p>\n<hr \/>\n<h4>\u672c\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>\u524d\u60c5\u6458\u8981<\/li>\n<\/ul>\n<\/li>\n<li>\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316&#xff1a;\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218<\/li>\n<li>\n<ul>\n<li>\u4e00\u3001\u5148\u641e\u61c2\u9762\u8bd5\u5e38\u95ee&#xff1a;\u4e3a\u4ec0\u4e48\u4f1a\u6709\u201c\u5b58\u50a8\u4f18\u5316\u201d\u9700\u6c42&#xff1f;<\/li>\n<li>\n<ul>\n<li>\u9762\u8bd5\u98981&#xff1a;\u4f20\u7edf\u5bf9\u8bdd\u7cfb\u7edf\u6bcf\u6b21\u4ea4\u4e92\u72ec\u7acb&#xff0c;\u6a21\u578b\u65e0\u6cd5\u611f\u77e5\u5386\u53f2&#xff0c;\u600e\u4e48\u89e3&#xff1f;<\/li>\n<li>\u9762\u8bd5\u98982&#xff1a;\u957f\u5bf9\u8bdd\u8d85\u51fa\u6a21\u578bToken\u80fd\u529b&#xff0c;\u4fe1\u606f\u622a\u65ad\u3001\u6027\u80fd\u4e0b\u964d&#xff0c;\u600e\u4e48\u89e3&#xff1f;<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8c\u3001\u5927\u6a21\u578b\u5b58\u50a8\u76843\u5927\u6838\u5fc3\u75db\u70b9<\/li>\n<li>\u4e09\u3001\u6838\u5fc3\u89e3\u51b3\u65b9\u6848&#xff1a;\u6458\u8981\u5b58\u50a8&#043;LangChain\u5b9e\u6218<\/li>\n<li>\n<ul>\n<li>\u6838\u5fc3\u76ee\u6807<\/li>\n<li>\u6280\u672f\u539f\u7406<\/li>\n<li>\u4f18\u52bf<\/li>\n<\/ul>\n<\/li>\n<li>\u56db\u3001\u5e26\u6458\u8981\u5b58\u50a8\u7684\u5bf9\u8bdd\u7cfb\u7edf<\/li>\n<li>\n<ul>\n<li>\u5b9e\u6218\u51c6\u5907<\/li>\n<li>\u5b9e\u62181&#xff1a;\u57fa\u7840\u7248\u2014\u2014\u751f\u6210\u5bf9\u8bdd\u6458\u8981<\/li>\n<li>\u5b9e\u62182&#xff1a;\u8fdb\u9636\u7248\u2014\u2014\u5e26\u6458\u8981\u5b58\u50a8\u7684\u5bf9\u8bdd\u94fe<\/li>\n<li>\u5de5\u85e4\u5b9e\u6218\u8f93\u51fa\u6548\u679c&#xff08;\u771f\u5b9e\u8fd0\u884c\u7ed3\u679c&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u56db\u3001\u5173\u952e\u77e5\u8bc6\u70b9&#xff1a;LCEL\u548cLLMChain\u600e\u4e48\u9009&#xff1f;<\/li>\n<li>\u4e94\u3001\u907f\u5751\u6307\u5357<\/li>\n<li>\u603b\u7ed3<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316&#xff1a;\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218<\/h2>\n<p>\u54c8\u55bd&#xff0c;\u5404\u4f4d\u5c0f\u4f19\u4f34&#xff01;\u6211\u662f\u5de5\u85e4\u5b66\u7f16\u7a0b&#x1f989; \u6700\u8fd1\u6709\u4e0d\u5c11\u7c89\u4e1d\u95ee\u6211&#xff1a;\u201c\u5de5\u85e4&#xff0c;\u505a\u667a\u80fd\u52a9\u624b\u65f6&#xff0c;\u7528\u6237\u804a\u5f97\u4e45\u4e86\u6a21\u578b\u5c31\u2018\u5931\u5fc6\u2019&#xff0c;\u5927\u91cfQA\u4fe1\u606f\u5b58\u4e0d\u4e0b\u600e\u4e48\u529e&#xff1f;\u201d \u5176\u5b9e\u8fd9\u4e5f\u662f\u6211\u521a\u5f00\u59cb\u505aAI\u5927\u6a21\u578b\u9879\u76ee\u65f6\u8e29\u8fc7\u7684\u5751\u2014\u2014\u6a21\u578b\u6709Token\u9650\u5236&#xff0c;\u957f\u5bf9\u8bdd\u4f1a\u622a\u65ad&#xff0c;\u5168\u5b58\u5386\u53f2\u53c8\u8017\u8d44\u6e90\u3002\u4eca\u5929\u5c31\u7ed3\u5408\u6211\u7684\u5b9e\u6218\u7ecf\u9a8c&#xff0c;\u804a\u804a\u600e\u4e48\u7528LangChain\u7684\u6458\u8981\u5b58\u50a8\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898&#xff0c;\u4ece\u9762\u8bd5\u8003\u70b9\u5230\u4ee3\u7801\u5b9e\u6218&#xff0c;\u4e00\u6b65\u6b65\u8bb2\u660e\u767d&#xff01;<\/p>\n<h3>\u4e00\u3001\u5148\u641e\u61c2\u9762\u8bd5\u5e38\u95ee&#xff1a;\u4e3a\u4ec0\u4e48\u4f1a\u6709\u201c\u5b58\u50a8\u4f18\u5316\u201d\u9700\u6c42&#xff1f;<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123154035-69739673e9c5a.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6211\u4e4b\u524d\u9762\u8bd5\u65f6&#xff0c;\u9762\u8bd5\u5b98\u5c31\u95ee\u8fc7\u4e24\u4e2a\u7075\u9b42\u95ee\u9898&#xff0c;\u6b63\u597d\u6233\u4e2d\u6838\u5fc3\u75db\u70b9&#xff0c;\u54b1\u4eec\u5148\u5403\u900f\u8fd9\u4e24\u4e2a\u95ee\u9898&#xff0c;\u540e\u9762\u5b9e\u6218\u5c31\u597d\u7406\u89e3\u4e86&#xff1a;<\/p>\n<h4>\u9762\u8bd5\u98981&#xff1a;\u4f20\u7edf\u5bf9\u8bdd\u7cfb\u7edf\u6bcf\u6b21\u4ea4\u4e92\u72ec\u7acb&#xff0c;\u6a21\u578b\u65e0\u6cd5\u611f\u77e5\u5386\u53f2&#xff0c;\u600e\u4e48\u89e3&#xff1f;<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123154036-697396745d15f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7b54&#xff1a;\u7528\u8bb0\u5fc6\u6a21\u5757&#xff08;\u5982LangChain\u7684Memory&#xff09;\u8bb0\u5f55\u5386\u53f2&#xff0c;\u4f46\u957f\u5bf9\u8bdd\u4f1a\u8d85Token&#xff0c;\u6240\u4ee5\u9700\u8981\u6458\u8981\u5b58\u50a8\u2014\u2014\u4e0d\u5b58\u5b8c\u6574\u5bf9\u8bdd&#xff0c;\u53ea\u5b58\u5173\u952e\u4fe1\u606f\u6458\u8981&#xff0c;\u65e2\u4fdd\u8fde\u8d2f\u6027\u53c8\u7701Token\u3002<\/p>\n<h4>\u9762\u8bd5\u98982&#xff1a;\u957f\u5bf9\u8bdd\u8d85\u51fa\u6a21\u578bToken\u80fd\u529b&#xff0c;\u4fe1\u606f\u622a\u65ad\u3001\u6027\u80fd\u4e0b\u964d&#xff0c;\u600e\u4e48\u89e3&#xff1f;<\/h4>\n<p>\u7b54&#xff1a;\u6838\u5fc3\u662f\u201c\u538b\u7f29\u5386\u53f2\u201d\u2014\u2014\u7528\u5927\u6a21\u578b\u751f\u6210\u5bf9\u8bdd\u6458\u8981&#xff0c;\u540e\u7eed\u4ea4\u4e92\u53ea\u4f20\u6458\u8981\u800c\u975e\u5168\u91cf\u5386\u53f2&#xff0c;\u642d\u914d\u5206\u5e03\u5f0f\u5b58\u50a8&#xff08;\u5982MongoDB\u3001Milvus&#xff09;&#xff0c;\u5e73\u8861\u8fde\u8d2f\u6027\u3001\u6027\u80fd\u548c\u8d44\u6e90\u6d88\u8017\u3002<\/p>\n<h3>\u4e8c\u3001\u5927\u6a21\u578b\u5b58\u50a8\u76843\u5927\u6838\u5fc3\u75db\u70b9<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123154036-69739674b20ee.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8fd9\u4e9b\u75db\u70b9\u771f\u7684\u5f88\u5f71\u54cd\u7528\u6237\u4f53\u9a8c&#xff0c;\u54b1\u4eec\u5bf9\u53f7\u5165\u5ea7&#xff1a;<\/p>\n<table>\n<tr>\u75db\u70b9\u7c7b\u578b\u5177\u4f53\u8868\u73b0\u540e\u679c<\/tr>\n<tbody>\n<tr>\n<td>\u6280\u672f\u9650\u5236<\/td>\n<td>\u7528\u6237\u804a10\u8f6e\u5c31\u8d854k Token\u9650\u5236<\/td>\n<td>\u65e9\u671fQA\u4fe1\u606f\u4e22\u5931&#xff0c;\u56de\u7b54\u9a74\u5507\u4e0d\u5bf9\u9a6c\u5634<\/td>\n<\/tr>\n<tr>\n<td>\u6548\u7387\u74f6\u9888<\/td>\n<td>\u5168\u91cf\u5b58\u5386\u53f2&#xff0c;\u68c0\u7d22\u4e00\u6b21\u8981600ms&#043;<\/td>\n<td>\u56de\u590d\u6162&#xff0c;\u7528\u6237\u5410\u69fd\u201c\u53cd\u5e94\u8fdf\u949d\u201d<\/td>\n<\/tr>\n<tr>\n<td>\u4e1a\u52a1&amp;\u5408\u89c4\u98ce\u9669<\/td>\n<td>\u5b58\u7528\u6237\u624b\u673a\u53f7\u3001\u9700\u6c42\u7b49\u654f\u611f\u4fe1\u606f\u539f\u6587<\/td>\n<td>\u6709\u6570\u636e\u6cc4\u9732\u98ce\u9669&#xff0c;\u8d28\u68c0\u6eaf\u6e90\u96be<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e09\u3001\u6838\u5fc3\u89e3\u51b3\u65b9\u6848&#xff1a;\u6458\u8981\u5b58\u50a8&#043;LangChain\u5b9e\u6218<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123154036-69739674ee1da.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u89e3\u51b3\u601d\u8def\u5f88\u7b80\u5355&#xff1a;\u7528ConversationSummaryMemory\u751f\u6210\u5bf9\u8bdd\u6458\u8981&#xff0c;\u53ea\u5b58\u6458\u8981\u4e0d\u5b58\u5168\u91cf\u5386\u53f2\u3002\u4f18\u52bf\u7279\u522b\u660e\u663e&#xff1a;<\/p>\n<h4>\u6838\u5fc3\u76ee\u6807<\/h4>\n<p>\u901a\u8fc7\u6458\u8981\u5b58\u50a8\u7ef4\u62a4\u957f\u671f\u4e0a\u4e0b\u6587&#xff0c;\u89e3\u51b3\u201cToken\u4e0d\u591f\u7528\u3001\u8d44\u6e90\u6d88\u8017\u5927\u3001\u8fde\u8d2f\u6027\u5dee\u201d\u4e09\u5927\u95ee\u9898\u3002<\/p>\n<h4>\u6280\u672f\u539f\u7406<\/h4>\n<p>\u5c31\u50cf\u6211\u8bb0\u7b14\u8bb0\u2014\u2014\u4e0d\u6284\u8001\u5e08\u6bcf\u53e5\u8bdd&#xff0c;\u53ea\u8bb0\u91cd\u70b9\u3002\u6a21\u578b\u4e5f\u4e00\u6837&#xff1a;\u7528\u5927\u6a21\u578b&#xff08;\u5982\u901a\u4e49\u5343\u95ee&#xff09;\u628a\u5bf9\u8bdd\u751f\u6210\u6458\u8981&#xff0c;\u540e\u7eed\u4ea4\u4e92\u53ea\u4f20\u6458\u8981&#xff0c;\u76f8\u5f53\u4e8e\u201c\u5e26\u7740\u7b14\u8bb0\u804a\u5929\u201d&#xff0c;\u800c\u975e\u201c\u5e26\u7740\u6574\u672c\u4e66\u804a\u5929\u201d\u3002<\/p>\n<h4>\u4f18\u52bf<\/h4>\n<li>\u7701Token&#xff1a;\u6458\u8981\u6bd4\u5168\u91cf\u5386\u53f2\u5c0f80%&#xff0c;\u518d\u4e5f\u4e0d\u62c5\u5fc3\u8d85\u9650\u5236&#xff1b;<\/li>\n<li>\u4fdd\u8fde\u8d2f&#xff1a;\u6458\u8981\u542b\u5173\u952e\u4fe1\u606f&#xff0c;\u6a21\u578b\u77e5\u9053\u4e4b\u524d\u804a\u4e86\u5565&#xff1b;<\/li>\n<li>\u6613\u6269\u5c55&#xff1a;\u53ef\u5b58\u5728MongoDB\u3001Milvus&#xff0c;\u652f\u6301\u591a\u7528\u6237\u3001\u5927\u6570\u636e\u91cf\u3002<\/li>\n<h3>\u56db\u3001\u5e26\u6458\u8981\u5b58\u50a8\u7684\u5bf9\u8bdd\u7cfb\u7edf<\/h3>\n<h4>\u5b9e\u6218\u51c6\u5907<\/h4>\n<p>\u5148\u5b89\u88c5\u4f9d\u8d56&#xff1a;<\/p>\n<p>pip <span class=\"token function\">install<\/span> langchain langchain-openai langchain-core pymilvus  <span class=\"token comment\"># \u6309\u9700\u88c5\u5b58\u50a8\u4f9d\u8d56<\/span><\/p>\n<h4>\u5b9e\u62181&#xff1a;\u57fa\u7840\u7248\u2014\u2014\u751f\u6210\u5bf9\u8bdd\u6458\u8981<\/h4>\n<p>\u8fd9\u662f\u6700\u57fa\u7840\u7684\u7528\u6cd5&#xff0c;\u6211\u7528\u6765\u6d4b\u8bd5\u6458\u8981\u6548\u679c&#xff0c;\u770b\u770b\u6a21\u578b\u80fd\u4e0d\u80fd\u6293\u5173\u952e\u4fe1\u606f&#xff1a;<\/p>\n<p><span class=\"token keyword\">from<\/span> langchain<span class=\"token punctuation\">.<\/span>memory <span class=\"token keyword\">import<\/span> ConversationSummaryMemory<br \/>\n<span class=\"token keyword\">from<\/span> langchain_openai <span class=\"token keyword\">import<\/span> ChatOpenAI<\/p>\n<p><span class=\"token comment\"># \u521d\u59cb\u5316\u5927\u6a21\u578b&#xff08;\u5de5\u85e4\u7528\u7684\u901a\u4e49\u5343\u95ee&#xff0c;\u5927\u5bb6\u66ff\u6362\u81ea\u5df1\u7684api_key&#xff09;<\/span><br \/>\nllm <span class=\"token operator\">&#061;<\/span> ChatOpenAI<span class=\"token punctuation\">(<\/span><br \/>\n    model_name<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;qwen-plus&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    base_url<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;https:\/\/dashscope.aliyuncs.com\/compatible-mode\/v1&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    api_key<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\u4f60\u7684api_key&#034;<\/span><span class=\"token punctuation\">,<\/span>  <span class=\"token comment\"># \u5de5\u85e4\u63d0\u793a&#xff1a;\u522b\u786c\u7f16\u7801&#xff0c;\u653e\u73af\u5883\u53d8\u91cf\u91cc\u66f4\u5b89\u5168<\/span><br \/>\n    temperature<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.7<\/span>  <span class=\"token comment\"># \u6458\u8981\u4e0d\u7528\u592a\u6b7b\u677f&#xff0c;0.7\u521a\u597d<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u521d\u59cb\u5316\u6458\u8981\u8bb0\u5fc6&#xff08;\u6838\u5fc3\u7ec4\u4ef6&#xff09;<\/span><br \/>\nmemory <span class=\"token operator\">&#061;<\/span> ConversationSummaryMemory<span class=\"token punctuation\">(<\/span>llm<span class=\"token operator\">&#061;<\/span>llm<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u6a21\u62df\u6211\u548c\u7528\u6237\u7684\u5bf9\u8bdd&#xff08;\u5de5\u85e4\u9879\u76ee\u91cc\u7684\u771f\u5b9e\u5bf9\u8bdd\u7247\u6bb5&#xff09;<\/span><br \/>\nmemory<span class=\"token punctuation\">.<\/span>save_context<span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;input&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u5de5\u85e4&#xff0c;AI\u5927\u6a21\u578b\u600e\u4e48\u5165\u95e8&#xff1f;&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;output&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u5148\u5b66\u57fa\u7840\u6982\u5ff5&#xff0c;\u518d\u8c03\u7528API&#xff0c;\u7136\u540e\u5b66LangChain\u3001RAG&#xff0c;\u6700\u540e\u5b9e\u6218\u505a\u9879\u76ee&#034;<\/span><span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\nmemory<span class=\"token punctuation\">.<\/span>save_context<span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;input&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u6709\u6ca1\u6709\u9002\u5408\u96f6\u57fa\u7840\u7684\u8bfe\u7a0b&#xff1f;&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;output&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u53ef\u4ee5\u770b\u6211\u7684\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u7cfb\u5217&#xff0c;\u4eceAPI\u8c03\u7528\u8bb2\u5230Agent\u5b9e\u6218&#034;<\/span><span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u53d6\u6458\u8981\u2014\u2014\u770b\u770b\u6548\u679c<\/span><br \/>\nsummary <span class=\"token operator\">&#061;<\/span> memory<span class=\"token punctuation\">.<\/span>load_memory_variables<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u5de5\u85e4\u9879\u76ee\u5b9e\u6218&#xff1a;\u5bf9\u8bdd\u6458\u8981&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>summary<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;history&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u8f93\u51fa\u6458\u8981&#xff0c;\u53ea\u5b58\u5173\u952e\u4fe1\u606f<\/span><\/p>\n<p><span class=\"token comment\"># \u5de5\u85e4\u8fd0\u884c\u7ed3\u679c&#xff1a;<\/span><br \/>\n<span class=\"token comment\"># \u7528\u6237\u8be2\u95eeAI\u5927\u6a21\u578b\u96f6\u57fa\u7840\u5165\u95e8\u65b9\u6cd5&#xff0c;\u52a9\u624b\u5efa\u8bae\u5148\u5b66\u57fa\u7840\u6982\u5ff5\u3001\u8c03\u7528API\u3001\u5b66LangChain\u548cRAG&#xff0c;\u518d\u5b9e\u6218&#xff1b;\u7528\u6237\u53c8\u95ee\u9002\u5408\u96f6\u57fa\u7840\u7684\u8bfe\u7a0b&#xff0c;\u52a9\u624b\u63a8\u8350\u81ea\u5df1\u7684\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u7cfb\u5217\u3002<\/span><\/p>\n<h4>\u5b9e\u62182&#xff1a;\u8fdb\u9636\u7248\u2014\u2014\u5e26\u6458\u8981\u5b58\u50a8\u7684\u5bf9\u8bdd\u94fe<\/h4>\n<p>\u8fd9\u662f\u6211\u73b0\u5728\u9879\u76ee\u91cc\u7528\u7684\u6838\u5fc3\u4ee3\u7801&#xff0c;\u7528LCEL\u94fe\u5f0f\u7ed3\u6784&#xff0c;\u652f\u6301\u591a\u8f6e\u5bf9\u8bdd&#xff0c;\u81ea\u52a8\u66f4\u6458\u8981&#xff0c;\u7279\u522b\u7a33\u5b9a&#xff1a;<\/p>\n<p><span class=\"token keyword\">from<\/span> langchain<span class=\"token punctuation\">.<\/span>memory <span class=\"token keyword\">import<\/span> ConversationSummaryMemory<br \/>\n<span class=\"token keyword\">from<\/span> langchain_openai <span class=\"token keyword\">import<\/span> ChatOpenAI<br \/>\n<span class=\"token keyword\">from<\/span> langchain_core<span class=\"token punctuation\">.<\/span>runnables <span class=\"token keyword\">import<\/span> RunnablePassthrough<br \/>\n<span class=\"token keyword\">from<\/span> langchain_core<span class=\"token punctuation\">.<\/span>output_parsers <span class=\"token keyword\">import<\/span> StrOutputParser<br \/>\n<span class=\"token keyword\">from<\/span> langchain_core<span class=\"token punctuation\">.<\/span>prompts <span class=\"token keyword\">import<\/span> ChatPromptTemplate<\/p>\n<p><span class=\"token comment\"># 1. \u521d\u59cb\u5316\u5927\u6a21\u578b&#xff08;\u548c\u6211\u4e4b\u524d\u7684Agent\u9879\u76ee\u7528\u7684\u4e00\u6837&#xff09;<\/span><br \/>\nllm <span class=\"token operator\">&#061;<\/span> ChatOpenAI<span class=\"token punctuation\">(<\/span><br \/>\n    model_name<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;qwen-plus&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    base_url<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;https:\/\/dashscope.aliyuncs.com\/compatible-mode\/v1&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    api_key<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\u4f60\u7684api_key&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    temperature<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.7<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u521d\u59cb\u5316\u6458\u8981\u8bb0\u5fc6&#xff08;memory_key\u8981\u548cprompt\u91cc\u7684\u53d8\u91cf\u540d\u4e00\u81f4&#xff01;&#xff09;<\/span><br \/>\nmemory <span class=\"token operator\">&#061;<\/span> ConversationSummaryMemory<span class=\"token punctuation\">(<\/span><br \/>\n    llm<span class=\"token operator\">&#061;<\/span>llm<span class=\"token punctuation\">,<\/span><br \/>\n    memory_key<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;chat_history&#034;<\/span><span class=\"token punctuation\">,<\/span>  <span class=\"token comment\"># \u5de5\u85e4\u8e29\u5751&#xff1a;\u8fd9\u91cc\u548c\u4e0b\u9762prompt\u7684{chat_history}\u8981\u540c\u540d<\/span><br \/>\n    return_messages<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">True<\/span>  <span class=\"token comment\"># \u8fd4\u56de\u6d88\u606f\u5bf9\u8c61&#xff0c;\u66f4\u7075\u6d3b<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u5b9a\u4e49prompt\u2014\u2014\u5fc5\u987b\u5305\u542b\u6458\u8981\u53d8\u91cf&#xff08;chat_history&#xff09;<\/span><br \/>\nprompt <span class=\"token operator\">&#061;<\/span> ChatPromptTemplate<span class=\"token punctuation\">.<\/span>from_messages<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;system&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u4f60\u662f\u5de5\u85e4\u5b66\u7f16\u7a0b\u7684AI\u52a9\u624b&#xff0c;\u57fa\u4e8e\u5bf9\u8bdd\u6458\u8981\u56de\u7b54\u95ee\u9898&#xff0c;\u8bed\u6c14\u4eb2\u5207\u50cf\u804a\u5929&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;human&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u5bf9\u8bdd\u6458\u8981&#xff1a;{chat_history}\\\\n\u7528\u6237\u73b0\u5728\u95ee&#xff1a;{input}&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># 4. \u6784\u5efaLCEL\u94fe&#xff08;\u5de5\u85e4\u63a8\u8350\u7528\u8fd9\u4e2a&#xff0c;\u6bd4LLMChain\u7075\u6d3b&#xff09;<\/span><br \/>\nchain <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token comment\"># \u6ce8\u5165\u8f93\u5165\u548c\u8bb0\u5fc6\u6458\u8981<\/span><br \/>\n    RunnablePassthrough<span class=\"token punctuation\">.<\/span>assign<span class=\"token punctuation\">(<\/span><br \/>\n        chat_history<span class=\"token operator\">&#061;<\/span><span class=\"token keyword\">lambda<\/span> <span class=\"token keyword\">_<\/span><span class=\"token punctuation\">:<\/span> memory<span class=\"token punctuation\">.<\/span>load_memory_variables<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;chat_history&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token operator\">|<\/span> prompt  <span class=\"token comment\"># \u683c\u5f0f\u5316prompt<\/span><br \/>\n    <span class=\"token operator\">|<\/span> llm     <span class=\"token comment\"># \u8c03\u7528\u5927\u6a21\u578b<\/span><br \/>\n    <span class=\"token operator\">|<\/span> StrOutputParser<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u89e3\u6790\u8f93\u51fa<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># 5. \u6a21\u62df\u7528\u6237\u591a\u8f6e\u5bf9\u8bdd&#xff08;\u5de5\u85e4\u9879\u76ee\u91cc\u7684\u771f\u5b9e\u7528\u6237\u63d0\u95ee&#xff09;<\/span><br \/>\nuser_inputs <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token string\">&#034;\u5de5\u85e4&#xff0c;\u600e\u4e48\u7528LangChain\u505a\u8bb0\u5fc6\u529f\u80fd&#xff1f;&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;\u4e4b\u524d\u8bf4\u7684ConversationSummaryMemory&#xff0c;\u80fd\u5b58\u591a\u5c11\u8f6e\u5bf9\u8bdd&#xff1f;&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;\u5b83\u548cMilvus\u7ed3\u5408\u7684\u8bdd&#xff0c;\u600e\u4e48\u5b58\u6458\u8981&#xff1f;&#034;<\/span>  <span class=\"token comment\"># \u4f9d\u8d56\u4e0a\u4e00\u8f6e\u7684\u8bb0\u5fc6<\/span><br \/>\n<span class=\"token punctuation\">]<\/span><\/p>\n<p><span class=\"token comment\"># 6. \u8fd0\u884c\u5bf9\u8bdd&#xff08;\u5de5\u85e4\u91cd\u70b9\u6ce8\u91ca&#xff1a;LCEL\u9700\u8981\u624b\u52a8\u4fdd\u5b58\u4e0a\u4e0b\u6587&#xff01;&#xff09;<\/span><br \/>\n<span class=\"token keyword\">for<\/span> query <span class=\"token keyword\">in<\/span> user_inputs<span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\\\\n\u7528\u6237&#xff1a;<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>query<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token comment\"># \u8c03\u7528\u94fe\u83b7\u53d6\u56de\u590d<\/span><br \/>\n    response <span class=\"token operator\">&#061;<\/span> chain<span class=\"token punctuation\">.<\/span>invoke<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;input&#034;<\/span><span class=\"token punctuation\">:<\/span> query<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u5de5\u85e4\u52a9\u624b&#xff1a;<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>response<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u624b\u52a8\u4fdd\u5b58\u4e0a\u4e0b\u6587\u5230\u8bb0\u5fc6&#xff08;LLMChain\u4f1a\u81ea\u52a8\u5b58&#xff0c;LCEL\u8981\u624b\u52a8&#xff01;&#xff09;<\/span><br \/>\n    memory<span class=\"token punctuation\">.<\/span>save_context<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;input&#034;<\/span><span class=\"token punctuation\">:<\/span> query<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;output&#034;<\/span><span class=\"token punctuation\">:<\/span> response<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u67e5\u770b\u5f53\u524d\u6458\u8981&#xff08;\u5de5\u85e4\u8c03\u8bd5\u65f6\u5fc5\u770b&#xff0c;\u786e\u4fdd\u6458\u8981\u6b63\u786e&#xff09;<\/span><br \/>\n    current_summary <span class=\"token operator\">&#061;<\/span> memory<span class=\"token punctuation\">.<\/span>load_memory_variables<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;chat_history&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u5f53\u524d\u5bf9\u8bdd\u6458\u8981&#xff1a;<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>current_summary<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><\/p>\n<h4>\u5de5\u85e4\u5b9e\u6218\u8f93\u51fa\u6548\u679c&#xff08;\u771f\u5b9e\u8fd0\u884c\u7ed3\u679c&#xff09;<\/h4>\n<p>\u7528\u6237&#xff1a;\u5de5\u85e4&#xff0c;\u600e\u4e48\u7528LangChain\u505a\u8bb0\u5fc6\u529f\u80fd&#xff1f;<br \/>\n\u5de5\u85e4\u52a9\u624b&#xff1a;\u53ef\u4ee5\u7528LangChain\u7684Memory\u6a21\u5757&#xff0c;\u6bd4\u5982ConversationBufferMemory\u5b58\u5b8c\u6574\u5386\u53f2&#xff0c;ConversationSummaryMemory\u5b58\u6458\u8981&#xff0c;\u9002\u5408\u957f\u5bf9\u8bdd&#8230;<br \/>\n\u5f53\u524d\u5bf9\u8bdd\u6458\u8981&#xff1a; \u7528\u6237\u8be2\u95ee\u5982\u4f55\u7528LangChain\u505a\u8bb0\u5fc6\u529f\u80fd&#xff0c;\u52a9\u624b\u5efa\u8bae\u4f7f\u7528Memory\u6a21\u5757&#xff0c;\u4e3e\u4f8bConversationBufferMemory\u548cConversationSummaryMemory&#xff0c;\u540e\u8005\u9002\u5408\u957f\u5bf9\u8bdd\u3002<\/p>\n<p>\u7528\u6237&#xff1a;\u4e4b\u524d\u8bf4\u7684ConversationSummaryMemory&#xff0c;\u80fd\u5b58\u591a\u5c11\u8f6e\u5bf9\u8bdd&#xff1f;<br \/>\n\u5de5\u85e4\u52a9\u624b&#xff1a;\u5b83\u6ca1\u6709\u56fa\u5b9a\u8f6e\u6570\u9650\u5236&#xff0c;\u56e0\u4e3a\u5b58\u7684\u662f\u6458\u8981&#xff0c;\u4e0d\u662f\u5168\u91cf\u5bf9\u8bdd&#xff0c;\u54ea\u6015100\u8f6e&#xff0c;\u6458\u8981\u4e5f\u4e0d\u4f1a\u8d85\u592a\u591aToken&#8230;<br \/>\n\u5f53\u524d\u5bf9\u8bdd\u6458\u8981&#xff1a; \u7528\u6237\u5148\u95eeLangChain\u8bb0\u5fc6\u529f\u80fd\u505a\u6cd5&#xff0c;\u52a9\u624b\u63a8\u8350Memory\u6a21\u5757\u53ca\u4e24\u4e2a\u5b50\u7c7b&#xff1b;\u63a5\u7740\u7528\u6237\u95eeConversationSummaryMemory\u80fd\u5b58\u591a\u5c11\u8f6e&#xff0c;\u52a9\u624b\u79f0\u65e0\u56fa\u5b9a\u9650\u5236&#xff0c;\u56e0\u5b58\u50a8\u7684\u662f\u6458\u8981\u3002<\/p>\n<p>\u7528\u6237&#xff1a;\u5b83\u548cMilvus\u7ed3\u5408\u7684\u8bdd&#xff0c;\u600e\u4e48\u5b58\u6458\u8981&#xff1f;<br \/>\n\u5de5\u85e4\u52a9\u624b&#xff1a;\u53ef\u4ee5\u628a\u751f\u6210\u7684\u6458\u8981\u8f6c\u6210\u5411\u91cf&#xff0c;\u7528LangChain\u7684VectorStoreRetrieverMemory&#xff0c;\u628a\u6458\u8981\u5b58\u5728Milvus\u91cc&#xff0c;\u9700\u8981\u65f6\u68c0\u7d22\u76f8\u5173\u6458\u8981&#8230;<br \/>\n\u5f53\u524d\u5bf9\u8bdd\u6458\u8981&#xff1a; \u7528\u6237\u95eeConversationSummaryMemory\u4e0eMilvus\u7ed3\u5408\u7684\u5b58\u6458\u8981\u65b9\u6cd5&#xff0c;\u52a9\u624b\u5efa\u8bae\u5c06\u6458\u8981\u8f6c\u5411\u91cf&#xff0c;\u7528VectorStoreRetrieverMemory\u5b58\u5165Milvus&#xff0c;\u9700\u7528\u65f6\u68c0\u7d22\u3002<\/p>\n<p>\u770b&#xff01;\u5c31\u7b97\u804a\u591a\u8f6e&#xff0c;\u6a21\u578b\u4e5f\u4e0d\u4f1a\u201c\u5931\u5fc6\u201d&#xff0c;\u6458\u8981\u91cc\u5168\u662f\u5173\u952e\u4fe1\u606f&#xff0c;Token\u6d88\u8017\u7279\u522b\u5c11&#xff5e;<\/p>\n<h3>\u56db\u3001\u5173\u952e\u77e5\u8bc6\u70b9&#xff1a;LCEL\u548cLLMChain\u600e\u4e48\u9009&#xff1f;<\/h3>\n<table>\n<tr>\u7279\u6027LCEL\u94feLLMChain<\/tr>\n<tbody>\n<tr>\n<td>\u8bb0\u5fc6\u4fdd\u5b58<\/td>\n<td>\u9700\u624b\u52a8\u8c03\u7528memory.save_context()<\/td>\n<td>\u81ea\u52a8\u4fdd\u5b58&#xff0c;\u4e0d\u7528\u624b\u52a8\u5199<\/td>\n<\/tr>\n<tr>\n<td>\u94fe\u5f0f\u7075\u6d3b\u6027<\/td>\n<td>\u9ad8&#xff0c;\u53ef\u52a0\u8def\u7531\u3001\u65e5\u5fd7&#xff08;\u6211\u52a0\u4e86\u9519\u8bef\u6355\u83b7&#xff09;<\/td>\n<td>\u56fa\u5b9a\u7ed3\u6784&#xff0c;\u7075\u6d3b\u5ea6\u4f4e<\/td>\n<\/tr>\n<tr>\n<td>\u8c03\u8bd5&amp;\u6269\u5c55<\/td>\n<td>\u53ef\u63d2\u4e2d\u95f4\u4ef6&#xff0c;\u9002\u5408\u590d\u6742\u9879\u76ee&#xff08;\u5982\u591a\u5de5\u5177\u8c03\u7528&#xff09;<\/td>\n<td>\u9760verbose&#061;True\u8c03\u8bd5&#xff0c;\u9002\u5408\u5165\u95e8<\/td>\n<\/tr>\n<tr>\n<td>\u5de5\u85e4\u4f7f\u7528\u573a\u666f<\/td>\n<td>\u667a\u80fd\u52a9\u624b\u3001Agent\u9879\u76ee&#xff08;\u590d\u6742\u573a\u666f&#xff09;<\/td>\n<td>\u7b80\u5355\u5bf9\u8bdddemo&#xff08;\u5feb\u901f\u9a8c\u8bc1\u60f3\u6cd5&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e94\u3001\u907f\u5751\u6307\u5357<\/h3>\n<li>\u53d8\u91cf\u540d\u8981\u4e00\u81f4&#xff1a;memory_key&#xff08;\u5982&#034;chat_history&#034;&#xff09;\u5fc5\u987b\u548cprompt\u91cc\u7684\u53d8\u91cf\u540d\u4e00\u6837&#xff0c;\u4e0d\u7136\u4f1a\u62a5\u201c\u53d8\u91cf\u672a\u5b9a\u4e49\u201d&#xff1b;<\/li>\n<li>\u6458\u8981\u6a21\u677f\u53ef\u5b9a\u5236&#xff1a;\u60f3\u8ba9\u6458\u8981\u5305\u542b\u66f4\u591aQA\u7ec6\u8282&#xff0c;\u53ef\u6539prompt&#xff0c;\u6bd4\u5982\u52a0\u4e00\u53e5\u201c\u6458\u8981\u8981\u5305\u542b\u7528\u6237\u95ee\u9898\u548c\u52a9\u624b\u6838\u5fc3\u56de\u7b54\u201d&#xff1b;<\/li>\n<li>\u654f\u611f\u4fe1\u606f\u8fc7\u6ee4&#xff1a;\u4fdd\u5b58\u6458\u8981\u524d&#xff0c;\u7528\u6b63\u5219\u66ff\u6362\u624b\u673a\u53f7\u3001\u90ae\u7bb1&#xff0c;\u907f\u514d\u5408\u89c4\u98ce\u9669&#xff1b;<\/li>\n<li>\u5b58\u50a8\u6269\u5c55&#xff1a;\u91cf\u5927\u65f6&#xff0c;\u628a\u6458\u8981\u5b58Milvus&#xff0c;\u7528VectorStoreRetrieverMemory&#xff0c;\u68c0\u7d22\u66f4\u5feb&#xff08;\u4e4b\u524d\u8bb2\u8fc7Milvus\u5b9e\u6218&#xff0c;\u53ef\u56de\u5934\u770b&#xff09;\u3002<\/li>\n<h3>\u603b\u7ed3<\/h3>\n<p>\u5176\u5b9e\u89e3\u51b3\u5927\u91cfQA\u3001\u957f\u5bf9\u8bdd\u5b58\u50a8\u95ee\u9898&#xff0c;\u6838\u5fc3\u5c31\u662f\u201c\u6293\u91cd\u70b9\u201d\u2014\u2014\u7528ConversationSummaryMemory\u751f\u6210\u6458\u8981&#xff0c;\u53ea\u5b58\u5173\u952e\u4fe1\u606f&#xff0c;\u518d\u6839\u636e\u9879\u76ee\u590d\u6742\u5ea6\u9009LCEL\u6216LLMChain\u3002<\/p>\n<p>\u6709\u7591\u95ee\u6b22\u8fce\u5728\u8bc4\u8bba\u533a\u4ea4\u6d41&#xff0c;\u54b1\u4eec\u4e0b\u671f\u518d\u89c1&#xff01;&#x1f44b;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u597d&#xff0c;\u6211\u662f\u5de5\u85e4\u5b66\u7f16\u7a0b &#x1f989;\u4e00\u4e2a\u6b63\u5728\u52aa\u529b\u5b66\u4e60\u7684\u5c0f\u535a\u4e3b&#xff0c;\u671f\u5f85\u4f60\u7684\u5173\u6ce8\u5b9e\u6218\u4ee3\u7801\u7cfb\u5217\u6700\u65b0\u6587\u7ae0&#x1f609;C\u5b9e\u73b0\u56fe\u4e66\u7ba1\u7406\u7cfb\u7edf&#xff08;Qt C GUI\u754c\u9762\u7248&#xff09;SpringBoot\u5b9e\u6218\u7cfb\u5217&#x1f437;\u3010SpringBoot\u5b9e\u6218\u7cfb\u5217\u3011SpringBoot3.X \u6574\u5408 MinIO \u5b58\u50a8\u539f\u751f\u65b9\u6848\u5206\u5e93\u5206\u8868\u5206\u5e93\u5206\u8868\u4e4b\u5b9e\u6218-sharding-JDBC\u5206\u5e93\u5206\u8868\u6267\u884c\u6d41\u7a0b\u539f\u7406\u5256\u6790\u6d88\u606f\u961f\u5217\u6df1\u5165\u6d45\u51fa RabbitMQ-RabbitMQ<\/p>\n","protected":false},"author":2,"featured_media":64708,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[50],"topic":[],"class_list":["post-64712","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316\uff1a\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/64712.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316\uff1a\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u5927\u5bb6\u597d&#xff0c;\u6211\u662f\u5de5\u85e4\u5b66\u7f16\u7a0b &#x1f989;\u4e00\u4e2a\u6b63\u5728\u52aa\u529b\u5b66\u4e60\u7684\u5c0f\u535a\u4e3b&#xff0c;\u671f\u5f85\u4f60\u7684\u5173\u6ce8\u5b9e\u6218\u4ee3\u7801\u7cfb\u5217\u6700\u65b0\u6587\u7ae0&#x1f609;C\u5b9e\u73b0\u56fe\u4e66\u7ba1\u7406\u7cfb\u7edf&#xff08;Qt C GUI\u754c\u9762\u7248&#xff09;SpringBoot\u5b9e\u6218\u7cfb\u5217&#x1f437;\u3010SpringBoot\u5b9e\u6218\u7cfb\u5217\u3011SpringBoot3.X \u6574\u5408 MinIO \u5b58\u50a8\u539f\u751f\u65b9\u6848\u5206\u5e93\u5206\u8868\u5206\u5e93\u5206\u8868\u4e4b\u5b9e\u6218-sharding-JDBC\u5206\u5e93\u5206\u8868\u6267\u884c\u6d41\u7a0b\u539f\u7406\u5256\u6790\u6d88\u606f\u961f\u5217\u6df1\u5165\u6d45\u51fa RabbitMQ-RabbitMQ\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/64712.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-23T15:40:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123154035-69739673e9c5a.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64712.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/64712.html\",\"name\":\"\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316\uff1a\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-23T15:40:38+00:00\",\"dateModified\":\"2026-01-23T15:40:38+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/64712.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/64712.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64712.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316\uff1a\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316\uff1a\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/64712.html","og_locale":"zh_CN","og_type":"article","og_title":"\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316\uff1a\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u5927\u5bb6\u597d&#xff0c;\u6211\u662f\u5de5\u85e4\u5b66\u7f16\u7a0b &#x1f989;\u4e00\u4e2a\u6b63\u5728\u52aa\u529b\u5b66\u4e60\u7684\u5c0f\u535a\u4e3b&#xff0c;\u671f\u5f85\u4f60\u7684\u5173\u6ce8\u5b9e\u6218\u4ee3\u7801\u7cfb\u5217\u6700\u65b0\u6587\u7ae0&#x1f609;C\u5b9e\u73b0\u56fe\u4e66\u7ba1\u7406\u7cfb\u7edf&#xff08;Qt C GUI\u754c\u9762\u7248&#xff09;SpringBoot\u5b9e\u6218\u7cfb\u5217&#x1f437;\u3010SpringBoot\u5b9e\u6218\u7cfb\u5217\u3011SpringBoot3.X \u6574\u5408 MinIO \u5b58\u50a8\u539f\u751f\u65b9\u6848\u5206\u5e93\u5206\u8868\u5206\u5e93\u5206\u8868\u4e4b\u5b9e\u6218-sharding-JDBC\u5206\u5e93\u5206\u8868\u6267\u884c\u6d41\u7a0b\u539f\u7406\u5256\u6790\u6d88\u606f\u961f\u5217\u6df1\u5165\u6d45\u51fa RabbitMQ-RabbitMQ","og_url":"https:\/\/www.wsisp.com\/helps\/64712.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-23T15:40:38+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123154035-69739673e9c5a.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/64712.html","url":"https:\/\/www.wsisp.com\/helps\/64712.html","name":"\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316\uff1a\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-23T15:40:38+00:00","dateModified":"2026-01-23T15:40:38+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/64712.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/64712.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/64712.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u96f6\u57fa\u7840\u5b66AI\u5927\u6a21\u578b\u4e4bLLM\u5b58\u50a8\u4f18\u5316\uff1a\u5927\u91cfQA\u4e0e\u957f\u5bf9\u8bdd\u95ee\u9898\u5b9e\u6218"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=64712"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64712\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/64708"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=64712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=64712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=64712"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=64712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}