{"id":20420,"date":"2025-02-06T15:26:38","date_gmt":"2025-02-06T07:26:38","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=20420"},"modified":"2025-02-16T21:48:08","modified_gmt":"2025-02-16T13:48:08","slug":"tupoxinxigudao","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/ja\/tupoxinxigudao\/","title":{"rendered":"\u7a81\u7834\u4fe1\u606f\u5b64\u5c9b\uff1aDify\u4e3a\u672c\u5730\u5316DeepSeek AI\u52a9\u624b\u6dfb\u52a0\u8054\u7f51\u641c\u7d22"},"content":{"rendered":"<p>\u60f3\u8c61\u4e00\u4e0b\uff0c\u62e5\u6709\u4e00\u6b3e\u72ec\u7acb\u8fd0\u884c\u3001\u5168\u7a0b\u4fdd\u5bc6\u3001\u8fd8\u80fd\u591f\u5206\u6790\u672c\u5730\u6587\u672c\u5185\u5bb9\uff0c\u968f\u65f6\u63d0\u4f9b\u7cbe\u51c6\u7684\u5bf9\u8bdd\u670d\u52a1\uff0c\u5e76\u4e14\u5177\u5907\u8054\u7f51\u641c\u7d22\u80fd\u529b\u7684\u79c1\u6709\u5316 AI \u5e94\u7528\u662f\u4e00\u79cd\u600e\u6837\u7684\u4f53\u9a8c\uff1f\u672c\u6587\u5c06\u5e26\u4f60\u4e00\u6b65\u6b65\u642d\u5efa\u00a0<strong>DeepSeek + Ollama + Dify<\/strong>\u00a0\uff0c\u5feb\u901f\u90e8\u7f72\u5168\u529f\u80fd\u7684\u79c1\u6709\u5316 AI \u52a9\u624b\u3002<\/p>\n<p><a href=\"https:\/\/www.kdjingpai.com\/deepseek-chatshena\/\">DeepSeek<\/a> \u662f\u4e00\u6b3e\u7a81\u7834\u6027\u7684\u5f00\u6e90\u5927\u8bed\u8a00\u6a21\u578b\uff0c\u5b83\u7684\u5148\u8fdb\u7b97\u6cd5\u67b6\u6784\u548c\u201c\u53cd\u601d\u94fe\u201d\u80fd\u529b\uff0c\u8ba9 AI \u5bf9\u8bdd\u4ea4\u4e92\u53d8\u5f97\u66f4\u667a\u80fd\u4e0e\u81ea\u7136\u3002\u901a\u8fc7\u79c1\u6709\u5316\u90e8\u7f72\uff0c\u4f60\u53ef\u4ee5\u5b8c\u5168\u638c\u63a7\u6570\u636e\u7684\u5b89\u5168\u6027\uff0c\u5e76\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u7075\u6d3b\u8c03\u6574\u90e8\u7f72\u65b9\u6848\uff0c\u6253\u9020\u4e13\u5c5e\u4e8e\u4f60\u7684\u00a0<strong>\u300cAI \u64cd\u4f5c\u7cfb\u7edf\u300d<\/strong>\u00a0\u3002<\/p>\n<p><a href=\"https:\/\/www.kdjingpai.com\/dify\/\">Dify<\/a> \u4f5c\u4e3a\u540c\u6837\u5f00\u6e90\u7684 AI \u5e94\u7528\u5f00\u53d1\u5e73\u53f0\uff0c\u540c\u6837\u63d0\u4f9b\u4e86\u5b8c\u5584\u7684\u79c1\u6709\u5316\u90e8\u7f72\u65b9\u6848\u548c\u5f3a\u5927\u7684\u7b2c\u4e09\u65b9\u5de5\u5177\u652f\u6301\uff08\u00a0<strong>\u5305\u62ec\u8054\u7f51\u641c\u7d22\u3001\u6587\u4ef6\u5206\u6790\u529f\u80fd\u7b49<\/strong>\u00a0\uff09\u3002\u540c\u65f6\uff0cDify \u652f\u6301\u5168\u7403 1000+ \u5f00\u6e90\u6216\u95ed\u6e90\u5927\u6a21\u578b\uff0c\u4f60\u53ef\u4ee5\u8c03\u7528\u4efb\u610f\u7684\u6a21\u578b\u80fd\u529b\u8d4b\u80fd\u4f60\u7684 AI \u5e94\u7528\u3002<\/p>\n<p>\u5c06 DeepSeek \u65e0\u7f1d\u96c6\u6210\u5230 Dify \u5e73\u53f0\uff0c\u4e0d\u4ec5\u80fd\u786e\u4fdd\u6570\u636e\u9690\u79c1\uff0c\u4e14\u6613\u4e8e\u5f00\u53d1\u4e0a\u624b\u201c\u6298\u817e\u201d\uff0c\u5728\u672c\u5730\u670d\u52a1\u5668\u5185\u8f7b\u677e\u6253\u9020\u529f\u80fd\u5f3a\u5927\u7684 AI \u5e94\u7528\uff0c\u8ba9\u4f01\u4e1a\u6216\u56e2\u961f\u771f\u6b63\u5b9e\u73b0\u00a0<strong>\u201c\u6570\u636e\u81ea\u4e3b\u6743\u201d\u548c\u201c\u7075\u6d3b\u5b9a\u5236\u201d<\/strong> \u3002\u5982\u679c\u60a8\u4e4b\u95f4\u90e8\u7f72\u8fc7<a href=\"https:\/\/www.kdjingpai.com\/siyouhuabushu-deep\/\">\u79c1\u6709\u5316\u90e8\u7f72 DeepSeek + Dify\uff1a\u6784\u5efa\u5b89\u5168\u53ef\u63a7\u7684\u672c\u5730 AI \u52a9\u624b\u7cfb\u7edf<\/a>\u00a0\uff0c\u53ef\u4ee5\u76f4\u63a5\u8df3\u5230\u8054\u7f51\u641c\u7d22\u90e8\u5206\u3002<\/p>\n<p><strong>Dify X DeepSeek<\/strong> \u79c1\u6709\u5316\u90e8\u7f72\u7684\u4f18\u52bf\uff1a<\/p>\n<ul>\n<li><strong>\u8c03\u7528 1000+ \u6a21\u578b\u80fd\u529b\uff1a<\/strong>\u00a0Dify \u662f\u4e00\u4e2a\u6a21\u578b\u4e2d\u7acb\u7684\u5e73\u53f0\uff0c\u53ef\u5145\u5206\u4f7f\u7528\u4e0d\u540c\u5927\u6a21\u578b\u7684\u63a8\u7406\u80fd\u529b\uff08PS\uff1a\u53ef\u4f7f\u7528 Dify \u652f\u6301\u7684\u591a\u4e2a\u7b2c\u4e09 MaaS \u5e73\u53f0\u8c03\u7528 <a href=\"https:\/\/www.kdjingpai.com\/deepseek-r1nenglixiang\/\">DeepSeek R1<\/a> \u6a21\u578b\uff0c\u4ee5\u89e3\u51b3\u5b98\u65b9 API \u8c03\u7528\u4e0d\u7a33\u5b9a\u95ee\u9898\uff0c\u8be6\u7ec6\u914d\u7f6e\u65b9\u6cd5\u8bf7\u89c1\u6587\u672b\uff09<\/li>\n<li><strong>\u6027\u80fd\u5353\u8d8a\uff1a<\/strong>\u00a0\u5ab2\u7f8e\u5546\u4e1a\u6a21\u578b\u7684\u5bf9\u8bdd\u4f53\u9a8c\uff0c\u8f7b\u677e\u5e94\u5bf9\u5404\u79cd\u590d\u6742\u573a\u666f\u3002<\/li>\n<li><strong>\u73af\u5883\u9694\u79bb\uff1a<\/strong>\u00a0\u5b8c\u5168\u79bb\u7ebf\u8fd0\u884c\uff0c\u675c\u7edd\u6570\u636e\u5916\u6cc4\u7684\u4efb\u4f55\u98ce\u9669\u3002<\/li>\n<li><strong>\u6570\u636e\u53ef\u63a7\uff1a<\/strong>\u00a0\u4f60\u8bf4\u4e86\u7b97\uff0c\u6570\u636e\u5b8c\u5168\u638c\u63a7\uff0c\u7b26\u5408\u884c\u4e1a\u5408\u89c4\u8981\u6c42\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/df0729353ace70b.png\" alt=\"\" \/> \u00a0<strong>\u524d\u7f6e\u51c6\u5907<\/strong>\u8d2d\u7f6e\u4e00\u53f0\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6\u7684\u670d\u52a1\u5668\uff08VPS \u6216 VDS\uff09\uff1a<strong>\u786c\u4ef6\u73af\u5883\uff1a<\/strong><\/p>\n<ul>\n<li>CPU &gt;= 2 Core<\/li>\n<li>\u663e\u5b58\/RAM \u2265 16 GiB\uff08\u63a8\u8350\uff09<\/li>\n<\/ul>\n<p><strong>\u8f6f\u4ef6\u73af\u5883\uff1a<\/strong><\/p>\n<ul>\n<li>Docker<\/li>\n<li>Docker Compose<\/li>\n<li><a href=\"https:\/\/www.kdjingpai.com\/ollama\/\">Ollama<\/a><\/li>\n<li>Dify \u793e\u533a\u7248<\/li>\n<\/ul>\n<p><strong>\u5f00\u59cb\u90e8\u7f721. \u5b89\u88c5 Ollama<\/strong><\/p>\n<p>\u6b63\u5982\u624b\u673a\u5185\u901a\u5e38\u4f1a\u5177\u5907\u5e94\u7528\u5546\u5e97\uff0c\u5e2e\u52a9\u4f60\u5feb\u901f\u627e\u5230\u5e76\u4e0b\u8f7d App \u4e00\u6837\uff0cAI \u6a21\u578b\u4e5f\u6709\u81ea\u5df1\u7684\u4e13\u5c5e\u201c\u5e94\u7528\u5546\u5e97\u201d\u3002<\/p>\n<p>Ollama \u4fbf\u662f\u8fd9\u6837\u4e00\u6b3e\u8de8\u5e73\u53f0\u7684\u5f00\u6e90\u5927\u6a21\u578b\u7ba1\u7406\u5ba2\u6237\u7aef\uff08\u652f\u6301 macOS\u3001Windows\u3001Linux\uff09\uff0c\u65e8\u5728\u65e0\u7f1d\u90e8\u7f72\u5927\u578b\u8bed\u8a00\u6a21\u578b (LLM)\uff0c\u4f8b\u5982 DeepSeek\u3001Llama\u3001Mistral \u7b49\u3002<\/p>\n<p>\u4ec5\u9700\u4e00\u6761\u547d\u4ee4\u5373\u53ef\u5b8c\u6210\u5b89\u88c5\u5927\u6a21\u578b\u548c\u90e8\u7f72\uff0cLLM \u7684\u6240\u6709\u4f7f\u7528\u6570\u636e\u5747\u4f1a\u4fdd\u5b58\u5728\u672c\u5730\u673a\u5668\u5185\uff0c\u63d0\u4f9b\u5168\u65b9\u9762\u7684\u6570\u636e\u9690\u79c1\u548c\u5b89\u5168\u6027\uff0c\u6ee1\u8db3\u5408\u89c4\u8981\u6c42\u3002<\/p>\n<p>\u8bbf\u95ee Ollama \u5b98\u7f51\uff08https:\/\/ollama.com\/\uff09\uff0c\u6839\u636e\u7f51\u9875\u63d0\u793a\u4e0b\u8f7d\u5e76\u5b89\u88c5 Ollama \u5ba2\u6237\u7aef\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5728\u7ec8\u7aef\u5185\u8fd0\u884c ollama -v \u547d\u4ee4\u5c06\u8f93\u51fa\u7248\u672c\u53f7\u3002<\/p>\n<pre><code>~ ollama -v\r\nollama version is 0.5.5\r\n<\/code><\/pre>\n<p>\u6839\u636e\u5b9e\u9645\u7684\u73af\u5883\u914d\u7f6e\uff0c\u9009\u62e9\u5408\u9002\u7684 DeepSeek \u5c3a\u5bf8\u6a21\u578b\u8fdb\u884c\u90e8\u7f72\u3002\u521d\u6b21\u5b89\u88c5\u63a8\u8350\u5b89\u88c5 7B \u5c3a\u5bf8\u6a21\u578b\u3002<\/p>\n<blockquote><p>\u540e\u7f00\u7684 B \u8868\u793a\u6a21\u578b\u7684\u8bad\u7ec3\u53c2\u6570\u3002\u7406\u8bba\u4e0a\u53c2\u6570\u8d8a\u9ad8\uff0c\u6a21\u578b\u7684\u8868\u73b0\u4e5f\u8d8a\u667a\u80fd\uff0c\u6240\u9700\u7684\u663e\u5b58\u4e5f\u8d8a\u9ad8\u3002<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/cf8003a620c040b.png\" alt=\"\" \/><\/p>\n<p>\u8fd0\u884c\u547d\u4ee4 <code>ollama run <a href=\"https:\/\/www.kdjingpai.com\/deepseek-r1nenglixiang\/\">deepseek-r1<\/a>:7b<\/code>\u00a0\u5b89\u88c5 DeepSeek R1 \u6a21\u578b\u3002\u00a0 <img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/c9d4727c8f89dd0.png\" alt=\"\" \/><\/p>\n<p><strong>2. \u5b89\u88c5 Dify \u793e\u533a\u7248<\/strong><\/p>\n<p>\u6b63\u5982\u623f\u5c4b\u901a\u4e86\u6c34\u7535\u4e4b\u540e\uff0c\u8fd8\u9700\u8981\u4e00\u4e2a\u529f\u80fd\u5b8c\u5584\u7684\u53a8\u623f\u624d\u80fd\u8ba9\u53a8\u5e08\u751f\u4ea7\u51fa\u7f8e\u5473\u4f73\u80b4\uff0cDify \u7684\u4f5c\u7528\u4fbf\u662f\u5982\u6b64\u3002\u4f5c\u4e3a\u70ed\u95e8\u7684 GitHub \u5f00\u6e90\u9879\u76ee\uff0cDify \u5df2\u5185\u7f6e\u4e86\u8d2f\u7a7f\u6784\u5efa AI \u5e94\u7528\u65f6\u6240\u9700\u7684\u5404\u5f0f\u5de5\u5177\u94fe\u3002\u65e0\u9700\u638c\u63e1\u590d\u6742\u7684\u4ee3\u7801\u77e5\u8bc6\uff0c\u7ed3\u5408 DeepSeek \u5f3a\u5927\u7684\u6a21\u578b\u80fd\u529b\uff0c\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u5feb\u901f\u6253\u9020\u51fa\u5fc3\u76ee\u4e2d\u7406\u60f3\u4e14\u597d\u7528\u7684 AI \u5e94\u7528\u3002<\/p>\n<p>\u8bbf\u95ee Dify GitHub \u9879\u76ee\u5730\u5740\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b8c\u6210\u62c9\u53d6\u4ee3\u7801\u4ed3\u5e93\u548c\u5b89\u88c5\u6d41\u7a0b\u3002<\/p>\n<pre><code>git clone https:\/\/github.com\/langgenius\/dify.git\r\ncd dify\/docker\r\ncp .env.example .env\r\ndocker compose up -d # \u5982\u679c\u7248\u672c\u662f Docker Compose V1\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1adocker-compose up -d\r\n<\/code><\/pre>\n<p>\u8fd0\u884c\u547d\u4ee4\u540e\uff0c\u7ec8\u7aef\u5c06\u81ea\u52a8\u8f93\u51fa\u6240\u6709\u5bb9\u5668\u7684\u72b6\u6001\u548c\u7aef\u53e3\u6620\u5c04\u60c5\u51b5\u3002\u5982\u6709\u4e2d\u65ad\u6216\u62a5\u9519\uff0c\u8bf7\u786e\u4fdd\u5df2\u5b89\u88c5 Docker \u53ca Docker Compose\u3002\u8be6\u7ec6\u8bf4\u660e\u8bf7\u53c2\u8003\u4ee5\u4e0b\u5185\u5bb9\u3002<\/p>\n<blockquote><p>\u90e8\u7f72 Dify \u793e\u533a\u7248\uff1a<\/p>\n<p>https:\/\/docs.dify.ai\/zh-hans\/getting-started\/install-self-hosted\/docker-compose<\/p><\/blockquote>\n<p>Dify \u793e\u533a\u7248\u9ed8\u8ba4\u4f7f\u7528 80 \u7aef\u53e3\uff0c\u901a\u8fc7\u94fe\u63a5 http:\/\/your_server_ip \u5373\u53ef\u8bbf\u95ee\u4f60\u7684\u79c1\u6709\u5316 Dify \u5e73\u53f0\u3002<\/p>\n<p>\u5982\u9700\u5207\u6362\u8bbf\u95ee\u7aef\u53e3\uff0c\u8bf7\u53c2\u8003\u6b64\u6587\u6863\uff1ahttps:\/\/docs.dify.ai\/zh-hans\/getting-started\/install-self-hosted\/faq#id-5.-ru-he-xiu-gai-ye-mian-duan-kou<\/p>\n<p><strong>3. \u5c06 DeepSeek \u63a5\u5165\u81f3 Dify<\/strong><\/p>\n<p>\u90e8\u7f72 DeepSeek \u6a21\u578b\u4e0e Dify \u793e\u533a\u7248\u540e\uff0c\u70b9\u51fb\u94fe\u63a5 http:\/\/your_server_ip \u8fdb\u5165 Dify \u5e73\u53f0\uff0c\u63a5\u7740\u70b9\u51fb\u53f3\u4e0a\u89d2\u00a0<strong>\u5934\u50cf \u2192 \u8bbe\u7f6e \u2192 \u6a21\u578b\u4f9b\u5e94\u5546<\/strong>\u00a0\uff0c\u9009\u62e9 Ollama\uff0c\u8f7b\u70b9\u201c\u6dfb\u52a0\u6a21\u578b\u201d\u3002<\/p>\n<p>\u9009\u62e9 LLM \u6a21\u578b\u7c7b\u578b\u3002<\/p>\n<ul>\n<li>Model Name\uff0c\u586b\u5199\u5177\u4f53\u90e8\u7f72\u7684\u6a21\u578b\u578b\u53f7\u3002\u4e0a\u6587\u90e8\u7f72\u7684\u6a21\u578b\u578b\u53f7\u4e3a deepseek-r1 7b\uff0c\u56e0\u6b64\u586b\u5199\uff1adeepseek-r1:7b<\/li>\n<li>Base URL\uff0c\u586b\u5199 Ollama \u5ba2\u6237\u7aef\u7684\u8fd0\u884c\u5730\u5740\uff0c\u901a\u5e38\u4e3a\uff1ahttp:\/\/your_server_ip:11434\u3002\u5982\u9047\u8fde\u63a5\u95ee\u9898\uff0c\u8bf7\u9605\u8bfb\u6587\u672b\u5e38\u89c1\u95ee\u9898\u3002<\/li>\n<li>\u5176\u5b83\u9009\u9879\u4fdd\u6301\u9ed8\u8ba4\u503c\u3002\u6839\u636e DeepSeek \u6a21\u578b\u8bf4\u660e\uff0c\u6700\u5927\u751f\u6210\u957f\u5ea6\u4e3a 32,768 Tokens\u3002<\/li>\n<\/ul>\n<p><strong>\u5f00\u59cb\u642d\u5efa AI \u5e94\u7528<\/strong><\/p>\n<p>\u4ee5\u4e0b\u7ae0\u8282\u5c06\u4e3a\u4f60\u4ecb\u7ecd\u5982\u4f55\u642d\u5efa\u4e0d\u540c\u7c7b\u578b\u7684 AI \u5e94\u7528\uff1a<\/p>\n<ul>\n<li>\u7b80\u5355\u5bf9\u8bdd\u5e94\u7528<\/li>\n<li>\u5177\u5907\u6587\u4ef6\u5206\u6790\u80fd\u529b\u7684\u7b80\u5355\u5bf9\u8bdd\u5e94\u7528<\/li>\n<li>\u5177\u5907\u8054\u7f51\u641c\u7d22\u7684\u53ef\u7f16\u6392\u5e94\u7528<\/li>\n<\/ul>\n<p><strong>DeepSeek AI Chatbot\uff08\u7b80\u5355\u5e94\u7528\uff09<\/strong><\/p>\n<ol>\n<li>\u8f7b\u70b9 Dify \u5e73\u53f0\u9996\u9875\u5de6\u4fa7\u7684\u201c\u521b\u5efa\u7a7a\u767d\u5e94\u7528\u201d\uff0c\u9009\u62e9\u201c\u804a\u5929\u52a9\u624b\u201d\u7c7b\u578b\u5e94\u7528\u5e76\u8fdb\u884c\u7b80\u5355\u7684\u547d\u540d\u3002<\/li>\n<\/ol>\n<ol start=\"2\">\n<li>\u5728\u53f3\u4e0a\u89d2\u7684\u5e94\u7528\u7c7b\u578b\uff0c\u9009\u62e9 Ollama \u6846\u67b6\u5185\u7684 <code>deepseek-r1:7b<\/code>\u00a0\u6a21\u578b\u3002<\/li>\n<\/ol>\n<ol start=\"3\">\n<li>\u5728\u9884\u89c8\u5bf9\u8bdd\u6846\u4e2d\u8f93\u5165\u5185\u5bb9\uff0c\u9a8c\u8bc1 AI \u5e94\u7528\u662f\u5426\u80fd\u591f\u6b63\u5e38\u8fd0\u884c\u3002\u751f\u6210\u7b54\u590d\u540e\u610f\u5473\u7740 AI \u5e94\u7528\u7684\u642d\u5efa\u5df2\u5b8c\u6210\u3002\u00a0 <\/li>\n<li>\u8f7b\u70b9\u5e94\u7528\u53f3\u4e0a\u65b9\u7684\u53d1\u5e03\u6309\u94ae\uff0c\u83b7\u53d6 AI \u5e94\u7528\u94fe\u63a5\u5e76\u5206\u4eab\u7ed9\u4ed6\u4eba\u6216\u5d4c\u5165\u81f3\u5176\u5b83\u7f51\u7ad9\u5185\u3002<\/li>\n<\/ol>\n<p><strong>DeepSeek AI Chatbot + \u77e5\u8bc6\u5e93<\/strong><\/p>\n<p>\u5927\u89c4\u6a21\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u9762\u4e34\u7684\u4e00\u4e2a\u91cd\u8981\u6311\u6218\u5728\u4e8e\u8bad\u7ec3\u6570\u636e\u5e76\u975e\u5b9e\u65f6\u66f4\u65b0\uff0c\u4e14\u6570\u636e\u91cf\u53ef\u80fd\u4e0d\u8db3\uff0c\u8fd9\u5bb9\u6613\u5bfc\u81f4\u6a21\u578b\u751f\u6210\u201c\u5e7b\u89c9\u201d\u5f0f\u7684\u56de\u7b54\u3002<\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\uff0c\u68c0\u7d22\u589e\u5f3a\u751f\u6210\uff08RAG\uff09\u6280\u672f\u5e94\u8fd0\u800c\u751f\u3002\u901a\u8fc7\u68c0\u7d22\u76f8\u5173\u77e5\u8bc6\uff0c\u4e3a\u6a21\u578b\u63d0\u4f9b\u5fc5\u8981\u7684\u4e0a\u4e0b\u6587\u4fe1\u606f\uff0c\u5c06\u8fd9\u4e9b\u4fe1\u606f\u878d\u5165\u5185\u5bb9\u751f\u6210\u8fc7\u7a0b\u4e2d\uff0c\u4ece\u800c\u63d0\u5347\u56de\u7b54\u7684\u51c6\u786e\u6027\u548c\u4e13\u4e1a\u5ea6\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5f53\u4f60\u4e0a\u4f20\u5185\u90e8\u6587\u6863\u6216\u4e13\u4e1a\u8d44\u6599\u540e\uff0c Dify \u7684\u77e5\u8bc6\u5e93\u529f\u80fd\u53ef\u4ee5\u627f\u62c5\u8d77 <a href=\"https:\/\/www.kdjingpai.com\/rag\/\">RAG<\/a> \u4f5c\u7528\uff0c\u5e2e\u52a9 LLM \u57fa\u4e8e\u4e13\u4e1a\u8d44\u6599\u63d0\u4f9b\u66f4\u6709\u9488\u5bf9\u6027\u7684\u89e3\u7b54\uff0c\u6709\u6548\u5f25\u8865\u6a21\u578b\u8bad\u7ec3\u6570\u636e\u7684\u4e0d\u8db3\u3002<\/p>\n<h4><strong>1. \u521b\u5efa\u77e5\u8bc6\u5e93<\/strong><\/h4>\n<p>\u5c06\u9700\u8981 AI \u5206\u6790\u5904\u7406\u7684\u6587\u6863\u4e0a\u4f20\u81f3\u77e5\u8bc6\u5e93\u4e2d\u3002\u4e3a\u786e\u4fdd DeepSeek \u6a21\u578b\u80fd\u591f\u51c6\u786e\u7406\u89e3\u6587\u6863\u5185\u5bb9\uff0c\u5efa\u8bae\u4f7f\u7528&#8221;\u7236\u5b50\u5206\u6bb5&#8221;\u6a21\u5f0f\u8fdb\u884c\u6587\u672c\u5904\u7406 &#8211; \u8fd9\u79cd\u6a21\u5f0f\u80fd\u591f\u66f4\u597d\u5730\u4fdd\u7559\u6587\u6863\u7684\u5c42\u7ea7\u7ed3\u6784\u548c\u4e0a\u4e0b\u6587\u5173\u7cfb\u3002<\/p>\n<blockquote><p>\u5982\u9700\u4e86\u89e3\u8be6\u7ec6\u7684\u914d\u7f6e\u6b65\u9aa4\uff0c\u8bf7\u53c2\u8003\u6b64\u6587\u6863\uff1a<\/p>\n<p>https:\/\/docs.dify.ai\/zh-hans\/guides\/knowledge-base\/create-knowledge-and-upload-documents<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/85d00cbeb9e1365.png\" alt=\"\" \/><\/p>\n<h4><strong>2. \u5c06\u77e5\u8bc6\u5e93\u96c6\u6210\u81f3 AI \u5e94\u7528<\/strong><\/h4>\n<p>\u5728 AI \u5e94\u7528\u7684\u201c\u4e0a\u4e0b\u6587\u201d\u5185\u6dfb\u52a0\u77e5\u8bc6\u5e93\uff0c\u5728\u5bf9\u8bdd\u6846\u5185\u8f93\u5165\u76f8\u5173\u95ee\u9898\u3002LLM \u5c06\u9996\u5148\u4ece\u77e5\u8bc6\u5e93\u5185\u83b7\u53d6\u4e0e\u95ee\u9898\u76f8\u5173\u4e0a\u4e0b\u6587\uff0c\u5728\u6b64\u57fa\u7840\u4e0a\u8fdb\u884c\u603b\u7ed3\u5e76\u7ed9\u51fa\u66f4\u9ad8\u8d28\u91cf\u7684\u56de\u7b54\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/2fda889e91d779e.png\" alt=\"\" \/><\/p>\n<h3><strong>DeepSeek AI Chatflow \/ Workflow\uff08\u8054\u7f51\u641c\u7d22\uff09<\/strong><\/h3>\n<p>Chatflow \/ <a href=\"https:\/\/www.kdjingpai.com\/workflow\/\">Workflow<\/a> \u5e94\u7528\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7f16\u6392\u5e76\u642d\u5efa\u529f\u80fd\u66f4\u52a0\u590d\u6742\u7684 AI \u5e94\u7528\uff0c\u4f8b\u5982\u4e3a DeepSeek \u8d4b\u4e88\u8054\u7f51\u641c\u7d22\u3001\u6587\u4ef6\u8bc6\u522b\u3001\u8bed\u97f3\u8bc6\u522b\u7b49\u80fd\u529b\u3002\u51fa\u4e8e\u7bc7\u5e45\u8003\u8651\uff0c\u4ee5\u4e0b\u7ae0\u8282\u4e3a\u4f60\u4ecb\u7ecd\u5982\u4f55\u4e3a DeepSeek\u00a0<strong>\u5f00\u542f\u8054\u7f51\u641c\u7d22\u80fd\u529b<\/strong>\u00a0\u3002<\/p>\n<blockquote><p>\u5982\u679c\u60f3\u8981\u76f4\u63a5\u4f7f\u7528\u8be5\u5e94\u7528\uff0c\u53ef\u4ee5\u70b9\u51fb\u4ee5\u4e0b\u94fe\u63a5\u4e0b\u8f7d DSL \u6587\u4ef6\u5e76\u5bfc\u5165\u81f3 Dify \u5e73\u53f0\u5185\u3002<\/p>\n<p>\u5e94\u7528 DSL \u6587\u4ef6\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n<p>https:\/\/assets-docs.dify.ai\/2025\/02\/41a3564694dd3f2803ad06a29f5b3fef.yml<\/p><\/blockquote>\n<ol>\n<li>\u8f7b\u70b9 Dify \u5e73\u53f0\u9996\u9875\u5de6\u4fa7\u7684\u201c\u521b\u5efa\u7a7a\u767d\u5e94\u7528\u201d\uff0c\u9009\u62e9 \u201cChatflow\u201d \u6216 \u201cWorkflow\u201d \u7c7b\u578b\u5e94\u7528\u5e76\u8fdb\u884c\u7b80\u5355\u7684\u547d\u540d\u3002<\/li>\n<\/ol>\n<p>2.\u6dfb\u52a0<strong>\u8054\u7f51\u641c\u7d22<\/strong>\u8282\u70b9\uff0c\u586b\u5165 API Key \u4ee5\u6fc0\u6d3b\u8282\u70b9\u529f\u80fd\u3002\u5728 Query \u5b57\u6bb5\u5185\u586b\u5199\u521d\u59cb\u8282\u70b9\u63d0\u4f9b\u7684 <code>{{#sys.query#}}<\/code>\u00a0\u53d8\u91cf\u3002<\/p>\n<blockquote><p>\u8bbf\u95ee\u4ee5\u4e0b\u7f51\u7ad9\u83b7\u53d6 API Key\uff1a<\/p>\n<p>https:\/\/serpapi.com\/users\/sign_in<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/8f3acffe550ec6a.png\" alt=\"\" \/><\/p>\n<p>3.\u6dfb\u52a0<strong>\u4ee3\u7801\u6267\u884c<\/strong>\u8282\u70b9\u3002\u7531\u4e8e\u641c\u7d22\u5de5\u5177\u7684\u8f93\u51fa\u5185\u5bb9\u4e3a\u4e00\u6bb5 JSON \u4ee3\u7801\uff0c\u56e0\u6b64\u9700\u8981\u6dfb\u52a0\u4ee3\u7801\u6267\u884c\u8282\u70b9\u63d0\u53d6\u5fc5\u8981\u7684\u5185\u5bb9\u3002\u8f93\u5165\u53d8\u91cf\u586b\u5199\u641c\u7d22\u5de5\u5177\u7684 JSON \u8f93\u51fa\u53d8\u91cf\uff0c\u5e76\u5728\u4ee3\u7801\u6267\u884c\u8282\u70b9\u5185\u586b\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre><code>def main(json: list) -&gt; dict:\r\n# \u63d0\u53d6 organic_results \u5185\u5bb9\r\norganic_results = json[0].get(\"organic_results\", [])\r\n# \u5c06\u6240\u6709\u7684\u6807\u9898\u548c\u94fe\u63a5\u62fc\u63a5\u4e3a\u4e00\u4e2a\u5b57\u7b26\u4e32\r\nresult_string = \"\"\r\nfor item in organic_results:\r\nresult_string += (\r\nf\"Title: {item['title']}\\n\"\r\nf\"Link: {item['link']}\\n\"\r\nf\"Snippet: {item['snippet']}\\n\\n\"\r\n)\r\n# \u8fd4\u56de\u62fc\u63a5\u540e\u7684\u5b57\u7b26\u4e32\u4f5c\u4e3a result\r\nreturn {\r\n\"result\": result_string,\r\n}\r\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/790a34b42fac095.png\" alt=\"\" \/><\/p>\n<ol start=\"4\">\n<li>\u6dfb\u52a0 LLM \u8282\u70b9\uff0c\u9009\u62e9 Ollama \u6846\u67b6\u5185\u7684 <code>deepseek-r1:7b<\/code> \u6a21\u578b\uff0c\u5e76\u5728\u7cfb\u7edf\u63d0\u793a\u8bcd\u5185\u6dfb\u52a0\u00a0<code>{{#sys.query#}}<\/code>\u00a0\u53d8\u91cf\u4ee5\u5904\u7406\u6765\u81ea\u8d77\u59cb\u8282\u70b9\u7531\u7528\u6237\u8f93\u5165\u7684\u6307\u4ee4\u3002<\/li>\n<\/ol>\n<blockquote><p>\u5982\u9047 API \u5f02\u5e38\uff0c\u53ef\u4ee5\u901a\u8fc7\u8d1f\u8f7d\u5747\u8861\u529f\u80fd\u6216\u5f02\u5e38\u5904\u7406\u8282\u70b9\u8fdb\u884c\u7075\u6d3b\u5904\u7406\u3002<\/p>\n<p><strong>\u8d1f\u8f7d\u5747\u8861<\/strong>\u53ef\u4ee5\u901a\u8fc7\u5728\u591a\u4e2a API \u7aef\u70b9\u4e4b\u95f4\u5206\u914d API \u8bf7\u6c42\uff0c\u8be6\u7ec6\u8bf4\u660e\u8bf7\u53c2\u8003\uff1ahttps:\/\/docs.dify.ai\/zh-hans\/guides\/model-configuration\/load-balancing<\/p>\n<p><strong>\u5f02\u5e38\u5904\u7406\u673a\u5236<\/strong>\u80fd\u591f\u5728\u8282\u70b9\u53d1\u751f\u9519\u8bef\u65f6\u629b\u51fa\u6545\u969c\u4fe1\u606f\u800c\u4e0d\u4e2d\u65ad\u4e3b\u6d41\u7a0b\u3002\u8be6\u7ec6\u8bf4\u660e\u8bf7\u53c2\u8003\uff1ahttps:\/\/docs.dify.ai\/zh-hans\/guides\/workflow\/error-handling<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/d53d6af9cdd09f0.png\" alt=\"\" \/><\/p>\n<ol start=\"5\">\n<li>\u6dfb\u52a0\u7ed3\u675f\u8282\u70b9\uff0c\u5f15\u7528 LLM \u8282\u70b9\u7684\u8f93\u51fa\u53d8\u91cf\u5e76\u5b8c\u6210\u914d\u7f6e\u3002\u4f60\u53ef\u4ee5\u5728\u9884\u89c8\u6846\u4e2d\u8f93\u5165\u5185\u5bb9\u4ee5\u8fdb\u884c\u6d4b\u8bd5\u3002\u751f\u6210\u7b54\u590d\u540e\u610f\u5473\u7740 AI \u5e94\u7528\u7684\u642d\u5efa\u5df2\u5b8c\u6210\uff0c\u4f60\u53ef\u4ee5\u5728\u65e5\u5fd7\u5185\u67e5\u770b LLM \u7684\u63a8\u7406\u8fc7\u7a0b\u3002<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/0850c99b27c7876.png\" alt=\"\" \/><\/p>\n<p><strong>\u5e38\u89c1\u95ee\u9898<\/strong><\/p>\n<p><strong>1. Docker \u90e8\u7f72\u65f6\u7684\u8fde\u63a5\u9519\u8bef<\/strong><\/p>\n<p>\u5f53\u4f7f\u7528 Docker \u90e8\u7f72 Dify \u548c Ollama \u65f6\uff0c\u53ef\u80fd\u9047\u5230\u4ee5\u4e0b\u9519\u8bef\uff1a<\/p>\n<pre><code>HTTPConnectionPool(host=127.0.0.1, port=11434): Max retries exceeded with URL: \/cpi\/chat \r\n(Caused by NewConnectionError('&lt;urllib3.connection.HTTPConnection object at 0x7f8562812c20&gt;: \r\nFailed to establish a new connection: [Errno 111] Connection refused'))\r\nHTTPConnectionPool(host=localhost, port=11434): Max retries exceeded with URL: \/cpi\/chat \r\n(Caused by NewConnectionError('&lt;urllib3.connection.HTTPConnection object at 0x7f8562812c20&gt;: \r\nFailed to establish a new connection: [Errno 111] Connection refused'))\r\n<\/code><\/pre>\n<p>\u9519\u8bef\u539f\u56e0\uff1a\u6b64\u9519\u8bef\u53d1\u751f\u662f\u56e0\u4e3a Ollama \u670d\u52a1\u5728 Docker \u5bb9\u5668\u4e2d\u65e0\u6cd5\u8bbf\u95ee\u3002localhost \u901a\u5e38\u6307\u5411\u5bb9\u5668\u672c\u8eab\uff0c\u800c\u4e0d\u662f\u4e3b\u673a\u6216\u5176\u4ed6\u5bb9\u5668\u3002\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u9700\u8981\u5c06 Ollama \u670d\u52a1\u66b4\u9732\u5230\u7f51\u7edc\u4e2d\u3002<\/p>\n<p><strong>macOS \u73af\u5883\u914d\u7f6e\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u5982\u679c Ollama \u4f5c\u4e3a macOS \u5e94\u7528\u8fd0\u884c\uff0c\u9700\u8981\u4f7f\u7528 launchctl \u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n<ol>\n<li>\u901a\u8fc7\u8c03\u7528 launchctl setenv \u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1a\n<pre><code>launchctl setenv OLLAMA_HOST \"0.0.0.0\"\r\n<\/code><\/pre>\n<\/li>\n<li>\u91cd\u542f Ollama \u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<li>\u5982\u679c\u4ee5\u4e0a\u6b65\u9aa4\u65e0\u6548\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a\u95ee\u9898\u662f\u5728 docker \u5185\u90e8\uff0c\u4f60\u5e94\u8be5\u8fde\u63a5\u5230 host.docker.internal\uff0c\u624d\u80fd\u8bbf\u95ee docker \u7684\u4e3b\u673a\uff0c\u6240\u4ee5\u5c06 localhost \u66ff\u6362\u4e3a host.docker.internal \u670d\u52a1\u5c31\u53ef\u4ee5\u751f\u6548\u4e86\uff1ahttp:\/\/host.docker.internal:11434<\/li>\n<\/ol>\n<p><strong>Linux \u73af\u5883\u914d\u7f6e\u65b9\u6cd5\uff1a<\/strong> \u5982\u679c Ollama \u4f5c\u4e3a systemd \u670d\u52a1\u8fd0\u884c\uff0c\u5e94\u8be5\u4f7f\u7528\u00a0<code>s ystemctl <\/code>\u00a0\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n<ol>\n<li>\u901a\u8fc7\u8c03\u7528 <code>systemctl edit ollama.service<\/code>\u00a0\u7f16\u8f91 systemd \u670d\u52a1\u3002\u8fd9\u5c06\u6253\u5f00\u4e00\u4e2a\u7f16\u8f91\u5668\u3002<\/li>\n<li>\u5bf9\u4e8e\u6bcf\u4e2a\u73af\u5883\u53d8\u91cf\uff0c\u5728 <code>[Service]<\/code> \u90e8\u5206\u4e0b\u6dfb\u52a0\u4e00\u884c\u00a0<code>Environment<\/code>\uff1a\n<pre><code>[Service]\r\nEnvironment=\"OLLAMA_HOST=0.0.0.0\"\r\n<\/code><\/pre>\n<\/li>\n<li>\u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/li>\n<li>\u91cd\u8f7d systemd \u5e76\u91cd\u542f Ollama\uff1a\n<pre><code>systemctl daemon-reload\r\nsystemctl restart ollama\r\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p><strong>Windows \u73af\u5883\u914d\u7f6e\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u5728 Windows \u4e0a\uff0cOllama \u7ee7\u627f\u4e86\u4f60\u7684\u7528\u6237\u548c\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<ol>\n<li>\u9996\u5148\u901a\u8fc7\u4efb\u52a1\u680f\u70b9\u51fb Ollama \u9000\u51fa\u7a0b\u5e8f<\/li>\n<li>\u4ece\u63a7\u5236\u9762\u677f\u7f16\u8f91\u7cfb\u7edf\u73af\u5883\u53d8\u91cf<\/li>\n<li>\u4e3a\u4f60\u7684\u7528\u6237\u8d26\u6237\u7f16\u8f91\u6216\u65b0\u5efa\u53d8\u91cf\uff0c\u6bd4\u5982 <code>OLLAMA_HOST<\/code>\u3001<code>OLLAMA_MODELS<\/code>\u00a0\u7b49\u3002<\/li>\n<li>\u70b9\u51fb OK \/ \u5e94\u7528\u4fdd\u5b58<\/li>\n<li>\u5728\u4e00\u4e2a\u65b0\u7684\u7ec8\u7aef\u7a97\u53e3\u8fd0\u884c <code>ollama<\/code><\/li>\n<\/ol>\n<p><strong>2. \u5982\u4f55\u4fee\u6539 Ollama \u670d\u52a1\u5730\u5740\u548c\u7aef\u53e3\u53f7\uff1f<\/strong><\/p>\n<p>Ollama \u9ed8\u8ba4\u7ed1\u5b9a <code>127.0.0.1<\/code> \u7aef\u53e3 11434\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u00a0<code>OLLAMA_HOST<\/code>\u00a0\u73af\u5883\u53d8\u91cf\u66f4\u6539\u7ed1\u5b9a\u5730\u5740\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u60f3\u8c61\u4e00\u4e0b\uff0c\u62e5\u6709\u4e00\u6b3e\u72ec\u7acb\u8fd0\u884c\u3001\u5168\u7a0b\u4fdd\u5bc6\u3001\u8fd8\u80fd\u591f\u5206\u6790\u672c\u5730\u6587\u672c\u5185\u5bb9\uff0c\u968f\u65f6\u63d0\u4f9b\u7cbe\u51c6\u7684\u5bf9\u8bdd\u670d\u52a1\uff0c\u5e76\u4e14\u5177\u5907\u8054\u7f51\u641c\u7d22\u80fd\u529b\u7684\u79c1\u6709\u5316 AI \u5e94\u7528\u662f\u4e00\u79cd\u600e\u6837\u7684\u4f53\u9a8c\uff1f\u672c\u6587\u5c06\u5e26\u4f60\u4e00\u6b65\u6b65\u642d\u5efa\u00a0DeepSeek + Ollama + Dify\u00a0\uff0c\u5feb\u901f\u90e8\u7f72\u5168\u529f\u80fd\u7684\u79c1\u6709\u5316&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61786,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[182,20],"tags":[],"class_list":["post-20420","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shicao","category-tool"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/20420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/comments?post=20420"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/20420\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/media\/61786"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/media?parent=20420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/categories?post=20420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/tags?post=20420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}