mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-20 14:18:01 +00:00
1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9433],{3914:(i,n,e)=>{e.d(n,{A:()=>l});const l=e.p+"assets/images/provider-code-dd2f519bb074cc9099f6db27022f4e64.png"},4691:(i,n,e)=>{e.d(n,{A:()=>l});const l=e.p+"assets/images/provider-chat-5765d80a7d692bd0d90708fad9115a15.png"},6246:(i,n,e)=>{e.d(n,{R:()=>c,x:()=>d});var l=e(2155);const s={},r=l.createContext(s);function c(i){const n=l.useContext(r);return l.useMemo((function(){return"function"==typeof i?i(n):{...n,...i}}),[n,i])}function d(i){let n;return n=i.disableParentContext?"function"==typeof i.components?i.components(s):i.components||s:c(i.components),l.createElement(r.Provider,{value:n},i.children)}},7206:(i,n,e)=>{e.d(n,{A:()=>l});const l=e.p+"assets/images/provider-e66a8752306150814f886a41ec453fc8.png"},7671:(i,n,e)=>{e.r(n),e.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>a,frontMatter:()=>c,metadata:()=>l,toc:()=>t});const l=JSON.parse('{"id":"provider/siliconflow","title":"\u7845\u57fa\u6d41\u52a8 SiliconFlow \u5bf9\u63a5","description":"\u5fae\u8bed\u5bf9\u63a5\u7845\u57fa\u6d41\u52a8 SiliconFlow \u5927\u6a21\u578b\u7684\u914d\u7f6e\u8bf4\u660e\u548c\u6b65\u9aa4\u6307\u5357","source":"@site/i18n/zh-CN/docusaurus-plugin-content-docs/current/provider/siliconflow.md","sourceDirName":"provider","slug":"/provider/siliconflow","permalink":"/docs/zh-CN/docs/provider/siliconflow","draft":false,"unlisted":false,"editUrl":"https://github.com/bytedesk/bytedesk/docs/provider/siliconflow.md","tags":[],"version":"current","sidebarPosition":5,"frontMatter":{"title":"\u7845\u57fa\u6d41\u52a8 SiliconFlow \u5bf9\u63a5","sidebar_label":"SiliconFlow","sidebar_position":5,"description":"\u5fae\u8bed\u5bf9\u63a5\u7845\u57fa\u6d41\u52a8 SiliconFlow \u5927\u6a21\u578b\u7684\u914d\u7f6e\u8bf4\u660e\u548c\u6b65\u9aa4\u6307\u5357"},"sidebar":"tutorialSidebar","previous":{"title":"DashScope","permalink":"/docs/zh-CN/docs/provider/dashscope"},"next":{"title":"GiteeAi","permalink":"/docs/zh-CN/docs/provider/gitee"}}');var s=e(5723),r=e(6246);const c={title:"\u7845\u57fa\u6d41\u52a8 SiliconFlow \u5bf9\u63a5",sidebar_label:"SiliconFlow",sidebar_position:5,description:"\u5fae\u8bed\u5bf9\u63a5\u7845\u57fa\u6d41\u52a8 SiliconFlow \u5927\u6a21\u578b\u7684\u914d\u7f6e\u8bf4\u660e\u548c\u6b65\u9aa4\u6307\u5357"},d=void 0,o={},t=[{value:"\u914d\u7f6e\u8bf4\u660e",id:"\u914d\u7f6e\u8bf4\u660e",level:2},{value:"Docker\u90e8\u7f72\u914d\u7f6e\u53c2\u6570",id:"docker\u90e8\u7f72\u914d\u7f6e\u53c2\u6570",level:3},{value:"\u6e90\u7801\u90e8\u7f72\u914d\u7f6e\u53c2\u6570",id:"\u6e90\u7801\u90e8\u7f72\u914d\u7f6e\u53c2\u6570",level:3},{value:"\u914d\u7f6e\u6b65\u9aa4",id:"\u914d\u7f6e\u6b65\u9aa4",level:2},{value:"1. \u83b7\u53d6 API Key",id:"1-\u83b7\u53d6-api-key",level:3},{value:"2. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6",id:"2-\u4fee\u6539\u914d\u7f6e\u6587\u4ef6",level:3},{value:"3. \u7ba1\u7406\u540e\u53f0\u914d\u7f6e",id:"3-\u7ba1\u7406\u540e\u53f0\u914d\u7f6e",level:3},{value:"4. \u83b7\u53d6\u804a\u5929\u4ee3\u7801",id:"4-\u83b7\u53d6\u804a\u5929\u4ee3\u7801",level:3},{value:"\u6548\u679c\u5c55\u793a",id:"\u6548\u679c\u5c55\u793a",level:2},{value:"\u5e38\u89c1\u95ee\u9898",id:"\u5e38\u89c1\u95ee\u9898",level:2},{value:"\u76f8\u5173\u8d44\u6e90",id:"\u76f8\u5173\u8d44\u6e90",level:2}];function h(i){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...i.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.admonition,{title:"\u524d\u7f6e\u6761\u4ef6",type:"tip",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"\u5df2\u90e8\u7f72\u5fae\u8bed\u7cfb\u7edf"}),"\n",(0,s.jsxs)(n.li,{children:["\u5df2\u7533\u8bf7\u7845\u57fa\u6d41\u52a8 SiliconFlow API Key\uff08\u7533\u8bf7\u5730\u5740\uff1a",(0,s.jsx)(n.a,{href:"https://www.siliconflow.cn",children:"https://www.siliconflow.cn"}),"\uff09"]}),"\n"]})}),"\n",(0,s.jsx)(n.h2,{id:"\u914d\u7f6e\u8bf4\u660e",children:"\u914d\u7f6e\u8bf4\u660e"}),"\n",(0,s.jsx)(n.h3,{id:"docker\u90e8\u7f72\u914d\u7f6e\u53c2\u6570",children:"Docker\u90e8\u7f72\u914d\u7f6e\u53c2\u6570"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# \u7845\u57fa\u6d41\u52a8 API \u914d\u7f6e\nSPRING_AI_SILICONFLOW_BASE_URL: 'https://api.siliconflow.cn' # \u7845\u57fa\u6d41\u52a8 API \u57fa\u7840\u5730\u5740\nSPRING_AI_SILICONFLOW_API_KEY: 'sk-xxxx' # \u66ff\u6362\u4e3a\u4f60\u7684\u7845\u57fa\u6d41\u52a8 API Key\nSPRING_AI_SILICONFLOW_CHAT_ENABLED: true # \u542f\u7528\u7845\u57fa\u6d41\u52a8\u5bf9\u8bdd\u529f\u80fd\n\n# \u6a21\u578b\u914d\u7f6e\nSPRING_AI_SILICONFLOW_CHAT_OPTIONS_MODEL: Qwen/QwQ-32B # \u6a21\u578b\u540d\u79f0\nSPRING_AI_SILICONFLOW_CHAT_OPTIONS_TEMPERATURE: 0.7 # \u6e29\u5ea6\u53c2\u6570\uff0c\u63a7\u5236\u8f93\u51fa\u7684\u968f\u673a\u6027\uff0c\u8303\u56f4 0-1\n"})}),"\n",(0,s.jsx)(n.h3,{id:"\u6e90\u7801\u90e8\u7f72\u914d\u7f6e\u53c2\u6570",children:"\u6e90\u7801\u90e8\u7f72\u914d\u7f6e\u53c2\u6570"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# \u7845\u57fa\u6d41\u52a8 API \u914d\u7f6e\nspring.ai.siliconflow.base-url=https://api.siliconflow.cn # \u7845\u57fa\u6d41\u52a8 API \u57fa\u7840\u5730\u5740\nspring.ai.siliconflow.api-key=sk-xxxx # \u66ff\u6362\u4e3a\u4f60\u7684\u7845\u57fa\u6d41\u52a8 API Key\nspring.ai.siliconflow.chat.enabled=true # \u542f\u7528\u7845\u57fa\u6d41\u52a8\u5bf9\u8bdd\u529f\u80fd\n\n# \u6a21\u578b\u914d\u7f6e\nspring.ai.siliconflow.chat.options.model=Qwen/QwQ-32B # \u6a21\u578b\u540d\u79f0\nspring.ai.siliconflow.chat.options.temperature=0.7 # \u6e29\u5ea6\u53c2\u6570\uff0c\u63a7\u5236\u8f93\u51fa\u7684\u968f\u673a\u6027\uff0c\u8303\u56f4 0-1\n"})}),"\n",(0,s.jsx)(n.h2,{id:"\u914d\u7f6e\u6b65\u9aa4",children:"\u914d\u7f6e\u6b65\u9aa4"}),"\n",(0,s.jsx)(n.h3,{id:"1-\u83b7\u53d6-api-key",children:"1. \u83b7\u53d6 API Key"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\u8bbf\u95ee\u7845\u57fa\u6d41\u52a8\u5b98\u7f51\uff1a",(0,s.jsx)(n.a,{href:"https://www.siliconflow.cn",children:"https://www.siliconflow.cn"})]}),"\n",(0,s.jsx)(n.li,{children:"\u6ce8\u518c\u5e76\u767b\u5f55\u8d26\u53f7"}),"\n",(0,s.jsx)(n.li,{children:"\u5728\u63a7\u5236\u53f0\u521b\u5efa API Key"}),"\n",(0,s.jsx)(n.li,{children:"\u4fdd\u5b58\u751f\u6210\u7684 API Key"}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"2-\u4fee\u6539\u914d\u7f6e\u6587\u4ef6",children:"2. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6"}),"\n",(0,s.jsx)(n.admonition,{title:"\u914d\u7f6e\u8bf4\u660e",type:"tip",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\u5c06\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684 ",(0,s.jsx)(n.code,{children:"sk-xxxx"})," \u66ff\u6362\u4e3a\u4f60\u83b7\u53d6\u7684 API Key"]}),"\n",(0,s.jsx)(n.li,{children:"\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8c03\u6574 temperature \u53c2\u6570"}),"\n",(0,s.jsx)(n.li,{children:"\u6839\u636e\u9700\u6c42\u5f00\u542f\u6216\u5173\u95ed\u6587\u672c\u5d4c\u5165\u529f\u80fd"}),"\n"]})}),"\n",(0,s.jsx)(n.h3,{id:"3-\u7ba1\u7406\u540e\u53f0\u914d\u7f6e",children:"3. \u7ba1\u7406\u540e\u53f0\u914d\u7f6e"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"\u767b\u5f55\u5fae\u8bed\u7ba1\u7406\u540e\u53f0"}),"\n",(0,s.jsx)(n.li,{children:"\u8fdb\u5165 AI \u6a21\u578b\u914d\u7f6e\u9875\u9762"}),"\n",(0,s.jsx)(n.li,{children:"\u9009\u62e9\u7845\u57fa\u6d41\u52a8\u4f5c\u4e3a\u9ed8\u8ba4\u6a21\u578b"}),"\n",(0,s.jsx)(n.li,{children:"\u4fdd\u5b58\u914d\u7f6e"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.img,{alt:"provider",src:e(7206).A+"",width:"2304",height:"1396"}),"\n",(0,s.jsx)(n.img,{alt:"provider-choose",src:e(9294).A+"",width:"3032",height:"1394"})]}),"\n",(0,s.jsx)(n.h3,{id:"4-\u83b7\u53d6\u804a\u5929\u4ee3\u7801",children:"4. \u83b7\u53d6\u804a\u5929\u4ee3\u7801"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:'\u5728\u7ba1\u7406\u540e\u53f0\u627e\u5230"\u83b7\u53d6\u804a\u5929\u4ee3\u7801"\u9009\u9879'}),"\n",(0,s.jsx)(n.li,{children:"\u590d\u5236\u751f\u6210\u7684\u4ee3\u7801"}),"\n",(0,s.jsx)(n.li,{children:"\u5c06\u4ee3\u7801\u96c6\u6210\u5230\u4f60\u7684\u7f51\u7ad9\u4e2d"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"provider-code",src:e(3914).A+"",width:"2240",height:"1038"})}),"\n",(0,s.jsx)(n.h2,{id:"\u6548\u679c\u5c55\u793a",children:"\u6548\u679c\u5c55\u793a"}),"\n",(0,s.jsx)(n.p,{children:"\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u7f51\u7ad9\u4e2d\u770b\u5230\u5982\u4e0b\u6548\u679c\uff1a"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"provider-chat",src:e(4691).A+"",width:"834",height:"1210"})}),"\n",(0,s.jsx)(n.h2,{id:"\u5e38\u89c1\u95ee\u9898",children:"\u5e38\u89c1\u95ee\u9898"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"API Key \u65e0\u6548"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"\u68c0\u67e5 API Key \u662f\u5426\u6b63\u786e\u590d\u5236"}),"\n",(0,s.jsx)(n.li,{children:"\u786e\u8ba4 API Key \u662f\u5426\u5df2\u6fc0\u6d3b"}),"\n",(0,s.jsx)(n.li,{children:"\u9a8c\u8bc1 API Key \u7684\u6743\u9650\u8bbe\u7f6e"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"\u5bf9\u8bdd\u54cd\u5e94\u6162"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5"}),"\n",(0,s.jsx)(n.li,{children:"\u786e\u8ba4\u670d\u52a1\u5668\u914d\u7f6e\u662f\u5426\u6ee1\u8db3\u8981\u6c42"}),"\n",(0,s.jsx)(n.li,{children:"\u53ef\u4ee5\u9002\u5f53\u8c03\u6574 temperature \u53c2\u6570"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"\u529f\u80fd\u5f02\u5e38"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"\u68c0\u67e5\u76f8\u5e94\u529f\u80fd\u7684\u5f00\u5173\u662f\u5426\u5df2\u542f\u7528"}),"\n",(0,s.jsx)(n.li,{children:"\u786e\u8ba4 API Key \u662f\u5426\u652f\u6301\u8be5\u529f\u80fd"}),"\n",(0,s.jsx)(n.li,{children:"\u67e5\u770b\u670d\u52a1\u5668\u65e5\u5fd7\u6392\u67e5\u5177\u4f53\u539f\u56e0"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"\u76f8\u5173\u8d44\u6e90",children:"\u76f8\u5173\u8d44\u6e90"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.siliconflow.cn/documentation",children:"\u7845\u57fa\u6d41\u52a8\u6587\u6863\u4e2d\u5fc3"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://docs.spring.io/spring-ai/reference/api/chat/siliconflow-chat.html",children:"Spring AI \u6587\u6863"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/intro",children:"\u5fae\u8bed\u6587\u6863\u4e2d\u5fc3"})}),"\n"]})]})}function a(i={}){const{wrapper:n}={...(0,r.R)(),...i.components};return n?(0,s.jsx)(n,{...i,children:(0,s.jsx)(h,{...i})}):h(i)}},9294:(i,n,e)=>{e.d(n,{A:()=>l});const l=e.p+"assets/images/provider-choose-1683a1a889ce5941081af8dc52613fd2.png"}}]); |