1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6510],{3548:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/cookbook.en",function(){return a(4422)}])},4422:function(e,t,a){"use strict";a.r(t),a.d(t,{__toc:function(){return c}});var n=a(1527),o=a(7707),i=a(1626),r=a(8471);a(3777),a(8013);var l=a(7731),d=a(2459);let c=[];function _createMdxContent(e){return(0,n.jsx)(d.default,{})}let s={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,l.a)(),e.components);return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/cookbook.en.mdx",route:"/cookbook",frontMatter:{description:"Examples for building applications with Pluto, emphasizing practical and comprehensive use cases.",type:"posts"},timestamp:1715693517e3,pageMap:[{kind:"Meta",locale:"en",data:{"*":{type:"page"},index:{title:"Home",display:"hidden",theme:{typesetting:"article"}},documentation:{title:"Documentation"},cookbook:{title:"Cookbook",theme:{typesetting:"article"}},blogs:{title:"Blog",theme:{typesetting:"article"}},dev_guide:{title:"Developer's Guide"}}},{kind:"Folder",name:"blogs",route:"/blogs",children:[{kind:"MdxPage",name:"231227-envisioning-a-cloud-native-application-development-paradigm",route:"/blogs/231227-envisioning-a-cloud-native-application-development-paradigm",locale:"en",frontMatter:{title:"Rethinking a Cloud-Native Application Development Paradigm",date:"2023-12-27T00:00:00.000Z",description:'The existing development model for cloud-native applications encounters challenges in the FaaS environment. This article introduces a novel development paradigm, "Monolithic Programming, Compile-Time Splitting, and Distributed Execution," with the objective of streamlining cloud application development, and improving development efficiency. The concept entails utilizing a compiler to automatically split monolithic application code, enabling distributed execution on cloud infrastructure.'}},{kind:"MdxPage",name:"240515-develop-ai-app-in-new-paradigm",route:"/blogs/240515-develop-ai-app-in-new-paradigm",locale:"en",frontMatter:{title:"How to Bridge the Last Mile in LangChain Application Development",date:"2024-05-15T00:00:00.000Z",description:"Deploying LangChain applications can be complex due to the need for various cloud services. This article explores the challenges developers face and introduces Pluto, a tool that enables developers to focus on writing business logic rather than getting bogged down in tedious configuration tasks."}},{kind:"Meta",locale:"en",data:{"*":{theme:{typesetting:"article"}},"240515-develop-ai-app-in-new-paradigm":"How to Bridge the Last Mile in LangChain Application Development","231227-envisioning-a-cloud-native-application-development-paradigm":"Rethinking a Cloud-Native Application Development Paradigm","has-cloud-evolved-into-infra":"Has the Cloud Truly Evolved into Infrastructure?"}},{kind:"MdxPage",name:"has-cloud-evolved-into-infra",route:"/blogs/has-cloud-evolved-into-infra",locale:"en",frontMatter:{title:"Has the Cloud Truly Evolved into Infrastructure?",date:"2023-10-27T00:00:00.000Z",description:'Pluto aims to leverage programming languages to lower the barriers for developers using the cloud, while still enjoying the convenience of existing language ecosystems and ensuring an optimal coding experience. Therefore, Pluto has given TypeScript a "makeover"...'}}]},{kind:"MdxPage",name:"blogs",route:"/blogs",locale:"en",frontMatter:{description:"The latest insights, updates and releases from the Pluto team.",type:"posts"}},{kind:"Folder",name:"cookbook",route:"/cookbook",children:[{kind:"Meta",locale:"en",data:{"rag-qa-bot-with-web":"Building a Document Q&A Bot With Web Interface","rag-qa-bot-llama3":"Document-Q&A bot based on Llama3","quickstart-python":"Simple web application using router, queue, and kvstore - Python",quickstart:"Simple web application using router, queue, and kvstore - TypeScript","langchain-llama2-sagemaker":"Deploying LangChain application integrated
1with Llama2","langchain-llama2-chatbot-sagemaker-python":"Building a Llama2 conversational chatbot with AWS and LangChain - Python","langchain-llama2-chatbot-sagemaker":"Building a Llama2 conversational chatbot with AWS and LangChain - TypeScript","gpt2-hf-sagemaker":"Deploying GPT-2 large language model on AWS SageMaker",fastapi:"Deploying FastAPI application with Pluto","deploy-langserve-to-aws":"Deploy LangServe application to AWS","daily-joke-slack":"A joke bot for slack","chat-bot":"A command-line chatbot using OpenAI API"}},{kind:"MdxPage",name:"chat-bot",route:"/cookbook/chat-bot",locale:"en",frontMatter:{title:"A command-line chatbot using OpenAI API",description:"Creates a chatbot running in a command line terminal. The chatbot supports multiple sessions and automatically saves and restores sessions.",tags:["AWS","TypeScript"]}},{kind:"MdxPage",name:"daily-joke-slack",route:"/cookbook/daily-joke-slack",locale:"en",frontMatter:{title:"A joke bot for slack",description:"Creates a simple joke bot on AWS using the Slack WebAPI. The bot will send a daily joke to a specified channel.",tags:["AWS","TypeScript"]}},{kind:"MdxPage",name:"deploy-langserve-to-aws",route:"/cookbook/deploy-langserve-to-aws",locale:"en",frontMatter:{title:"Deploy LangServe application to AWS",description:"Deploy LangServe application to AWS using Pluto, expose LangServe application through Api Gateway, support RemoteRunnable invocation, and Playground.",deployUrl:"https://codesandbox.io/p/devbox/deploy-langserve-application-to-aws-csj8wj",tags:["AWS","LangServe","Python"]}},{kind:"MdxPage",name:"fastapi",route:"/cookbook/fastapi",locale:"en",frontMatter:{title:"Deploying FastAPI application with Pluto",description:"This is an example application that shows how to adapt a FastAPI application with Pluto.",tags:["AWS","Python","FastAPI"]}},{kind:"MdxPage",name:"gpt2-hf-sagemaker",route:"/cookbook/gpt2-hf-sagemaker",locale:"en",frontMatter:{title:"Deploying GPT-2 large language model on AWS SageMaker",description:"Pluto simplifies the deployment of Hugging Face models on AWS SageMaker and enables integration with other AWS services such as SNS, DynamoDB, Lambda, and API Gateway.",tags:["AWS","TypeScript","GPT2","HuggingFace"]}},{kind:"MdxPage",name:"langchain-llama2-chatbot-sagemaker-python",route:"/cookbook/langchain-llama2-chatbot-sagemaker-python",locale:"en",frontMatter:{title:"Building a Llama2 conversational chatbot with AWS and LangChain - Python",description:"Create a simple conversational chatbot by integrating Pluto, AWS services, LangChain, and Llama2.",tags:["AWS","Python","LangChain","Llama2"]}},{kind:"MdxPage",name:"langchain-llama2-chatbot-sagemaker",route:"/cookbook/langchain-llama2-chatbot-sagemaker",locale:"en",frontMatter:{title:"Building a Llama2 conversational chatbot with AWS and LangChain - TypeScript",description:"Create a simple conversational chatbot by integrating Pluto, AWS services, LangChain, and Llama2.",tags:["AWS","TypeScript","LangChain","Llama2"]}},{kind:"MdxPage",name:"langchain-llama2-sagemaker",route:"/cookbook/langchain-llama2-sagemaker",locale:"en",frontMatter:{title:"Deploying LangChain application integrated with Llama2",description:"Deploying a LangChain application that seamlessly integrates with the Llama2 large language model using Pluto, ultimately productizing and deploying the LangChain application on the AWS cloud platform with an exposed HTTP interface.",tags:["AWS","TypeScript","LangChain","Llama2"]}},{kind:"MdxPage",name:"quickstart-python",route:"/cookbook/quickstart-python",locale:"en",frontMatter:{title:"Simple web application using router, queue, and kvstore - Python",description:"A simple web application built using Router, Queue, and KVStore, involving HTTP routing, message queue subscription, etc., that can be deployed to AWS or Kubernetes.",tags:["Python","AWS","Kubernetes"]}},{kind:"MdxPage",name:"quickstart",route:"/cookbook/quickstart",locale:"en",frontMatter:{title:"Simple web application using router, queue, and kvstore - TypeScript",description:"A simple web application built using Router, Queue, and KVStore, involving HTTP routing, message queue subscription, etc., that can be deployed to AWS or Kubernetes.",tags:["TypeScript","AWS","Kubernetes"]}},{kind:"MdxPage",name:"rag-qa-bot-llama3",route:"/cookbook/rag-qa-bot-llama3",locale:"en",frontMatter:{title:"Document-Q&A bot based on Llama3",description:"This article guides you on how to develop and deploy a document question-answering bot using Pluto, which is built upon Llama3 and LangChain. You can specify a GitHub repository, then utilize the Llama3 model to conduct Q&A based on the content of the documents.",tags:["Python","AWS","SageMaker","LangChain","Llama3"]}},{kind:"MdxPage",name:"rag-qa-bot-with-web",route:"/cookbook/rag-qa-bot-with-web",locale:"en",frontMatter:{title:"Building a Document Q&A Bot With Web Interface",description:"Construct your own Web interface document Q&A bot with LangChain, FastUI, and Pluto, all in just 5 minutes, based on your GitHub documentation repository.",tags:["OpenAI","LangChain","FastUI","RAG","Python","AWS"],deployUrl:"https://codesandbox.io/p/devbox/pluto-doc-qa-bot-forked-8njh42"}}]},{kind:"MdxPage",name:"cookbook",route:"/cookbook",locale:"en",frontMatter:{description:"Examples for building applications with Pluto, emphasizing practical and comprehensive use cases.",type:"posts"}},{kind:"Folder",name:"dev_guide",route:"/dev_guide",children:[{kind:"Meta",locale:"en",data:{dev_guide:"Developer's Guide","extend-sdk":"Extend SDK","setup-k8s-dev-env":"Set Up a Kubernetes Development Environment"}},{kind:"MdxPage",name:"dev_guide",route:"/dev_guide/dev_guide",locale:"en"},{kind:"MdxPage",name:"extend-sdk",route:"/dev_guide/extend-sdk",locale:"en"},{kind:"MdxPage",name:"setup-k8s-dev-env",route:"/dev_guide/setup-k8s-dev-env",locale:"en"}]},{kind:"Folder",name:"documentation",route:"/documentation",children:[{kind:"Meta",locale:"en",data:{introduction:"Introduction","getting-started":"Getting Started","how-pluto-works":"How Pluto Works","what-problems-pluto-aims-to-address":"What Problem does Pluto Solve?","whats-different":"Differences between Pluto and other Products",concepts:"Concepts",library:"Library","---":{type:"separator"},design:"Design"}},{kind:"Folder",name:"concepts",route:"/documentation/concepts",children:[{kind:"Meta",locale:"en",data:{deducer:"Deducer",generator:"Generator",adapter:"Adapter","arch-ref":"Architecture Reference",stack:"Stack",simulator:"Simulator",sdk:"SDK"}},{kind:"MdxPage",name:"adapter",route:"/documentation/concepts/adapter",locale:"en"},{kind:"MdxPage",name:"arch-ref",route:"/documentation/concepts/arch-ref",locale:"en",frontMatter:{title:"Architecture Reference",date:"2024-02-01T00:00:00.000Z"}},{kind:"MdxPage",name:"deducer",route:"/documentation/concepts/deducer",locale:"en"},{kind:"MdxPage",name:"generator",route:"/documentation/concepts/generator",locale:"en"},{kind:"MdxPage",name:"sdk",route:"/documentation/concepts/sdk",locale:"en"},{kind:"MdxPage",name:"simulator",route:"/documentation/concepts/simulator",locale:"en"},{kind:"MdxPage",name:"stack",route:"/documentation/concepts/stack",locale:"en"}]},{kind:"Folder",name:"design",route:"/documentation/design",children:[{kind:"Meta",locale:"en",data:{"capture-value":"Runtime Access to Values Generated by Infrastru
1cture Code at Compile Time","closure-mode":"Execution Mode Based on Compute Closures","deducer-design":"Deducer Requirements and Design","function-encapsulation":"Function Encapsulation Mechanism Design"}},{kind:"MdxPage",name:"capture-value",route:"/documentation/design/capture-value",locale:"en",frontMatter:{title:"Runtime Access to Values Generated by Infrastructure Code at Compile Time",date:"2024-01-08T00:00:00.000Z"}},{kind:"MdxPage",name:"closure-mode",route:"/documentation/design/closure-mode",locale:"en",frontMatter:{title:"Execution Mode Based on Compute Closures",date:"2024-02-01T00:00:00.000Z"}},{kind:"MdxPage",name:"deducer-design",route:"/documentation/design/deducer-design",locale:"en",frontMatter:{title:"Deducer Requirements and Design",date:"2024-02-05T00:00:00.000Z"}},{kind:"MdxPage",name:"function-encapsulation",route:"/documentation/design/function-encapsulation",locale:"en",frontMatter:{title:"Function Encapsulation Mechanism Design",date:"2024-06-06T00:00:00.000Z"}}]},{kind:"Folder",name:"getting-started",route:"/documentation/getting-started",children:[{kind:"Meta",locale:"en",data:{"online-development":"Online Development","container-development":"Container Development","local-development":"Local Development","multi-platform-deployment":"Multi-platform Deployment"}},{kind:"MdxPage",name:"container-development",route:"/documentation/getting-started/container-development",locale:"en"},{kind:"MdxPage",name:"local-development",route:"/documentation/getting-started/local-development",locale:"en"},{kind:"MdxPage",name:"multi-platform-deployment",route:"/documentation/getting-started/multi-platform-deployment",locale:"en",frontMatter:{title:"Multi-Platform Deployment"}},{kind:"MdxPage",name:"online-development",route:"/documentation/getting-started/online-development",locale:"en"}]},{kind:"MdxPage",name:"getting-started",route:"/documentation/getting-started",locale:"en"},{kind:"MdxPage",name:"how-pluto-works",route:"/documentation/how-pluto-works",locale:"en"},{kind:"MdxPage",name:"introduction",route:"/documentation/introduction",locale:"en"},{kind:"Folder",name:"library",route:"/documentation/library",children:[{kind:"Meta",locale:"en",data:{reactapp:"ReactApp",secret:"Secret",website:"Website"}},{kind:"MdxPage",name:"reactapp",route:"/documentation/library/reactapp",locale:"en",frontMatter:{title:"ReactApp"}},{kind:"MdxPage",name:"secret",route:"/documentation/library/secret",locale:"en"},{kind:"MdxPage",name:"website",route:"/documentation/library/website",locale:"en"}]},{kind:"MdxPage",name:"what-problems-pluto-aims-to-address",route:"/documentation/what-problems-pluto-aims-to-address",locale:"en"},{kind:"MdxPage",name:"whats-different",route:"/documentation/whats-different",locale:"en"}]},{kind:"MdxPage",name:"index",route:"/",locale:"en",frontMatter:{title:"Pluto - Simplify AI and Cloud App Development"}}],flexsearch:{codeblocks:!0},title:"Cookbook",headings:c},pageNextRoute:"/cookbook.en",nextraLayout:i.ZP,themeConfig:r.Z};t.default=(0,o.j)(s)},7750:function(e,t,a){"use strict";a.d(t,{H:function(){return ExampleCard}});var n=a(1527),o=a(9107),i=a.n(o),r=a(6259),l=a(429),d=a.n(l),c=a(1718),s=a(6297),u=a(9739);let g=(0,n.jsx)(s.YkZ,{});function ExampleCard(e){let{title:t,description:a,icon:o,href:l,tags:s,deployUrl:p,disableIcon:m,...h}=e;o=null!=o?o:g,m=null!=m&&m;let{locale:b}=(0,c.useRouter)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"jsx-8428fe0b52bbd7f8 relative flex flex-col block overflow-hidden shadow-lg card-main rounded-xl dark:bg-opacity-0 no-underline text-black dark:nx-text-white",children:[(0,n.jsxs)("div",{className:"jsx-8428fe0b52bbd7f8 "+((0,r.Z)("px-8 pt-8",p?"pb-2":"pb-8")||""),children:[(0,n.jsx)(d(),{href:l,target:"_blank",...h,style:{textDecoration:"none"},children:(0,n.jsxs)("div",{className:"jsx-8428fe0b52bbd7f8 inline-flex items-center space-x-3 mb-1",children:[!m&&(0,n.jsx)("div",{className:"jsx-8428fe0b52bbd7f8 flex items-center justify-center bg-black rounded-lg bg-opacity-5 w-9 h-9 icon-circle",children:o}),(0,n.jsx)("h3",{className:"jsx-8428fe0b52bbd7f8 m-0 text-lg font-semibold leading-6 tracking-tight text-gray-900 dark:nx-text-white",children:t})]})}),s&&(0,n.jsxs)("div",{className:"jsx-8428fe0b52bbd7f8 my-1",children:[(0,n.jsx)(u.$,{tags:s})," "]}),(0,n.jsx)(d(),{href:l,target:"_blank",...h,style:{textDecoration:"none"},children:(0,n.jsx)("div",{className:"jsx-8428fe0b52bbd7f8",children:(0,n.jsx)("p",{className:"jsx-8428fe0b52bbd7f8 mt-1 text-base font-medium leading-7 text-gray-500 dark:nx-text-gray-400 line-clamp-4",children:a})})})]}),(0,n.jsxs)("div",{className:"jsx-8428fe0b52bbd7f8 card-btns mt-auto flex w-full flex-row justify-center self-end text-center text-base text-gray-500 dark:nx-text-gray-400 nx-border-t",children:[(0,n.jsx)("button",{className:"jsx-8428fe0b52bbd7f8 card-btn nx-border-r flex-1 font-medium rounded-none p-4 hover:text-gray-900 dark:hover:nx-text-gray-100",children:(0,n.jsxs)(d(),{href:l,target:"_blank",...h,style:{textDecoration:"none"},children:["en"===b?"Read More":"é
读æ´å¤"," â"]})}),p&&(0,n.jsx)("button",{className:"jsx-8428fe0b52bbd7f8 card-btn border-l flex-1 font-medium rounded-none p-4 hover:text-gray-900 dark:hover:nx-text-gray-100",children:(0,n.jsxs)(d(),{href:p,target:"_blank",...h,style:{textDecoration:"none"},children:["en"===b?"Deploy Now":"ç«å³é¨ç½²"," â"]})})]})]}),(0,n.jsx)(i(),{id:"8428fe0b52bbd7f8",children:".card-main{background-color:#fff}.card-btns{border-color:#dfdfdf}.card-btn{border-color:#dfdfdf}
1.dark .card-main{background-color:#1a202c}.dark .card-btns{border-color:#2d3748}.dark .card-btn{border-color:#2d3748}.link{text-decoration:none}html .icon-circle{background:-webkit-linear-gradient(top,rgba(50,134,241,.3)0%,rgba(195,58,195,.2)100%);background:-moz-linear-gradient(top,rgba(50,134,241,.3)0%,rgba(195,58,195,.2)100%);background:-o-linear-gradient(top,rgba(50,134,241,.3)0%,rgba(195,58,195,.2)100%);background:linear-gradient(180deg,rgba(50,134,241,.3)0%,rgba(195,58,195,.2)100%)}"})]})}},9739:function(e,t,a){"use strict";a.d(t,{$:function(){return Tags}});var n=a(1527),o=a(959);let stringToHue=e=>{let t=0;for(let a=0;a<e.length;a++)t=e.charCodeAt(a)+((t<<5)-t);return Math.abs((t*=16777619)%360)},stringToColor=e=>{let t=stringToHue(e);return"hsl(".concat(t,", ").concat(70,"%, ").concat(83,"%)")},Tag=e=>{let{text:t,onClick:a}=e,[i,r]=(0,o.useState)(!1),l=stringToColor(t),d="inline-flex items-center text-sm font-medium px-2 py-0.5 rounded-lg mr-1";return a&&(d+=" cursor-pointer underline"),(0,n.jsxs)("span",{className:d,style:{backgroundColor:l,color:"black"},onClick:()=>{a&&(a(t),r(!i))},children:[i?"âï¸ ":"",t]})},Tags=e=>{let{tags:t,onClick:a}=e,o=t.map((e,t)=>(0,n.jsx)(Tag,{text:e,onClick:a},t));return(0,n.jsx)("div",{className:"block",children:(0,n.jsx)("div",{className:"flex flex-wrap",children:o})})}},2459:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return Cookbook}});var n=a(1527),o=a(1718),i=a(959),r=a(9716),l=a(2859),d=a(9739),c=a(7750);let s={"zh-CN":"æ¡ä¾",en:"Cookbook"},u={"zh-CN":"ä½¿ç¨ Pluto æå»ºçåºç¨æ¡ä¾ï¼æä¾ç«¯å°ç«¯çå®è·µæå¯¼ã",en:"Examples for building applications with Pluto, emphasizing practical and comprehensive use cases."},g={"zh-CN":"è¯è¨",en:"Language"},p={"zh-CN":"å¹³å°",en:"Platform"},m={"zh-CN":"å
¶ä»",en:"Other"};function CookbookHeader(){let{locale:e}=(0,o.useRouter)();return(0,n.jsxs)("div",{className:"max-w-screen-lg mx-auto pt-4 pb-8 mb-16 border-b border-gray-400 border-opacity-20",children:[(0,n.jsx)("h1",{children:(0,n.jsx)("span",{className:"font-bold leading-tight lg:text-5xl",children:s[e]})}),(0,n.jsx)("p",{className:"text-center text-gray-500 dark:text-gray-400 font-space-grotesk",children:u[e]})]})}function CookbookTags(e){let{setSelectedTags:t,selectedTags:a}=e,i=(0,l.HI)("/cookbook").filter(notHidden),r=i.map(e=>{var t;return flatTags(null===(t=e.frontMatter)||void 0===t?void 0:t.tags)}).flat(),c=[];r.forEach(e=>{c.some(t=>t.toLowerCase()===e.toLowerCase())||c.push(e)});let s=["TypeScript","Python"],u=["AWS","Kubernetes","AliCloud"],h=c.filter(e=>s.every(t=>t.toLowerCase()!==e.toLowerCase())&&u.every(t=>t.toLowerCase()!==e.toLowerCase())),handleTagClick=e=>{a.includes(e)?t(a.filter(t=>t!==e)):t([...a,e])},{locale:b}=(0,o.useRouter)();return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("table",{className:"block",children:(0,n.jsxs)("tbody",{children:[(0,n.jsxs)("tr",{children:[(0,n.jsxs)("td",{className:"font-bold pr-2",children:[g[b],":"]}),(0,n.jsx)("td",{children:(0,n.jsx)(d.$,{tags:s,onClick:handleTagClick})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsxs)("td",{className:"font-bold pr-2",children:[p[b],":"]}),(0,n.jsx)("td",{children:(0,n.jsx)(d.$,{tags:u,onClick:handleTagClick})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsxs)("td",{className:"font-bold pr-2",children:[m[b],":"]}),(0,n.jsx)("td",{children:(0,n.jsx)(d.$,{tags:h,onClick:handleTagClick})})]})]})})})}function CookbookIndex(e){let{selectedTags:t}=e,a=[],o=(0,l.HI)("/cookbook").filter(notHidden);for(let e of o){var i,r,d,s,u;let o=flatTags(null===(i=e.frontMatter)||void 0===i?void 0:i.tags);(0===t.length||t.every(e=>o.includes(e)))&&a.push((0,n.jsx)(c.H,{title:(null===(r=e.meta)||void 0===r?void 0:r.title)||(null===(d=e.frontMatter)||void 0===d?void 0:d.title)||e.name,description:null===(s=e.frontMatter)||void 0===s?void 0:s.description,href:e.route,deployUrl:null===(u=e.frontMatter)||void 0===u?void 0:u.deployUrl,tags:o},e.route))}return a}function Cookbook(){let[e,t]=(0,i.useState)([]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(CookbookHeader,{}),(0,n.jsx)(CookbookTags,{setSelectedTags:t,selectedTags:e}),(0,n.jsx)(r.oy,{num:"1",children:(0,n.jsx)(CookbookIndex,{selectedTags:e})})]})}function flatTags(e){return e?(Array.isArray(e)?e:Object.keys(e).reduce((t,a)=>Array.isArray(e[a])?t.concat(e[a]):t.concat([e[a]]),[])).map(e=>e.trim()):[]}function notHidden(e){var t;return(null===(t=e.meta)||void 0===t?void 0:t.display)!=="hidden"}},8471:function(e,t,a){"use strict";var n=a(1527);a(959);var o=a(1718);let i="https://github.com/pluto-lang/pluto",r={head:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("link",{rel:"pluto icon",href:"/favicon.png"})}),logo:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("span",{style:{marginLeft:".4em",fontWeight:800},children:"Pluto"})}),project:{link:i},chat:{link:"https://plutolang.slack.com/",icon:(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 54 54",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsxs)("g",{fill:"none",children:[(0,n.jsx)("path",{d:"M19.712.133a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386h5.376V5.52A5.381 5.381 0 0 0 19.712.133m0 14.365H5.376A5.381 5.381 0 0 0 0 19.884a5.381 5.381 0 0 0 5.376 5.387h14.336a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386",fill:"#44BEDF"}),(0,n.jsx)("path",{d:"M53.76 19.884a5.381 5.381 0 0 0-5.376-5.386 5.381 5.381 0 0 0-5.376 5.386v5.387h5.376a5.381 5.381 0 0 0 5.376-5.387m-14.336 0V5.52A5.381 5.381 0 0 0 34.048.133a5.381 5.381 0 0 0-5.376 5.387v14.3
164a5.381 5.381 0 0 0 5.376 5.387 5.381 5.381 0 0 0 5.376-5.387",fill:"#2EB67D"}),(0,n.jsx)("path",{d:"M34.048 54a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386h-5.376v5.386A5.381 5.381 0 0 0 34.048 54m0-14.365h14.336a5.381 5.381 0 0 0 5.376-5.386 5.381 5.381 0 0 0-5.376-5.387H34.048a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386",fill:"#ECB22E"}),(0,n.jsx)("path",{d:"M0 34.249a5.381 5.381 0 0 0 5.376 5.386 5.381 5.381 0 0 0 5.376-5.386v-5.387H5.376A5.381 5.381 0 0 0 0 34.25m14.336-.001v14.364A5.381 5.381 0 0 0 19.712 54a5.381 5.381 0 0 0 5.376-5.387V34.25a5.381 5.381 0 0 0-5.376-5.387 5.381 5.381 0 0 0-5.376 5.387",fill:"#E01E5A"})]})})},docsRepositoryBase:i,footer:{text:(0,n.jsx)(n.Fragment,{children:"The Pluto documentation."})},search:{placeholder:()=>{let{locale:e}=(0,o.useRouter)();return"zh-CN"===e?"æç´¢ææ¡£...":"Search documentation..."}},i18n:[{locale:"en",text:"English"},{locale:"zh-CN",text:"ç®ä½ä¸æ"}],useNextSeoProps(){let{asPath:e}=(0,o.useRouter)();if(!e.startsWith("/index",0))return{titleTemplate:"%s â Pluto"}},editLink:{component:e=>{let t,{children:a,...o}=e;if(/\/cookbook\//g.test(o.filePath)){let[e,a,n]=o.filePath.split("/").pop().split("."),i=("en"===a?"README":"README_zh")+".".concat(n);t="examples/".concat(e,"/").concat(i)}else t=o.filePath.replace("pages","docs");let r="".concat(i,"/tree/main/").concat(t);return(0,n.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",className:"nx-text-xs nx-font-medium nx-text-gray-500 hover:nx-text-gray-900 dark:nx-text-gray-400 dark:hover:nx-text-gray-100 contrast-more:nx-text-gray-800 contrast-more:dark:nx-text-gray-50",children:"Edit this page"})}},feedback:{labels:"documentation&template=documentation.yml"}};t.Z=r},5184:function(){},2859:function(e,t,a){"use strict";a.d(t,{HI:function(){return getPagesUnderRoute}});var n=a(2192),o=a(9263);function getPagesUnderRoute(e){let{pageMap:t}=function(e){let t=globalThis[n.eZ];if(!t)throw Error(`Nextra context not found. Please make sure you are using "${e}" of "nextra/context" on a Nextra page.`);return{pageMap:t.pageMap,route:t.route}}("getPagesUnderRoute");return function filter(e,t){let a=[],n=[],i=e.find(e=>"Meta"===e.kind),r=i?.data||{};for(let i of e){if("Meta"===i.kind)continue;let e=(0,o.k0)(r[i.name]),l={...i,...Object.keys(e||{}).length>0&&{meta:e}};if("Folder"===l.kind){let e=filter(l.children,t);l.children=e.items,e.activeLevelPages.length?a=e.activeLevelPages:l.route!==t||a.length||(a=l.children)}n.push(l)}let l=Object.keys(r);return n.sort((e,t)=>{let a=l.indexOf(e.name),n=l.indexOf(t.name);return -1===a&&-1===n?e.name<t.name?-1:1:-1===a?1:-1===n?-1:a-n}),{items:n,activeLevelPages:a}}(t,e).activeLevelPages}}},function(e){e.O(0,[5406,6818,3910,4972,9774,2888,6377],function(){return e(e.s=3548)}),_N_E=e.O()}]);
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.