PageSourceSearch

https://api-docs.deepseek.com/zh-cn/assets/js/e7621fb7.700a2b7a.js

js deepseek.com collected 2026-10-01 07:30:15 UTC 12,961 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_deepseek_docs=self.webpackChunk_deepseek_docs||[]).push([[5887],{5366:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>a,frontMatter:()=>t,metadata:()=>o,toc:()=>c});var i=s(80678),d=s(41759);const t={sidebar_label:"Oh My Pi"},r="\u5728 Oh My Pi \u4e2d\u4f7f\u7528 DeepSeek",o={id:"quick_start/agent_integrations/oh_my_pi",title:"\u5728 Oh My Pi \u4e2d\u4f7f\u7528 DeepSeek",description:"Oh My Pi \u662f\u7ec8\u7aef AI \u7f16\u7a0b Agent\u3002\u81ea v14.5 \u8d77\u5185\u7f6e\u4e86 DeepSeek V4 \u6a21\u578b\u6761\u76ee\uff0c\u4f46\u5185\u7f6e\u6761\u76ee\u7f3a\u5c11\u5173\u952e\u914d\u7f6e\uff0c\u76f4\u63a5\u4f7f\u7528\u53ef\u80fd\u62a5\u9519\uff0c\u4ecd\u9700\u81ea\u5b9a\u4e49 models.yml\u3002",source:"@site/i18n/zh-cn/docusaurus-plugin-content-docs/current/quick_start/agent_integrations/oh_my_pi.md",sourceDirName:"quick_start/agent_integrations",slug:"/quick_start/agent_integrations/oh_my_pi",permalink:"/zh-cn/quick_start/agent_integrations/oh_my_pi",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"Oh My Pi"}},l={},c=[{value:"\u524d\u7f6e\u6761\u4ef6",id:"\u524d\u7f6e\u6761\u4ef6",level:2},{value:"\u914d\u7f6e",id:"\u914d\u7f6e",level:2},{value:"\u914d\u7f6e\u8981\u70b9",id:"\u914d\u7f6e\u8981\u70b9",level:2},{value:"\u57fa\u7840",id:"\u57fa\u7840",level:3},{value:"Thinking\uff08\u601d\u8003\u6a21\u5f0f\uff09",id:"thinking\u601d\u8003\u6a21\u5f0f",level:3},{value:"\u4e09\u9879\u5173\u952e compat\uff08\u5fc5\u914d\uff09",id:"\u4e09\u9879\u5173\u952e-compat\u5fc5\u914d",level:3},{value:"\u4f7f\u7528",id:"\u4f7f\u7528",level:2},{value:"\u5df2\u77e5\u95ee\u9898",id:"\u5df2\u77e5\u95ee\u9898",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"\u5728-oh-my-pi-\u4e2d\u4f7f\u7528-deepseek",children:"\u5728 Oh My Pi \u4e2d\u4f7f\u7528 DeepSeek"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/can1357/oh-my-pi",children:"Oh My Pi"})," \u662f\u7ec8\u7aef AI \u7f16\u7a0b Agent\u3002\u81ea v14.5 \u8d77\u5185\u7f6e\u4e86 DeepSeek V4 \u6a21\u578b\u6761\u76ee\uff0c\u4f46\u5185\u7f6e\u6761\u76ee\u7f3a\u5c11\u5173\u952e\u914d\u7f6e\uff0c\u76f4\u63a5\u4f7f\u7528\u53ef\u80fd\u62a5\u9519\uff0c\u4ecd\u9700\u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"models.yml"}),"\u3002"]}),"\n",(0,i.jsx)(n.h2,{id:"\u524d\u7f6e\u6761\u4ef6",children:"\u524d\u7f6e\u6761\u4ef6"}),"\n",(0,i.jsxs)(n.p,{children:["\u5b89\u88c5 Oh My Pi\uff1a",(0,i.jsx)(n.a,{href:"https://github.com/can1357/oh-my-pi#installation",children:"https://github.com/can1357/oh-my-pi#installation"})]}),"\n",(0,i.jsxs)(n.p,{children:["\u4ece ",(0,i.jsx)(n.a,{href:"https://platform.deepseek.com/api_keys",children:"DeepSeek \u5f00\u653e\u5e73\u53f0"})," \u83b7\u53d6 API Key\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"export DEEPSEEK_API_KEY=<\u4f60\u7684 API Key>\n"})}),"\n",(0,i.jsx)(n.h2,{id:"\u914d\u7f6e",children:"\u914d\u7f6e"}),"\n",(0,i.jsxs)(n.p,{children:["\u521b\u5efa ",(0,i.jsx)(n.code,{children:"~/.omp/agent/models.yml"}),"\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:"providers:\n  deepseek:\n    baseUrl: https://api.deepseek.com\n    api: openai-completions\n    apiKey: DEEPSEEK_API_KEY\n    authHeader: true\n    models:\n      - id: deepseek-v4-pro\n        name: DeepSeek V4 Pro\n        reasoning: true\n        thinking:\n          minLevel: high\n          maxLevel: xhigh\n          mode: effort\n        input: [text]\n        contextWindow: 1000000\n        maxTokens: 384000\n        compat:\n          supportsDeveloperRole: false\n          supportsReasoningEffort: true\n          maxTokensField: max_tokens\n          reasoningEffortMap:\n            high: high\n            xhigh: max\n          supportsToolChoice: false\n          requiresReasoningContentForToolCalls: true\n          requiresAssistantContentForToolCalls: true\n          extraBody:\n            thinking:\n              type: enabled\n      - id: deepseek-v4-flash\n        name: DeepSeek V4 Flash\n        reasoning: true\n        thinking:\n          minLevel: high\n          maxLevel: xhigh\n          mode: effort\n        input: [text]\n        contextWindow: 1000000\n        maxTokens: 384000\n        compat:\n          supportsDeveloperRole: false\n          supportsReasoningEffort: true\n          maxTokensField: max_tokens\n          reasoningEffortMap:\n            high: high\n            xhigh: max\n          supportsToolChoice: false\n          requiresReasoningContentForToolCalls: true\n          requiresAssistantContentForToolCalls: true\n          extraBody:\n            thinking:\n              type: enabled\n"})}),"\n",(0,i.jsx)(n.h2,{id:"\u914d\u7f6e\u8981\u70b9",children:"\u914d\u7f6e\u8981\u70b9"}),"\n",(0,i.jsx)(n.h3,{id:"\u57fa\u7840",children:"\u57fa\u7840"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"\u5b57\u6bb5"}),(0,i.jsx)(n.th,{children:"\u8bf4\u660e"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"baseUrl: https://api.deepseek.com"})}),(0,i.jsxs)(n.td,{children:["DeepSeek OpenAI \u517c\u5bb9\u63a5\u53e3\u3002\u4e0d\u8981\u52a0 ",(0,i.jsx)(n.code,{children:"/v1"}),"\u3002"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"authHeader: true"})}),(0,i.jsxs)(n.td,{children:["\u53d1\u9001 ",(0,i.jsx)(n.code,{children:"Authorization: Bearer $DEEPSEEK_API_KEY"}),"\u3002\u4e0d\u7ecf\u8fc7 OAuth ",(0,i.jsx)(n.code,{children:"/login"}),"\u3002"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"supportsDeveloperRole: false"})}),(0,i.jsxs)(n.td,{children:["\u4ee5 ",(0,i.jsx)(n.code,{children:"system"})," \u89d2\u8272\u53d1\u7cfb\u7edf\u63d0\u793a\u8bcd\u3002DeepSeek API \u4e0d\u63a5\u53d7 ",(0,i.jsx)(n.code,{children:"developer"})," \u89d2\u8272\u3002"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"maxTokensField: max_tokens"})}),(0,i.jsxs)(n.td,{children:["DeepSeek \u7684\u8f93\u51fa\u9650\u5236\u5b57\u6bb5\u662f ",(0,i.jsx)(n.code,{children:"max_tokens"}),"\uff0c\u4e0d\u662f OpenAI \u7684 ",(0,i.jsx)(n.code,{children:"max_completion_tokens"}),"\u3002"]})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"thinking\u601d\u8003\u6a21\u5f0f",children:"Thinking\uff08\u601d\u8003\u6a21\u5f0f\uff09"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"\u5b57\u6bb5"}),(0,i.jsx)(n.th,{children:"\u8bf4\u660e"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"thinking.mode: effort"})}),(0,i.jsxs)(n.td,{children:["\u4f7f\u7528 effort-based thinking\uff0cOMP \u4f1a\u53d1 ",(0,i.jsx)(n.code,{children:"reasoning_effort"})," \u53c2\u6570\u3002"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"thinking.minLevel: high"})," / ",(0,i.jsx)(n.code,{children:"maxLevel: xhigh"})]}),(0,i.jsx)(n.td,{children:"\u9650\u5236\u4e3a DeepSeek \u652f\u6301\u7684\u4e24\u6863\u3002"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"reasoningEffortMap: { high: high, xhigh: max }"})}),(0,i.jsxs)(n.td,{children:["OMP \u7684 ",(0,i.jsx)(n.code,{children:"xhigh"})," \u6620\u5c04\u4e3a DeepSeek \u7684 ",(0,i.jsx)(n.code,{children:"max"}),"\u3002\u4e0d\u914d\u8fd9\u4e2a\u4f1a\u5bfc\u81f4 ",(0,i.jsx)(n.code,{children:"xhigh"}
1)," \u4e0d\u88ab\u8bc6\u522b\u3002"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"extraBody.thinking.type: enabled"})}),(0,i.jsx)(n.td,{children:"\u663e\u5f0f\u542f\u7528 DeepSeek V4 \u601d\u8003\u6a21\u5f0f\u3002"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"supportsReasoningEffort: true"})}),(0,i.jsxs)(n.td,{children:["\u5141\u8bb8 OMP \u53d1\u9001 ",(0,i.jsx)(n.code,{children:"reasoning_effort"}),"\u3002"]})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"\u4e09\u9879\u5173\u952e-compat\u5fc5\u914d",children:"\u4e09\u9879\u5173\u952e compat\uff08\u5fc5\u914d\uff09"}),"\n",(0,i.jsx)(n.p,{children:"\u8fd9\u4e09\u4e2a\u5b57\u6bb5\u662f\u907f\u514d\u62a5\u9519\u7684\u5173\u952e\u3002\u4e0d\u914d\u4f1a\u5bfc\u81f4 DeepSeek V4 \u5728 thinking mode \u4e0b\u5e26 tool call \u65f6\u8fd4\u56de 400\u3002"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"\u5b57\u6bb5"}),(0,i.jsx)(n.th,{children:"\u8bf4\u660e"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"supportsToolChoice: false"})}),(0,i.jsxs)(n.td,{children:["DeepSeek V4 thinking mode \u4e0d\u63a5\u53d7 ",(0,i.jsx)(n.code,{children:"tool_choice"})," \u53c2\u6570\u3002"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"requiresReasoningContentForToolCalls: true"})}),(0,i.jsxs)(n.td,{children:["DeepSeek \u8981\u6c42 tool call \u5bf9\u8bdd\u7684\u5386\u53f2\u6d88\u606f\u4e2d\u5fc5\u987b\u4fdd\u7559 ",(0,i.jsx)(n.code,{children:"reasoning_content"}),"\u3002\u4e0d\u914d\u4f1a\u5bfc\u81f4 400\u3002"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"requiresAssistantContentForToolCalls: true"})}),(0,i.jsxs)(n.td,{children:["\u786e\u4fdd tool call \u6d88\u606f\u7684 ",(0,i.jsx)(n.code,{children:"content"})," \u5b57\u6bb5\u4e0d\u4e3a\u7a7a\u3002\u914d\u5408\u4e0a\u4e00\u4e2a\u5b57\u6bb5\u4f7f\u7528\u3002"]})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"\u4f7f\u7528",children:"\u4f7f\u7528"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"cd /path/to/your-project\nomp --model deepseek/deepseek-v4-pro\n"})}),"\n",(0,i.jsx)(n.p,{children:"\u9700\u8981\u66f4\u5feb\u54cd\u5e94\u65f6\uff1a"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"omp --model deepseek/deepseek-v4-flash\n"})}),"\n",(0,i.jsxs)(n.p,{children:["\u5728 Oh My Pi \u5185\u8f93\u5165 ",(0,i.jsx)(n.code,{children:"/model"})," \u6216\u6309 ",(0,i.jsx)(n.code,{children:"Ctrl+L"})," \u5207\u6362\u6a21\u578b\u3002"]}),"\n",(0,i.jsx)(n.h2,{id:"\u5df2\u77e5\u95ee\u9898",children:"\u5df2\u77e5\u95ee\u9898"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"\u4e0d\u63a8\u8350\u4f9d\u8d56\u5185\u7f6e\u6a21\u578b\u6761\u76ee\u3002"})," \u8f83\u65b0\u7248\u672c ",(0,i.jsx)(n.code,{children:"omp --list-models deepseek"})," \u80fd\u5217\u51fa ",(0,i.jsx)(n.code,{children:"deepseek-v4-pro"})," \u548c ",(0,i.jsx)(n.code,{children:"deepseek-v4-flash"}),"\uff0c\u4f46\u5185\u7f6e\u6761\u76ee\u7f3a\u5c11\u4e0a\u8ff0\u4e09\u9879\u5173\u952e compat\u3002\u76f4\u63a5\u7528\u5185\u7f6e\u6761\u76ee\u5728 thinking mode \u4e0b\u5e26 tool call \u7684\u957f\u5bf9\u8bdd\u5927\u6982\u7387 400\u3002\u59cb\u7ec8\u4f7f\u7528\u4e0a\u65b9\u7684 ",(0,i.jsx)(n.code,{children:"models.yml"})," \u914d\u7f6e\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["Oh My Pi \u76ee\u524d\u6ca1\u6709 DeepSeek \u7684 OAuth ",(0,i.jsx)(n.code,{children:"/login"})," \u5165\u53e3\u3002\u53ea\u80fd\u901a\u8fc7 ",(0,i.jsx)(n.code,{children:"DEEPSEEK_API_KEY"})," \u73af\u5883\u53d8\u91cf\u6216 ",(0,i.jsx)(n.code,{children:"models.yml"})," \u4e2d\u7684 ",(0,i.jsx)(n.code,{children:"apiKey"})," \u5b57\u6bb5\u914d\u7f6e API Key\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["DeepSeek V4 \u5728\u975e\u5b98\u65b9 provider\uff08DeepInfra\u3001KiloCode\u3001NVIDIA NIM\u3001Zenmux \u7b49\uff09\u4e0a\u901a\u8fc7 OpenAI-compatible \u63a5\u53e3\u4f7f\u7528\u65f6\uff0creasoning_content \u56de\u4f20\u89c4\u5219\u53ef\u80fd\u4e0d\u540c\uff0c\u517c\u5bb9\u6027\u672a\u6536\u655b\u3002\u5efa\u8bae\u4f18\u5148\u7528\u5b98\u65b9 ",(0,i.jsx)(n.code,{children:"api.deepseek.com"}),"\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"models.yml"})," \u7684 ",(0,i.jsx)(n.code,{children:"compat"})," \u662f\u6574\u5757\u66ff\u6362\uff0c\u4e0d\u8ddf\u5185\u7f6e\u6761\u76ee\u5408\u5e76\u3002\u6240\u4ee5 compat \u5fc5\u987b\u5199\u5168\uff0c\u4e0d\u80fd\u53ea\u8865\u7f3a\u7684\u5b57\u6bb5\u3002"]})]})}function a(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},41759:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>o});var i=s(26166);const d={},t=i.createContext(d);function r(e){const n=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:r(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.