mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-20 06:07:53 +00:00
1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9538],{5108:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>a,frontMatter:()=>c,metadata:()=>s,toc:()=>t});const s=JSON.parse('{"id":"provider/volcengine","title":"\u706b\u5c71\u5f15\u64ce \u5927\u6a21\u578b\u5bf9\u63a5","description":"\u5fae\u8bed\u5bf9\u63a5 \u706b\u5c71\u5f15\u64ce \u5927\u6a21\u578b\u7684\u914d\u7f6e\u8bf4\u660e\u548c\u6b65\u9aa4\u6307\u5357","source":"@site/i18n/zh-CN/docusaurus-plugin-content-docs/current/provider/volcengine.md","sourceDirName":"provider","slug":"/provider/volcengine","permalink":"/docs/zh-CN/docs/provider/volcengine","draft":false,"unlisted":false,"editUrl":"https://github.com/bytedesk/bytedesk/docs/provider/volcengine.md","tags":[],"version":"current","sidebarPosition":8,"frontMatter":{"title":"\u706b\u5c71\u5f15\u64ce \u5927\u6a21\u578b\u5bf9\u63a5","sidebar_label":"VolcEngine","sidebar_position":8,"description":"\u5fae\u8bed\u5bf9\u63a5 \u706b\u5c71\u5f15\u64ce \u5927\u6a21\u578b\u7684\u914d\u7f6e\u8bf4\u660e\u548c\u6b65\u9aa4\u6307\u5357"},"sidebar":"tutorialSidebar","previous":{"title":"Baidu","permalink":"/docs/zh-CN/docs/provider/baidu"},"next":{"title":"Solutions","permalink":"/docs/zh-CN/docs/category/solutions"}}');var l=i(5723),r=i(6246);const c={title:"\u706b\u5c71\u5f15\u64ce \u5927\u6a21\u578b\u5bf9\u63a5",sidebar_label:"VolcEngine",sidebar_position:8,description:"\u5fae\u8bed\u5bf9\u63a5 \u706b\u5c71\u5f15\u64ce \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(e){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)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.admonition,{title:"\u524d\u7f6e\u6761\u4ef6",type:"tip",children:(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"\u5df2\u90e8\u7f72\u5fae\u8bed\u7cfb\u7edf"}),"\n",(0,l.jsxs)(n.li,{children:["\u5df2\u7533\u8bf7 \u706b\u5c71\u5f15\u64ce API Key\uff08\u7533\u8bf7\u5730\u5740\uff1a",(0,l.jsx)(n.a,{href:"https://console.volcengine.com/ark/apiKey",children:"https://console.volcengine.com/ark/apiKey"}),"\uff09"]}),"\n"]})}),"\n",(0,l.jsx)(n.h2,{id:"\u914d\u7f6e\u8bf4\u660e",children:"\u914d\u7f6e\u8bf4\u660e"}),"\n",(0,l.jsx)(n.h3,{id:"docker\u90e8\u7f72\u914d\u7f6e\u53c2\u6570",children:"Docker\u90e8\u7f72\u914d\u7f6e\u53c2\u6570"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"# \u706b\u5c71\u5f15\u64ce API \u914d\u7f6e\nSPRING_AI_VOLCENGINE_BASE_URL: https://ark.cn-beijing.volces.com/api/v3 # \u706b\u5c71\u5f15\u64ce API \u57fa\u7840\u5730\u5740\nSPRING_AI_VOLCENGINE_API_KEY: 'xxxxxx' # \u66ff\u6362\u4e3a\u4f60\u7684 \u706b\u5c71\u5f15\u64ce API Key\nSPRING_AI_VOLCENGINE_CHAT_ENABLED: true # \u542f\u7528 \u706b\u5c71\u5f15\u64ce \u5bf9\u8bdd\u529f\u80fd\n\n# \u6a21\u578b\u914d\u7f6e\nSPRING_AI_VOLCENGINE_CHAT_OPTIONS_MODEL: doubao-1-5-pro-32k-250115 # \u706b\u5c71\u5f15\u64ce\u8c46\u5305\u5927\u6a21\u578b\nSPRING_AI_VOLCENGINE_CHAT_OPTIONS_TEMPERATURE: 0.7 # \u6e29\u5ea6\u53c2\u6570\uff0c\u63a7\u5236\u8f93\u51fa\u7684\u968f\u673a\u6027\uff0c\u8303\u56f4 0-1\nSPRING_AI_VOLCENGINE_EMBEDDING_ENABLED: true # \u542f\u7528 \u706b\u5c71\u5f15\u64ce \u6587\u672c\u5d4c\u5165\u529f\u80fd\n"})}),"\n",(0,l.jsx)(n.h3,{id:"\u6e90\u7801\u90e8\u7f72\u914d\u7f6e\u53c2\u6570",children:"\u6e90\u7801\u90e8\u7f72\u914d\u7f6e\u53c2\u6570"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"# \u706b\u5c71\u5f15\u64ce API \u914d\u7f6e\nspring.ai.volcengine.base-url=https://ark.cn-beijing.volces.com/api/v3 # \u706b\u5c71\u5f15\u64ce API \u57fa\u7840\u5730\u5740\nspring.ai.volcengine.api-key=xxxxxx # \u66ff\u6362\u4e3a\u4f60\u7684 \u706b\u5c71\u5f15\u64ce API Key\nspring.ai.volcengine.chat.enabled=true # \u542f\u7528 \u706b\u5c71\u5f15\u64ce \u5bf9\u8bdd\u529f\u80fd\n\n# \u6a21\u578b\u914d\u7f6e\nspring.ai.volcengine.chat.options.model=doubao-1-5-pro-32k-250115 # \u706b\u5c71\u5f15\u64ce\u8c46\u5305\u5927\u6a21\u578b\nspring.ai.volcengine.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,l.jsx)(n.h2,{id:"\u914d\u7f6e\u6b65\u9aa4",children:"\u914d\u7f6e\u6b65\u9aa4"}),"\n",(0,l.jsx)(n.h3,{id:"1-\u83b7\u53d6-api-key",children:"1. \u83b7\u53d6 API Key"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\u8bbf\u95ee \u706b\u5c71\u5f15\u64ce \u5f00\u53d1\u8005\u5e73\u53f0\uff1a",(0,l.jsx)(n.a,{href:"https://console.volcengine.com/ark/apiKey",children:"https://console.volcengine.com/ark/apiKey"})]}),"\n",(0,l.jsx)(n.li,{children:"\u6ce8\u518c\u5e76\u767b\u5f55\u8d26\u53f7"}),"\n",(0,l.jsx)(n.li,{children:"\u5728\u63a7\u5236\u53f0\u521b\u5efa API Key"}),"\n",(0,l.jsx)(n.li,{children:"\u4fdd\u5b58\u751f\u6210\u7684 API Key"}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"2-\u4fee\u6539\u914d\u7f6e\u6587\u4ef6",children:"2. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6"}),"\n",(0,l.jsx)(n.admonition,{title:"\u914d\u7f6e\u8bf4\u660e",type:"tip",children:(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["\u5c06\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684 ",(0,l.jsx)(n.code,{children:"xxxxxx"})," \u66ff\u6362\u4e3a\u4f60\u83b7\u53d6\u7684 API Key"]}),"\n",(0,l.jsx)(n.li,{children:"\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8c03\u6574 temperature \u53c2\u6570"}),"\n",(0,l.jsxs)(n.li,{children:["\u5982\u679c\u4e0d\u9700\u8981\u6587\u672c\u5d4c\u5165\u529f\u80fd\uff0c\u53ef\u4ee5\u5c06 ",(0,l.jsx)(n.code,{children:"SPRING_AI_VOLCENGINE_EMBEDDING_ENABLED"})," \u8bbe\u7f6e\u4e3a false"]}),"\n"]})}),"\n",(0,l.jsx)(n.h3,{id:"3-\u7ba1\u7406\u540e\u53f0\u914d\u7f6e",children:"3. \u7ba1\u7406\u540e\u53f0\u914d\u7f6e"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsx)(n.li,{children:"\u767b\u5f55\u5fae\u8bed\u7ba1\u7406\u540e\u53f0"}),"\n",(0,l.jsx)(n.li,{children:"\u8fdb\u5165 AI \u6a21\u578b\u914d\u7f6e\u9875\u9762"}),"\n",(0,l.jsx)(n.li,{children:"\u9009\u62e9 VolcEngine \u4f5c\u4e3a\u9ed8\u8ba4\u6a21\u578b"}),"\n",(0,l.jsx)(n.li,{children:"\u4fdd\u5b58\u914d\u7f6e"}),"\n"]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.img,{alt:"provider",src:i(9810).A+"",width:"2304",height:"1396"}),"\n",(0,l.jsx)(n.img,{alt:"provider-choose",src:i(6802).A+"",width:"3032",height:"1394"})]}),"\n",(0,l.jsx)(n.h3,{id:"4-\u83b7\u53d6\u804a\u5929\u4ee3\u7801",children:"4. \u83b7\u53d6\u804a\u5929\u4ee3\u7801"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsx)(n.li,{children:'\u5728\u7ba1\u7406\u540e\u53f0\u627e\u5230"\u83b7\u53d6\u804a\u5929\u4ee3\u7801"\u9009\u9879'}),"\n",(0,l.jsx)(n.li,{children:"\u590d\u5236\u751f\u6210\u7684\u4ee3\u7801"}),"\n",(0,l.jsx)(n.li,{children:"\u5c06\u4ee3\u7801\u96c6\u6210\u5230\u4f60\u7684\u7f51\u7ad9\u4e2d"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.img,{alt:"provider-code",src:i(4017).A+"",width:"2240",height:"1038"})}),"\n",(0,l.jsx)(n.h2,{id:"\u6548\u679c\u5c55\u793a",children:"\u6548\u679c\u5c55\u793a"}),"\n",(0,l.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,l.jsx)(n.p,{children:(0,l.jsx)(n.img,{alt:"provider-chat",src:i(4711).A+"",width:"834",height:"1210"})}),"\n",(0,l.jsx)(n.h2,{id:"\u5e38\u89c1\u95ee\u9898",children:"\u5e38\u89c1\u95ee\u9898"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"API Key \u65e0\u6548"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"\u68c0\u67e5 API Key \u662f\u5426\u6b63\u786e\u590d\u5236"}),"\n",(0,l.jsx)(n.li,{children:"\u786e\u8ba4 API Key \u662f\u5426\u5df2\u6fc0\u6d3b"}),"\n",(0,l.jsx)(n.li,{children:"\u9a8c\u8bc1 API Key \u7684\u6743\u9650\u8bbe\u7f6e"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"\u5bf9\u8bdd\u54cd\u5e94\u6162"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5"}),"\n",(0,l.jsx)(n.li,{children:"\u786e\u8ba4\u670d\u52a1\u5668\u914d\u7f6e\u662f\u5426\u6ee1\u8db3\u8981\u6c42"}),"\n",(0,l.jsx)(n.li,{children:"\u53ef\u4ee5\u9002\u5f53\u8c03\u6574 temperature \u53c2\u6570"}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"\u6587\u672c\u5d4c\u5165\u529f\u80fd\u5f02\u5e38"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["\u786e\u8ba4 ",(0,l.jsx)(n.code,{children:"SPRING_AI_VOLCENGINE_EMBEDDING_ENABLED"})," \u8bbe\u7f6e\u4e3a true"]}),"\n",(0,l.jsx)(n.li,{children:"\u68c0\u67e5 API Key \u662f\u5426\u652f\u6301\u6587\u672c\u5d4c\u5165\u529f\u80fd"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"\u76f8\u5173\u8d44\u6e90",children:"\u76f8\u5173\u8d44\u6e90"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.a,{href:"https://www.volcengine.com/docs/82379/1330626",children:"\u706b\u5c71\u5f15\u64ce API \u6587\u6863"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.a,{href:"https://docs.spring.io/spring-ai/reference/",children:"Spring AI \u6587\u6863"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.a,{href:"/docs/intro",children:"\u5fae\u8bed\u6587\u6863\u4e2d\u5fc3"})}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(h,{...e})}):h(e)}},4711:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/provider-chat-5765d80a7d692bd0d90708fad9115a15.png"},6802:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/provider-choose-1683a1a889ce5941081af8dc52613fd2.png"},4017:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/provider-code-dd2f519bb074cc9099f6db27022f4e64.png"},9810:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/provider-e66a8752306150814f886a41ec453fc8.png"},6246:(e,n,i)=>{i.d(n,{R:()=>c,x:()=>d});var s=i(2155);const l={},r=s.createContext(l);function c(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:c(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); |