1"use strict";(self.webpackChunk_deepseek_docs=self.webpackChunk_deepseek_docs||[]).push([[6295],{79786:(e,s,a)=>{a.r(s),a.d(s,{default:()=>j});var n=a(26166),c=a(93177),l=a(41407),t=a.n(l),r=a(95631),i=a(63321),o=a(80678),d=a(73780);t().setAppElement("#__docusaurus");const h={faCheckCircle:i.SGM,faPaperclip:i.WMI,faMasksTheater:i.ICh,faClapperboard:i.J12,faBars:i.ckx,faScroll:i.DDU,faPencil:i.zLW,faList:i.ITF,faBullhorn:i.e4L,faBrain:i.GQu,faLanguage:i.mh,faSmile:i.Qpm,faCode:i.jTw,faClock:i.a$,faKey:i.bMg,faLightbulb:i.rC2,faFileAlt:i.h8M,faUserGraduate:i.OL2,faICursor:i.lSN,faLaptopCode:i.fPr};function p({icon:e,title:s,description:a,messages:c}){const[l,i]=(0,n.useState)(!1),h=()=>{i(!0),d.log("here")},p=()=>{const e=document.querySelector(".modal"),s=document.querySelector(".overlay");e.classList.add("fade-out"),s.classList.add("fade-out"),setTimeout(()=>{e.style.display="none",s.style.display="none",i(!1)},300)};return(0,o.jsxs)("div",{className:"prompt-card",children:[(0,o.jsx)("div",{className:"icon-container",onClick:h,children:(0,o.jsx)(r.g,{icon:e,className:"card-icon"})}),(0,o.jsxs)("div",{className:"text-container",onClick:h,children:[(0,o.jsx)("h4",{children:s}),(0,o.jsx)("p",{children:a})]}),(0,o.jsxs)(t(),{isOpen:l,onRequestClose:p,contentLabel:"Prompt Details",className:"modal",overlayClassName:"overlay",shouldCloseOnOverlayClick:!0,children:[(0,o.jsx)("button",{className:"close-button",onClick:p,children:"\xd7"}),(0,o.jsxs)("div",{className:"modal-content",children:[(0,o.jsxs)("div",{className:"modal-content-header",children:[(0,o.jsx)(r.g,{icon:e,className:"card-icon"}),(0,o.jsx)("div",{className:"modal-text",children:(0,o.jsx)("h2",{children:s})})]}),(0,o.jsx)("p",{className:"modal-content-description",children:a}),(0,o.jsxs)("div",{className:"modal-content-details",children:[(0,o.jsx)("h3",{children:"\u63d0\u793a\u8bcd"}),(0,o.jsx)("table",{className:"prompt-table",children:(0,o.jsx)("tbody",{children:c.map((e,s)=>s<c.length-1&&(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{className:"role-cell",children:(0,o.jsx)("strong",{children:e.role.toUpperCase()})}),(0,o.jsx)("td",{className:"content-cell",children:(0,o.jsx)("pre",{children:e.content})})]},s))})}),(0,o.jsx)("h3",{children:"\u6837\u4f8b\u8f93\u51fa"}),(0,o.jsx)("pre",{className:"sample-output-content",children:c[c.length-1].content}),(0,o.jsx)("h3",{children:"\u4ee3\u7801"}),(0,o.jsx)("pre",{className:"sample-code",children:(0,o.jsx)("code",{children:`from openai import OpenAI\n\nclient = OpenAI(\n base_url="https://api.deepseek.com/",\n api_key="<YOUR_API_KEY>
1"\n)\n\ncompletion = client.chat.completions.create(\n model="deepseek-flash",\n messages=${JSON.stringify(c.slice(0,-1),null,8).slice(0,-1)} ]\n)\n\nprint(completion.choices[0].message.content)`})})]})]})]})]})}const m=function(){const[e,s]=(0,n.useState)([]);return(0,n.useEffect)(()=>{fetch("/zh-cn/data/prompts.json").then(e=>e.json()).then(e=>{d.log(e),s(e)}).catch(e=>d.error("Error fetching prompts:",e))},[]),(0,o.jsxs)("div",{className:"PromptLibrary",children:[(0,o.jsxs)("header",{className:"PromptLibrary-header",children:[(0,o.jsx)("h1",{children:"\u63d0\u793a\u5e93"}),(0,o.jsx)("p",{children:"\u63a2\u7d22 DeepSeek \u63d0\u793a\u8bcd\u6837\u4f8b\uff0c\u6316\u6398\u66f4\u591a\u53ef\u80fd"})]}),(0,o.jsx)("div",{className:"prompt-grid",children:e.map((e,s)=>(0,o.jsx)(p,{icon:h[e.icon],title:e.title,description:e.description,messages:e.messages},s))})]})};function j(){return(0,o.jsx)(c.A,{title:"Prompt Library",description:"DeepSeek Prompt Library",children:(0,o.jsx)(m,{})})}}}]);
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.