1"use strict";(self.webpackChunk_deepseek_docs=self.webpackChunk_deepseek_docs||[]).push([[8e3],{34867:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>a});var i=s(80678),t=s(41759);const r={sidebar_label:"Pi"},c="\u63a5\u5165 Pi",o={id:"quick_start/agent_integrations/pi_mono",title:"\u63a5\u5165 Pi",description:"Pi\uff08pi-mono\uff09\u662f\u4e00\u4e2a\u6781\u7b80\u4e14\u9ad8\u5ea6\u53ef\u6269\u5c55\u7684\u7ec8\u7aef\u7f16\u7801\u6846\u67b6\u3002\u5b83\u901a\u8fc7 TypeScript \u6269\u5c55\u3001\u6280\u80fd\u3001\u63d0\u793a\u6a21\u677f\u548c\u4e3b\u9898\u6765\u9002\u914d\u4f60\u7684\u5de5\u4f5c\u6d41\uff0c\u652f\u6301\u6811\u72b6\u4f1a\u8bdd\u7ed3\u6784\u548c 15+ \u5185\u7f6e\u4f9b\u5e94\u5546\u3002",source:"@site/i18n/zh-cn/docusaurus-plugin-content-docs/current/quick_start/agent_integrations/pi_mono.md",sourceDirName:"quick_start/agent_integrations",slug:"/quick_start/agent_integrations/pi_mono",permalink:"/zh-cn/quick_start/agent_integrations/pi_mono",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"Pi"}},l={},a=[{value:"1. \u5b89\u88c5 Pi",id:"1-\u5b89\u88c5-pi",level:4},{value:"2. \u914d\u7f6e DeepSeek \u4f9b\u5e94\u5546",id:"2-\u914d\u7f6e-deepseek-\u4f9b\u5e94\u5546",level:4},{value:"3. \u8fd0\u884c\u5e76\u9009\u62e9\u6a21\u578b",id:"3-\u8fd0\u884c\u5e76\u9009\u62e9\u6a21\u578b",level:4}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"\u63a5\u5165-pi",children:"\u63a5\u5165 Pi"}),"\n",(0,i.jsx)(n.p,{children:"Pi\uff08pi-mono\uff09\u662f\u4e00\u4e2a\u6781\u7b80\u4e14\u9ad8\u5ea6\u53ef\u6269\u5c55\u7684\u7ec8\u7aef\u7f16\u7801\u6846\u67b6\u3002\u5b83\u901a\u8fc7 TypeScript \u6269\u5c55\u3001\u6280\u80fd\u3001\u63d0\u793a\u6a21\u677f\u548c\u4e3b\u9898\u6765\u9002\u914d\u4f60\u7684\u5de5\u4f5c\u6d41\uff0c\u652f\u6301\u6811\u72b6\u4f1a\u8bdd\u7ed3\u6784\u548c 15+ \u5185\u7f6e\u4f9b\u5e94\u5546\u3002"}),"\n",(0,i.jsx)(n.h4,{id:"1-\u5b89\u88c5-pi",children:"1. \u5b89\u88c5 Pi"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\u5b89\u88c5 ",(0,i.jsx)(n.a,{href:"https://nodejs.org/zh-cn/download/",children:"Node.js"}),"\u3002"]}),"\n",(0,i.jsx)(n.li,{children:"\u5728\u547d\u4ee4\u884c\u754c\u9762\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 Pi\uff1a"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm install -g @mariozechner/pi-coding-agent\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"\u5b89\u88c5\u7ed3\u675f\u540e\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u82e5\u663e\u793a\u7248\u672c\u53f7\u5219\u5b89\u88c5\u6210\u529f\uff1a"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"pi --version\n"})}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"\u6ce8\u610f\uff1a"})," Linux / macOS \u7528\u6237\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5b98\u65b9\u811a\u672c\u5b89\u88c5\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -fsSL https://pi.dev/install.sh | sh\n"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"2-\u914d\u7f6e-deepseek-\u4f9b\u5e94\u5546",children:"2. \u914d\u7f6e DeepSeek \u4f9b\u5e94\u5546"}),"\n",(0,i.jsxs)(n.p,{children:["Pi \u901a\u8fc7 ",(0,i.jsx)(n.code,{children:"models.json"})," \u652f\u6301\u81ea\u5b9a\u4e49\u4f9b\u5e94\u5546\u3002\u5c06 DeepSeek \u6dfb\u52a0\u4e3a OpenAI \u517c\u5bb9\u4f9b\u5e94\u5546\uff1a"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Linux / macOS"}),"\uff1a",(0,i.jsx)(n.code,{children:"~/.pi/agent/models.json"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Windows"}),"\uff1a",(0,i.jsx)(n.code,{children:"%USERPROFILE%\\.pi\\agent\\models.json"})]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "providers": {\n "deepseek": {\n "baseUrl": "https://api.deepseek.com",\n "api": "openai-completions",\n "apiKey": "$DEEPSEEK_API_KEY",\n "models": [\n {\n "id": "deepseek-v4-pro",\n "name": "DeepSeek V4 Pro",\n "contextWindow": 1000000,\n "maxTokens": 384000,\n "input": ["text"],\n "reasoning": true,\n "cost": {\n "input": 1.74,\n "output": 3.48,\n "cacheRead": 0.145,\n "cacheWrite": 0\n },\n "compat": {\n "requiresReasoningContentOnAssistantMessages": true,\n "thinkingFormat": "deepseek",\n "reasoningEffortMap": {\
1n "minimal": "high",\n "low": "high",\n "medium": "high",\n "high": "high",\n "xhigh": "max"\n }\n }\n },\n {\n "id": "deepseek-v4-flash",\n "name": "DeepSeek V4 Flash",\n "contextWindow": 1000000,\n "maxTokens": 384000,\n "input": ["text"],\n "reasoning": true,\n "cost": {\n "input": 0.14,\n "output": 0.28,\n "cacheRead": 0.028,\n "cacheWrite": 0\n },\n "compat": {\n "requiresReasoningContentOnAssistantMessages": true,\n "thinkingFormat": "deepseek",\n "reasoningEffortMap": {\n "minimal": "high",\n "low": "high",\n "medium": "high",\n "high": "high",\n "xhigh": "max"\n }\n }\n }\n ]\n }\n }\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["\u5176\u4e2d API Key \u5728 ",(0,i.jsx)(n.a,{href:"https://platform.deepseek.com/api_keys",children:"DeepSeek \u5f00\u653e\u5e73\u53f0"})," \u83b7\u53d6\u3002"]}),"\n",(0,i.jsx)(n.p,{children:"\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1a"}),"\n",(0,i.jsx)(n.p,{children:"Linux / Mac \u7528\u6237\uff1a"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'export DEEPSEEK_API_KEY="<\u4f60\u7684 DeepSeek API Key>"\n'})}),"\n",(0,i.jsx)(n.p,{children:"Windows \u7528\u6237\uff1a"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-powershell",children:'$env:DEEPSEEK_API_KEY="<\u4f60\u7684 DeepSeek API Key>"\n'})}),"\n",(0,i.jsx)(n.h4,{id:"3-\u8fd0\u884c\u5e76\u9009\u62e9\u6a21\u578b",children:"3. \u8fd0\u884c\u5e76\u9009\u62e9\u6a21\u578b"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\u8fdb\u5165\u9879\u76ee\u76ee\u5f55\u5e76\u6267\u884c ",(0,i.jsx)(n.code,{children:"pi"})," \u547d\u4ee4\uff1a"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"cd /path/to/my-project\npi\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\u8f93\u5165 ",(0,i.jsx)(n.code,{children:"/model"})," \u6253\u5f00\u6a21\u578b\u5207\u6362\u5668\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:["\u9009\u62e9 ",(0,i.jsx)(n.strong,{children:"deepseek"}),"\uff0c\u7136\u540e\u9009\u62e9 ",(0,i.jsx)(n.code,{children:"DeepSeek-V4-Pro"})," \u6216 ",(0,i.jsx)(n.code,{children:"DeepSeek-V4-Flash"}),"\u3002"]}),"\n",(0,i.jsx)(n.li,{children:"\u5f00\u59cb\u4f7f\u7528\u4f60\u7684\u6781\u7b80\u7ec8\u7aef\u7f16\u7801\u6846\u67b6\u3002"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u66f4\u591a\u914d\u7f6e\u9009\u9879\u8bf7\u53c2\u9605 ",(0,i.jsx)(n.a,{href:"https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent/docs/models.md",children:"Pi \u6a21\u578b\u6587\u6863"}),"\u3002"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},41759:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>o});var i=s(26166);const t={},r=i.createContext(t);function c(e){const n=i.useContext(r);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(t):e.components||t:c(e.components),i.createElement(r.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.