{"id":5687,"date":"2025-09-20T14:34:52","date_gmt":"2025-09-20T06:34:52","guid":{"rendered":"http:\/\/xinblog.ltd\/?p=5687"},"modified":"2025-09-22T17:27:15","modified_gmt":"2025-09-22T09:27:15","slug":"7-fastgpt-%e9%85%8d%e7%bd%ae%e6%a8%a1%e5%9e%8b","status":"publish","type":"post","link":"http:\/\/xinblog.ltd\/?p=5687","title":{"rendered":"7.FastGPT \u914d\u7f6e\u6a21\u578b"},"content":{"rendered":"<p>7. FastGPT \u914d\u7f6e\u6a21\u578b<\/p>\n<p>\u672c\u6b21\u6211\u4eec\u8bf4\u4e0bFastGPT\u4e2d\u5982\u4f55\u63a5\u5165\u6a21\u578b<\/p>\n<p>\u5206\u4e3a\u4e86\u901a\u8fc7AI Proxy\u63a5\u5165\u548cOneAPI\u63a5\u5165<\/p>\n<p>\u540c\u65f6\u8fd8\u4f1a\u8bb2\u89e3\u5982\u4f55\u63a5\u5165\u672c\u5730\u6a21\u578b\uff0c\u5206\u4e3a\u4e86Ollama\u548cXinference\u4e24\u79cd<\/p>\n<p>\u5728FastGPT\u4e2d\uff0c\u5e38\u89c1\u7684\u63a5\u5165\u662fAI proxy\uff0c\u5176\u662f\u63d0\u524d\u914d\u7f6e\u597d\u4e86\u5f88\u591a\u6a21\u578b\uff0c\u4ece\u800c\u65b9\u4fbf\u7528\u6237\u5bf9\u63a5\u3002<\/p>\n<p>\u9664\u6b64\u5916\u8fd8\u53ef\u4ee5\u4f7f\u7528OneAPI\u6765\u8fdb\u884c\u63a5\u5165\u3002\u6709OneAPI\u4f5c\u4e3a\u4e00\u4e2a\u4ee3\u7406\uff0c\u9762\u5411FastGPT\u8fdb\u884c\u8c03\u7528\u3002<\/p>\n<p>\u9996\u5148\u662fAI Proxy\u7684\u63a5\u5165\uff0c\u5982\u679c\u662fdocker-compose\u90e8\u7f72\u7684\u8bdd\uff0c\u5219\u9ed8\u8ba4\u52a0\u5165\u4e86AI Proxy\u7684\u914d\u7f6e<\/p>\n<p>\u5bf9\u4e8eAI Proxy\u7684\u4f7f\u7528\uff0c\u76f8\u5bf9\u6765\u8bf4\u6bd4\u8f83\u5bb9\u6613\uff0c\u53ef\u4ee5\u8bf4\u662f\u5f00\u7bb1\u5373\u7528\u3002<\/p>\n<p>\u9700\u8981\u5148\u521b\u5efa\u4e00\u4e2a\u6e20\u9053\uff0c\u5728\u6a21\u578b\u63d0\u4f9b\u5546\u9875\u9762\uff0c\u70b9\u51fb\u6a21\u578b\u6e20\u9053\uff0c\u8fdb\u884c\u6e20\u9053\u914d\u7f6e<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"914\" height=\"534\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-21.png\" class=\"wp-image-5688\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-21.png 914w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-21-300x175.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-21-768x449.png 768w\" sizes=\"(max-width: 914px) 100vw, 914px\" \/><\/p>\n<p>\u5728\u65b0\u589e\u6e20\u9053\u4e4b\u4e2d\uff0c\u586b\u5165\u5382\u5546\uff0c\u9009\u62e9\u6a21\u578b\u540e\uff0c\u8f93\u5165\u4ee3\u7406\u5730\u5740\u548c\u5b98\u65b9\u7684API\u5bc6\u94a5\u5373\u53ef\uff0c\u8fd9\u91cc\u548cDify\u7684\u4f7f\u7528\u4e00\u6837\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"495\" height=\"447\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-22.png\" class=\"wp-image-5689\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-22.png 495w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-22-300x271.png 300w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/p>\n<p>\u901a\u8fc7\u914d\u7f6e\u5bc6\u94a5\u53ca\u9009\u62e9\u7684\u6a21\u578b\u5217\u8868\uff0c\u589e\u52a0\u4e86\u6a21\u578b\u63d0\u4f9b\u5546\u3002<\/p>\n<p>\u4e4b\u540e\u5c31\u53ef\u4ee5\u542f\u7528\u6a21\u578b\u4e86<\/p>\n<p>\u5982\u679c\u6a21\u578b\u662fFastGPT\u63d0\u524d\u5b9a\u4e49\u597d\u7684\uff0c\u76f4\u63a5\u70b9\u51fb\u542f\u7528\u5373\u53ef\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"496\" height=\"278\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-23.png\" class=\"wp-image-5690\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-23.png 496w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-23-300x168.png 300w\" sizes=\"(max-width: 496px) 100vw, 496px\" \/><\/p>\n<p>\u4f46\u662f\u5982\u679c\u4e0d\u662f\u7cfb\u7edf\u5185\u7f6e\u6a21\u578b\uff0c\u90a3\u4e48\u53ef\u4ee5\u6dfb\u52a0\u81ea\u5b9a\u4e49\u6a21\u578b\uff0c\u5728\u81ea\u5b9a\u4e49\u6a21\u578b\u4e2d\uff0c\u5982\u679c\u6a21\u578bID\u548c\u7cfb\u7edf\u5185\u7f6eID\u4e00\u81f4\uff0c\u90a3\u4e48\u4f1a\u88ab\u8ba4\u4e3a\u4fee\u6539\u7cfb\u7edf\u6a21\u578b\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1052\" height=\"274\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-24.png\" class=\"wp-image-5691\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-24.png 1052w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-24-300x78.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-24-1024x267.png 1024w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-24-768x200.png 768w\" sizes=\"(max-width: 1052px) 100vw, 1052px\" \/><\/p>\n<p>\u540c\u65f6\u8fd8\u652f\u6301\u914d\u7f6e\u6587\u4ef6\u5f0f\u7684\u65b0\u589e\u6a21\u578b<\/p>\n<p>\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u5b57\u6bb5\u53ef\u4ee5\u53c2\u8003\u6b64\u94fe\u63a5<\/p>\n<p><a href=\"https:\/\/doc.fastgpt.cn\/docs\/development\/modelconfig\/intro\/\">https:\/\/doc.fastgpt.cn\/docs\/development\/modelconfig\/intro\/<\/a><\/p>\n<p>\u5728\u7cfb\u7edf\u914d\u7f6e\u9875\u9762\uff0c\u8fd8\u5b58\u5728\u4e00\u4e2a\u8c03\u7528\u65e5\u5fd7\u7684\u9875\u9762\u3002\u6b64\u9875\u9762\u53ef\u4ee5\u67e5\u770b\u53d1\u9001\u7ed9\u6a21\u578b\u7684\u8bf7\u6c42\u8bb0\u5f55\uff0c\u5305\u62ec\u5177\u4f53\u7684\u8f93\u5165\u8f93\u51fa\uff0ctokens\u7b49\u3002<\/p>\n<p>\u8fd9\u9875\u9762\u7684\u4fe1\u606f\u4f1a\u4fdd\u75591\u5c0f\u65f6\u3002<\/p>\n<p>\u9664\u6b64\u5916\u5c31\u662fOneAPI\uff0cFastGPT\u65e9\u671f\u901a\u8fc7OneAPI\u4f5c\u4e3a\u4ee3\u7406\u6765\u5b9e\u73b0\u4e0d\u540c\u6a21\u578b\u7684\u5bf9\u63a5\u3002<\/p>\n<p>\u56e0\u6b64\u9700\u8981\u5728\u63a5\u5165\u6a21\u578b\u7684\u65f6\u5019\uff0c\u5148\u5728OneAPI\u4e4b\u4e2d\u914d\u7f6e\u4e00\u904d\u53c2\u6570\uff0c\u518d\u5728FastGPT\u4e2d\u914d\u7f6e\u4e00\u904d\u53c2\u6570\u3002<\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u4ee5Docker-compose\u7684\u65b9\u5f0f\u90e8\u7f72OneAPI<\/p>\n<p>\u9ed8\u8ba43000\u7aef\u53e3\u8fdb\u884c\u8bbf\u95ee\uff0c\u8fd9\u91cc\u53ef\u4ee5\u901a\u8fc7docker-compose.yml\u9009\u5b9a\u8fdb\u884c\u65b0\u7684\u7aef\u53e3\u6620\u5c04\u3002<\/p>\n<p>\u5728\u8fdb\u5165OneAPI\u4e4b\u540e\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u6e20\u9053<\/p>\n<p>\u4e00\u4e2a\u6e20\u9053\u7c7b\u4f3c\u4e00\u4e2a\u4f9b\u5e94\u5546\u3002\u6bd4\u5982\u914d\u7f6eOpenAI\u7684\u6e20\u9053<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"805\" height=\"458\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-25.png\" class=\"wp-image-5692\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-25.png 805w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-25-300x171.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-25-768x437.png 768w\" sizes=\"(max-width: 805px) 100vw, 805px\" \/><\/p>\n<p>\u4e4b\u540e\u53ef\u4ee5\u521b\u5efaOneAPI\u91cd\u7684Api key\u6765\u4f7f\u7528\u3002<\/p>\n<p>\u8fd9\u65f6\u5019\u8fd8\u9700\u8981\u5728FastGPT\u4e2d\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5c06\u539f\u672c\u7684AI proxy\u6539\u4e3aOneAPI<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"924\" height=\"181\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-26.png\" class=\"wp-image-5693\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-26.png 924w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-26-300x59.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-26-768x150.png 768w\" sizes=\"(max-width: 924px) 100vw, 924px\" \/><\/p>\n<p>\u4eceFastGPT\u7684\u9ed8\u8ba4\u914d\u7f6e\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0cFastGPT\u672c\u8eab\u4e5f\u662f\u63a8\u8350\u4f7f\u7528AI Proxy\u800c\u975eOneAPI\u7684\u3002<\/p>\n<p>\u5176\u6b21\u5bf9\u4e8e\u672c\u5730\u6a21\u578b\uff0c\u5e38\u89c1\u7684\u8fd0\u884c\u65b9\u5f0f\u6709Ollama\u548cXinference\u4e24\u79cd<\/p>\n<p>\u5982\u679c\u662f\u4f7f\u7528Ollama\u6765\u8fdb\u884c\u63a5\u5165\uff0c\u53ef\u4ee5\u4f7f\u7528AI proxy\u548cOneAPI\u4e24\u79cd\u3002<\/p>\n<p>\u5982\u679c\u662fAI proxy\u5219\u76f4\u63a5\u5728\u8d26\u53f7\u4e2d\u9009\u62e9\u65b0\u589e\u6e20\u9053<\/p>\n<p>\u7136\u540e\u5728\u6e20\u9053\u4e2d\u9009\u62e9Ollama\uff0c\u52a0\u5165\u81ea\u5df1\u62c9\u53d6\u7684\u6a21\u578b\uff0c\u586b\u5165\u4ee3\u7406\u5730\u5740\u5373\u53ef\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"911\" height=\"500\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-27.png\" class=\"wp-image-5694\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-27.png 911w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-27-300x165.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-27-768x422.png 768w\" sizes=\"(max-width: 911px) 100vw, 911px\" \/><\/p>\n<p>\u4e4b\u540e\u5c31\u53ef\u4ee5\u5728\u6a21\u578b\u9875\u9762\u9009\u62e9\u65b0\u589e\u6a21\u578b\u3002<\/p>\n<p>\u901a\u8fc7\u65b0\u589e\u7684\u65b9\u5f0f\u6765\u4fee\u6539\u6a21\u578b\u7684\u4f9b\u5e94\u5546\u65b9\u5f0f\u5373\u53ef\u3002<\/p>\n<p>\u540c\u6837\uff0c\u5982\u679c\u662fOneAPI\u7684\u65b9\u5f0f\u8fdb\u884c\u8bbf\u95ee\uff0c\u5219\u9700\u8981\u5728OneAPI\u4e2d\u521b\u5efa\u65b0\u7684\u6e20\u9053<\/p>\n<p>\u7136\u540e\u586b\u5165\u4ee3\u7406\u5730\u5740\u5373\u53ef\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1692\" height=\"1382\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-28.png\" class=\"wp-image-5695\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-28.png 1692w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-28-300x245.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-28-1024x836.png 1024w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-28-768x627.png 768w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-28-1536x1255.png 1536w\" sizes=\"(max-width: 1692px) 100vw, 1692px\" \/><\/p>\n<p>\u4e4b\u540e\u5c31\u662f\u901a\u8fc7\u4ee4\u724c\u8fdb\u884c\u4f7f\u7528\u5373\u53ef\u3002<\/p>\n<p>\u6700\u540eFastGPT\u8fd8\u652f\u6301\u4e86\u76f4\u63a5\u63a5\u5165<\/p>\n<p>\u5728FastGPT\u7684docker-compose.yml\u6587\u6863\u4e2d\uff0c\u5c06AI-PROXY\u548cOneAPI\u76f8\u5173\u914d\u7f6e\u90fd\u8fdb\u884c\u6ce8\u91ca\uff0c\u5728OPENAI_BASE_URL\u4e2d\u52a0\u5165ollama\u5730\u5740\u5373\u53ef\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1220\" height=\"54\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-29.png\" class=\"wp-image-5696\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-29.png 1220w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-29-300x13.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-29-1024x45.png 1024w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-29-768x34.png 768w\" sizes=\"(max-width: 1220px) 100vw, 1220px\" \/><\/p>\n<p>\u4e4b\u540e\u662fXinference\u7684\u63a5\u5165<\/p>\n<p>\u5176\u63a5\u5165\u548cOllama\u7c7b\u4f3c\uff0c\u5982\u679c\u901a\u8fc7AI Proxy\u8fdb\u884c\u63a5\u5165<\/p>\n<p>\u4e5f\u662f\u9075\u5faa\u5148\u589e\u52a0\u6e20\u9053\uff0c\u7136\u540e\u65b0\u589e\u6a21\u578b\u7684\u64cd\u4f5c\u6d41\u7a0b<\/p>\n<p>\u5982\u679c\u662fOneAPI<\/p>\n<p>\u4e5f\u9700\u8981\u5148\u5728One API\u4e4b\u4e2d\u589e\u52a0\u4e00\u4e2aXinference\u670d\u52a1\u7684\u7aef\u70b9\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"701\" height=\"531\" src=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-30.png\" class=\"wp-image-5697\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-30.png 701w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2025\/05\/word-image-30-300x227.png 300w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/p>\n<p>\u7136\u540e\u5c06\u4ee4\u724c\u653e\u5165\u5230FastGPT\u4e4b\u4e2d\u4f7f\u7528<\/p>\n","protected":false},"excerpt":{"rendered":"<p>7. FastGPT \u914d\u7f6e\u6a21\u578b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[],"_links":{"self":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/5687"}],"collection":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5687"}],"version-history":[{"count":1,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/5687\/revisions"}],"predecessor-version":[{"id":5698,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/5687\/revisions\/5698"}],"wp:attachment":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5687"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}