[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation":3,"url-settings":80,"blog-\u002Fblog\u002Fbuild-a-copilot-with-phi-2-using-pieces-client":589,"blog-author-\u002Fblog\u002Fbuild-a-copilot-with-phi-2-using-pieces-client":1005},{"id":4,"extension":5,"footer":6,"header":66,"meta":77,"stem":78,"__hash__":79},"navigation\u002Fdata\u002Fshared\u002Fnavigation.yml","yml",{"brand":7,"columns":10,"legal":56},{"name":8,"tagline":9},"Pieces","The memory layer for modern work.",[11,26,41],{"title":12,"links":13},"Product",[14,17,21,24],{"label":15,"href":16},"Pieces Desktop","\u002Fdownloads",{"label":18,"href":19,"external":20},"Pieces MCP","url:docs.mcp.overview",true,{"label":22,"href":23,"external":20},"Pieces APIs","url:docs.api",{"label":25,"href":16},"Downloads",{"title":27,"links":28},"Resources",[29,32,35,38],{"label":30,"href":31,"external":20},"Documentation","url:docs.home",{"label":33,"href":34},"Blog","\u002Fblog",{"label":36,"href":37},"Changelog","\u002Fchangelog",{"label":39,"href":40,"external":20},"GitHub","url:github.org",{"title":42,"links":43},"Company",[44,47,50,53],{"label":45,"href":46},"About","\u002Fabout",{"label":48,"href":49},"Enterprise","\u002Fenterprise",{"label":51,"href":52,"external":20},"Discord","url:social.discord",{"label":54,"href":55,"external":20},"X \u002F Twitter","url:social.x",[57,60,63],{"label":58,"href":59,"external":20},"Privacy Policy","url:legal.privacyPolicy",{"label":61,"href":62,"external":20},"Refund Policy","url:legal.refundPolicy",{"label":64,"href":65,"external":20},"Terms of Service","url:legal.terms",{"links":67,"signIn":68,"contact":71,"cta":74},[],{"label":69,"href":70},"Sign in","url:portal.home",{"label":72,"href":73},"Contact sales","url:site.contact",{"label":75,"href":76},"Download","url:routes.downloads",{},"data\u002Fshared\u002Fnavigation","Ia8tCWWqcGvuaIro8jwZ3HH-MwI66yqJpWshASJdYQ0",{"id":81,"extension":5,"links":82,"meta":586,"stem":587,"__hash__":588},"urlSettings\u002Fdata\u002Fshared\u002Furls.yml",[83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143,147,151,155,159,163,167,171,175,179,183,187,191,195,199,203,207,211,215,219,223,227,231,235,238,242,246,249,253,257,261,265,269,273,277,281,285,289,293,297,301,305,309,313,317,321,325,329,333,337,341,345,349,353,357,361,365,369,373,377,381,385,389,393,396,400,404,408,412,416,420,423,426,429,432,436,440,444,448,452,456,460,464,468,472,476,480,484,488,492,495,499,503,507,511,515,519,523,527,531,534,538,542,546,550,553,557,561,565,568,571,575,579,582],{"key":84,"label":85,"href":86},"downloads.desktop","Desktop download page","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdownload",{"key":88,"label":89,"href":90},"downloads.macOS.dmgArm64","macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg-arm64\u002Fdownload",{"key":92,"label":93,"href":94},"downloads.macOS.dmgIntel","macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg\u002Fdownload",{"key":96,"label":97,"href":98},"downloads.macOS.pkg","macOS PKG","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg\u002Fdownload",{"key":100,"label":101,"href":102},"downloads.windows.appinstaller","Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fpieces_for_x.appinstaller",{"key":104,"label":105,"href":106},"downloads.windows.exe","Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-exe\u002Fdownload",{"key":108,"label":109,"href":110},"downloads.windows.suiteManager","Windows Suite Manager","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_suite_windows\u002Fappinstaller\u002Fdownload",{"key":112,"label":113,"href":114},"downloads.linux.flatpakRepo","Linux Flatpak repository","https:\u002F\u002Fbuilds.pieces.app\u002Fpieces-flatpak-repo\u002Fpieces-flatpak.flatpakrepo",{"key":116,"label":117,"href":118},"downloads.linux.snapDesktop","Linux Snap Desktop","https:\u002F\u002Fsnapcraft.io\u002Fpieces-for-developers",{"key":120,"label":121,"href":122},"downloads.linux.snapPiecesOS","Linux Snap PiecesOS","https:\u002F\u002Fsnapcraft.io\u002Fpieces-os",{"key":124,"label":125,"href":126},"downloads.piecesOS.macOS.dmgArm64","PiecesOS macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg-arm64\u002Fdownload",{"key":128,"label":129,"href":130},"downloads.piecesOS.macOS.dmgIntel","PiecesOS macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg\u002Fdownload",{"key":132,"label":133,"href":134},"downloads.piecesOS.windows.appinstaller","PiecesOS Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fos_server.appinstaller",{"key":136,"label":137,"href":138},"downloads.piecesOS.windows.exe","PiecesOS Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-exe\u002Fdownload",{"key":140,"label":141,"href":142},"downloads.guides.macOS","macOS installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fmacos-installation-guide",{"key":144,"label":145,"href":146},"downloads.guides.windows","Windows installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fwindows-installation-guide",{"key":148,"label":149,"href":150},"downloads.guides.linux","Linux installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide",{"key":152,"label":153,"href":154},"downloads.guides.piecesOS","PiecesOS manual installation","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fmanual-installation",{"key":156,"label":157,"href":158},"extensions.chrome","Chrome extension","https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fpieces-save-code-snippets\u002Figbgibhbfonhmjlechmeefimncpekepm",{"key":160,"label":161,"href":162},"extensions.firefox","Firefox add-on","https:\u002F\u002Faddons.mozilla.org\u002Fen-US\u002Ffirefox\u002Faddon\u002Fpieces-save-code-from-the-web\u002F",{"key":164,"label":165,"href":166},"extensions.edge","Edge add-on","https:\u002F\u002Fmicrosoftedge.microsoft.com\u002Faddons\u002Fdetail\u002Fpieces-save-code-snippet\u002Fhglfimcdgonaeeobjckfdabcldfidmim",{"key":168,"label":169,"href":170},"extensions.vscode","VS Code extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.pieces-vscode",{"key":172,"label":173,"href":174},"extensions.visualStudio","Visual Studio extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.PiecesVisualStudio",{"key":176,"label":177,"href":178},"extensions.jetbrains","JetBrains plugin","https:\u002F\u002Fplugins.jetbrains.com\u002Fplugin\u002F17328-pieces--save-search-share--reuse-code-snippets",{"key":180,"label":181,"href":182},"extensions.obsidian","Obsidian plugin","https:\u002F\u002Fobsidian.md\u002Fplugins?id=pieces-for-developers",{"key":184,"label":185,"href":186},"extensions.sublime","Sublime package","https:\u002F\u002Fpackagecontrol.io\u002Fpackages\u002FPieces",{"key":188,"label":189,"href":190},"extensions.neovim","Neovim plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neo_vim",{"key":192,"label":193,"href":194},"extensions.jupyterlab","JupyterLab plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fjupyterlab-pieces",{"key":196,"label":197,"href":198},"extensions.cli","Pieces CLI","https:\u002F\u002Fpypi.org\u002Fproject\u002Fpieces-cli\u002F",{"key":200,"label":201,"href":202},"docs.home","Documentation home","https:\u002F\u002Fdocs.pieces.app",{"key":204,"label":205,"href":206},"docs.getStarted","Get started docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces",{"key":208,"label":209,"href":210},"docs.api","API docs","https:\u002F\u002Fdocs.pieces.app\u002Fapi",{"key":212,"label":213,"href":214},"docs.desktop.overview","Desktop overview","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop",{"key":216,"label":217,"href":218},"docs.desktop.onboarding","Desktop onboarding","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fonboarding",{"key":220,"label":221,"href":222},"docs.desktop.timeline","Desktop timeline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Ftimeline",{"key":224,"label":225,"href":226},"docs.desktop.summaries","Desktop summaries docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fsingle-click-summaries",{"key":228,"label":229,"href":230},"docs.desktop.search","Desktop conversational search docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconversational-search",{"key":232,"label":233,"href":234},"docs.desktop.drive","Desktop drive docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdrive",{"key":236,"label":237,"href":86},"docs.desktop.download","Desktop download docs",{"key":239,"label":240,"href":241},"docs.piecesOS.overview","PiecesOS overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies",{"key":243,"label":244,"href":245},"docs.piecesOS.details","PiecesOS details docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os",{"key":247,"label":248,"href":154},"docs.piecesOS.install","PiecesOS install docs",{"key":250,"label":251,"href":252},"docs.piecesOS.quickMenu","PiecesOS quick menu docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fquick-menu",{"key":254,"label":255,"href":256},"docs.piecesOS.storage","On-device storage docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fon-device-storage",{"key":258,"label":259,"href":260},"docs.piecesOS.troubleshooting","PiecesOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Ftroubleshooting",{"key":262,"label":263,"href":264},"docs.mcp.overview","MCP overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp",{"key":266,"label":267,"href":268},"docs.mcp.cursor","MCP Cursor docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcursor",{"key":270,"label":271,"href":272},"docs.mcp.vscode","MCP VS Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fvs-code",{"key":274,"label":275,"href":276},"docs.mcp.claudeDesktop","MCP Claude Desktop docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-desktop",{"key":278,"label":279,"href":280},"docs.mcp.claudeCode","MCP Claude Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-code",{"key":282,"label":283,"href":284},"docs.mcp.claudeCowork","MCP Claude Cowork docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-cowork",{"key":286,"label":287,"href":288},"docs.mcp.githubCopilot","MCP GitHub Copilot docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgithub-copilot",{"key":290,"label":291,"href":292},"docs.mcp.goose","MCP Goose docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoose",{"key":294,"label":295,"href":296},"docs.mcp.windsurf","MCP Windsurf docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fwindsurf",{"key":298,"label":299,"href":300},"docs.mcp.zed","MCP Zed docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fzed",{"key":302,"label":303,"href":304},"docs.mcp.jetbrains","MCP JetBrains docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fjetbrains-ides",{"key":306,"label":307,"href":308},"docs.mcp.continueDev","MCP Continue docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcontinue-dev",{"key":310,"label":311,"href":312},"docs.mcp.cline","MCP Cline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcline",{"key":314,"label":315,"href":316},"docs.mcp.raycast","MCP Raycast docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fraycast",{"key":318,"label":319,"href":320},"docs.mcp.rovoDevCli","MCP Rovo Dev CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Frovo-dev-cli",{"key":322,"label":323,"href":324},"docs.mcp.openaiCodexCli","MCP OpenAI Codex CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenai-codex-cli",{"key":326,"label":327,"href":328},"docs.mcp.googleGeminiCli","MCP Google Gemini CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoogle-gemini-cli",{"key":330,"label":331,"href":332},"docs.mcp.amazonQ","MCP Amazon Q docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Famazon-q-developer",{"key":334,"label":335,"href":336},"docs.mcp.chatgptDev","MCP ChatGPT Developer Mode docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fchatgpt-developer-mode",{"key":338,"label":339,"href":340},"docs.mcp.openclaw","MCP OpenClaw docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenclaw",{"key":342,"label":343,"href":344},"docs.mcp.mcpRemote","MCP Remote docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fmcp-remote",{"key":346,"label":347,"href":348},"docs.mcp.ngrok","MCP ngrok docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fngrok-setup",{"key":350,"label":351,"href":352},"docs.troubleshooting.macOS","macOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fmacos",{"key":354,"label":355,"href":356},"docs.troubleshooting.windows","Windows troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fwindows",{"key":358,"label":359,"href":360},"docs.troubleshooting.linux","Linux troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Flinux",{"key":362,"label":363,"href":364},"docs.privacy","Privacy and security docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fprivacy-security-your-data",{"key":366,"label":367,"href":368},"docs.support","Support docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fsupport",{"key":370,"label":371,"href":372},"portal.home","Pieces portal","https:\u002F\u002Fportal.pieces.app",{"key":374,"label":375,"href":376},"site.home","Website home","https:\u002F\u002Fpieces.app",{"key":378,"label":379,"href":380},"site.about","About page","https:\u002F\u002Fpieces.app\u002Fabout",{"key":382,"label":383,"href":384},"site.features","Features page","https:\u002F\u002Fpieces.app\u002Ffeatures",{"key":386,"label":387,"href":388},"site.plugins","Plugins page","https:\u002F\u002Fpieces.app\u002Fplugins",{"key":390,"label":391,"href":392},"site.contact","Contact page","https:\u002F\u002Fpieces.app\u002Fcontact",{"key":394,"label":36,"href":395},"site.changelog","https:\u002F\u002Fpieces.app\u002Fchangelog",{"key":397,"label":398,"href":399},"site.news","News","https:\u002F\u002Fpieces.app\u002Fnews",{"key":401,"label":402,"href":403},"site.events","Community events","https:\u002F\u002Fpieces.app\u002Fcommunity\u002Fevents",{"key":405,"label":406,"href":407},"site.userStories","User stories","https:\u002F\u002Fpieces.app\u002Fuser-stories",{"key":409,"label":410,"href":411},"site.academy","Academy","https:\u002F\u002Fpieces.app\u002Flearn\u002Facademy",{"key":413,"label":414,"href":415},"site.support","Website support","https:\u002F\u002Fpieces.app\u002Fsupport",{"key":417,"label":418,"href":419},"site.standup","Standup","https:\u002F\u002Fpieces.app\u002Fstandup",{"key":421,"label":33,"href":422},"site.blog","https:\u002F\u002Fcode.pieces.app\u002Fblog",{"key":424,"label":51,"href":425},"social.discord","https:\u002F\u002Fdiscord.gg\u002Fgetpieces",{"key":427,"label":54,"href":428},"social.x","https:\u002F\u002Fx.com\u002Fgetpieces",{"key":430,"label":431,"href":428},"social.twitter","Twitter",{"key":433,"label":434,"href":435},"social.instagram","Instagram","https:\u002F\u002Fwww.instagram.com\u002Fgetpieces\u002F",{"key":437,"label":438,"href":439},"social.tiktok","TikTok","https:\u002F\u002Fwww.tiktok.com\u002F@getpieces",{"key":441,"label":442,"href":443},"social.linkedin","LinkedIn","https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fgetpieces\u002F",{"key":445,"label":446,"href":447},"social.youtube","YouTube","https:\u002F\u002Fyoutube.com\u002F@getpieces",{"key":449,"label":450,"href":451},"github.org","GitHub organization","https:\u002F\u002Fgithub.com\u002Fpieces-app",{"key":453,"label":454,"href":455},"github.support","GitHub support","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport",{"key":457,"label":458,"href":459},"github.issues","GitHub issues","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fissues",{"key":461,"label":462,"href":463},"github.discussions","GitHub discussions","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fdiscussions",{"key":465,"label":466,"href":467},"github.documentation","GitHub documentation","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fdocumentation",{"key":469,"label":470,"href":471},"github.opensource","GitHub open source","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fopensource",{"key":473,"label":474,"href":475},"github.sdks.python","Python SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-python",{"key":477,"label":478,"href":479},"github.sdks.typescript","TypeScript SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-typescript",{"key":481,"label":482,"href":483},"github.sdks.dart","Dart SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-dart",{"key":485,"label":486,"href":487},"github.sdks.kotlin","Kotlin SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-kotlin",{"key":489,"label":490,"href":491},"github.plugins.obsidian","Obsidian plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fobsidian-pieces",{"key":493,"label":494,"href":194},"github.plugins.jupyterlab","JupyterLab plugin repository",{"key":496,"label":497,"href":498},"github.plugins.sublime","Sublime plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_sublime",{"key":500,"label":501,"href":502},"github.plugins.neovim","Neovim plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neovim",{"key":504,"label":505,"href":506},"github.cliAgent","CLI agent repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fcli-agent",{"key":508,"label":509,"href":510},"github.mcpDart","MCP Dart repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fmcp_dart",{"key":512,"label":513,"href":514},"github.awesomePieces","Awesome Pieces repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fawesome-pieces",{"key":516,"label":517,"href":518},"legal.privacyPolicy","Privacy policy","https:\u002F\u002Fpieces.app\u002Flegal\u002Fprivacy-policy",{"key":520,"label":521,"href":522},"legal.refundPolicy","Refund policy","https:\u002F\u002Fpieces.app\u002Flegal\u002Frefund-policy",{"key":524,"label":525,"href":526},"legal.terms","Terms","https:\u002F\u002Fpieces.app\u002Flegal\u002Fterms",{"key":528,"label":529,"href":530},"legal.security","Legal security","https:\u002F\u002Fpieces.app\u002Flegal\u002Fsecurity",{"key":532,"label":533,"href":447},"videos.youtubeChannel","YouTube channel",{"key":535,"label":536,"href":537},"videos.gettingStartedDesktop","Getting started desktop video","https:\u002F\u002Fyoutu.be\u002FdUr1lRM_TYk",{"key":539,"label":540,"href":541},"videos.snippetDiscovery","Snippet discovery video","https:\u002F\u002Fyoutu.be\u002FG6vb1USw-30",{"key":543,"label":544,"href":545},"sales.bookACall","Book a sales call","https:\u002F\u002Fcalendar.app.google\u002FWVUDtUfNy5Vst3sH7",{"key":547,"label":548,"href":549},"sales.enterprise","Enterprise form","https:\u002F\u002Fgetpieces.typeform.com\u002Fto\u002FaVQFTvpE",{"key":551,"label":552,"href":463},"sales.feedback","Feedback discussions",{"key":554,"label":555,"href":556},"sales.earlyAccess","Early access form","https:\u002F\u002Fgetpieces.typeform.com\u002Fearlyaccess",{"key":558,"label":559,"href":560},"sales.supportEmail","Support email","mailto:support@pieces.app",{"key":562,"label":563,"href":564},"routes.home","Home route","\u002F",{"key":566,"label":567,"href":46},"routes.about","About route",{"key":569,"label":570,"href":16},"routes.downloads","Downloads route",{"key":572,"label":573,"href":574},"routes.pricing","Pricing route","\u002Fpricing",{"key":576,"label":577,"href":578},"routes.security","Security route","\u002Fsecurity",{"key":580,"label":581,"href":49},"routes.enterprise","Enterprise route",{"key":583,"label":584,"href":585},"routes.thankYou","Thank you \u002F download route","\u002Fthank-you",{},"data\u002Fshared\u002Furls","P27xKEauu8D-8sfyr0wR4giF0teFSaCuAQ8kgcICQdI",{"id":590,"title":591,"author":592,"authorPhoto":593,"authorPhotoAlt":594,"authorSlug":595,"body":596,"buttonText":992,"buttonUrl":992,"category":993,"date":994,"description":995,"draft":996,"editorsPick":996,"extension":997,"featured":996,"image":998,"imageAlt":999,"meta":1000,"navigation":20,"ogImage":992,"ogImageAlt":992,"path":1001,"seo":1002,"stem":1003,"tags":992,"__hash__":1004},"blog\u002Fblog\u002Fbuild-a-copilot-with-phi-2-using-pieces-client.md","Build a Copilot with PHI-2 Using Pieces Client","The Pieces Team","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fannouncing-the-pieces-visual-studio-extension\u002Fauthor.png","Pieces logo.","the-pieces-team",{"type":597,"value":598,"toc":979},"minimark",[599,608,613,624,637,640,644,647,650,653,657,666,673,678,681,700,703,707,715,722,732,739,750,756,762,765,769,784,790,796,799,833,838,848,851,857,863,875,878,882,894,901,907,913,920,926,932,935,941,947,954,958,971],[600,601,602,603,607],"p",{},"Welcome back for the fourth article in the Pieces Copilot Series ",[604,605,606],"strong",{},"Building Your Own Copilot with Pieces OS Client"," where we’ll dive into adding Microsoft's Phi-2 model into our project. This is a shorter example that is specific to Phi-2, with code snippets that you can copy & paste into your project to use. Check out the other articles in this series to learn about different model usage and creating your initial copilot.",[609,610,612],"h2",{"id":611},"prerequisites","Prerequisites",[600,614,615,616,623],{},"We recommend getting familiar with our ",[617,618,622],"a",{"href":619,"rel":620},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fbuild-your-own-open-source-copilot-with-pieces",[621],"nofollow","Overview on Copilots",".",[600,625,626,627,632,633,623],{},"If you want to build along with this tutorial, you will need ",[617,628,631],{"href":629,"rel":630},"https:\u002F\u002Fdocs.pieces.app\u002Finstallation-getting-started\u002Fpieces-os",[621],"Pieces OS",". If you are interested in a different language implementation, you can check out the other resources found on our ",[617,634,636],{"href":471,"rel":635},[621],"open-source repo",[600,638,639],{},"Let’s get into the ins and outs of adding a new model to a simple project based in Typescript using Node and ESBuild. Remember that you can apply this same structure to your project with the snippets included here and the proper inputs.",[609,641,643],{"id":642},"why-use-microsofts-phi-2","Why Use Microsoft’s Phi-2?",[600,645,646],{},"Phi-2 is a 2.7 billion-parameter language model that demonstrates outstanding reasoning and language understanding capabilities, showcasing state-of-the-art performance among base language models with less than 13 billion parameters",[600,648,649],{},"Due to its size, Phi-2 is a great tool for researchers to use while exploring interoperability, fine-tuning experiments, and diving into safety improvements they can implement in their respective environments. As more models are introduced, the need for smaller (and more powerful) models rises on devices with less resource allocation. Most users are not operating on a top-of-the-line processor or do not have access to an external GPU.",[600,651,652],{},"Lightweight models are taking the copilot ecosystem by storm, and provide even further benefits in an offline environment.",[609,654,656],{"id":655},"get-started-with-the-copilot","Get Started with the Copilot",[600,658,659,660,665],{},"Let’s get into the code and start adding this new model to our ",[617,661,664],{"href":662,"rel":663},"https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-copilot-vanilla-typescript-example",[621],"Copilot Starter Project",". If you want to follow along and start your project, you can use this guide, just be sure to have Pieces OS installed and the SDK added to your repo.",[600,667,668,669,672],{},"In previous articles, we covered several topics, and this will follow a similar path. The only difference about this article is that once we download the model itself, we will ",[604,670,671],{},"turn off our wifi"," to show the power of Phi-2’s offline functionality.",[674,675,677],"h3",{"id":676},"catching-back-up","Catching Back Up",[600,679,680],{},"So far in this series, we have:",[682,683,684,688,691,694,697],"ul",{},[685,686,687],"li",{},"Created our own copilot that can swap between cloud LLMs",[685,689,690],{},"Added in local model downloading that monitors the progress of the download",[685,692,693],{},"Used a specific model once and then changed to another model to compare answers",[685,695,696],{},"Added local context to leverage our local data in copilot chats",[685,698,699],{},"Added downloadable LLLM's Mistral and Llama7b (in both GPU and CPU versions)",[600,701,702],{},"In this article, we will download the new Phi-2 Model from Microsoft, then use it offline and compare the results with other models’ results to show the power of these smaller models.",[609,704,706],{"id":705},"downloading-phi-2","Downloading Phi-2",[600,708,709,710,714],{},"Before we turn off our internet, we should use the Pieces Client to download our models after we get the initial logic added. Let’s start in the ",[711,712,713],"code",{},"index.html"," file where we have our radio buttons that control model selection. Each radio corresponds to a model and allows any available models to be used with the text prompt.",[600,716,717,718,721],{},"Let’s add the new radio buttons in the ",[711,719,720],{},"\u003Cform>"," elements with your labels:",[723,724,729],"pre",{"className":725,"code":727,"language":728},[726],"language-text","\u003Cinput type=\"radio\" name=\"models\" id=\"phi2-cpu-radio\">\n\u003Clabel for=\"phi2-cpu-radio\">Phi-2 (CPU)\u003C\u002Flabel>\n\n\u003Cinput type=\"radio\" name=\"models\" id=\"phi2-gpu-radio\">\n\u003Clabel for=\"phi2-gpu-radio\">Phi-2 (GPU)\u003C\u002Flabel>\n","text",[711,730,727],{"__ignoreMap":731},"",[600,733,734],{},[617,735,738],{"href":736,"rel":737},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=4a834fb919",[621],"Save this Snippet",[600,740,741,742,745,746,749],{},"These will let you select a model just by clicking the radio. Now that we have created these, we want to move deeper into the project and get the ",[711,743,744],{},"model"," information that we can use to control the download or show information. In the ",[711,747,748],{},"\u002Fsrc\u002Findex.ts"," file you can add your model variables underneath the others used for Mistral and Llama2:",[723,751,754],{"className":752,"code":753,"language":728},[726],"\u002F\u002F Phi-2 Local Models\nconst phi2Cpu = models.iterable.find((model) => \n    model.foundation === Pieces.ModelFoundationEnum.Phi2 && model.cpu\n)!;\n\nconst phi2Gpu = models.iterable.find((model) => \n    model.foundation === Pieces.ModelFoundationEnum.Phi2 && !model.cpu\n)!;\n",[711,755,753],{"__ignoreMap":731},[600,757,758],{},[617,759,738],{"href":760,"rel":761},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=373d439b53",[621],[600,763,764],{},"The snippet includes both of the model selectors for GPU and CPU. Let's go down the CPU route and use that as our example. Remember: the CPU and GPU logic and steps to set this up are identical except for the naming.",[609,766,768],{"id":767},"create-enable-phi-2-download-buttons","Create & Enable Phi-2 Download Buttons",[600,770,771,772,775,776,779,780,783],{},"Now that the radios have been added for model selection, we need to make sure that something happens when the radio is clicked. Before the model is downloaded, it also needs to be ",[711,773,774],{},"disabled"," so it cannot be set as an active model by clicking the radio. Then we can be sure to add the appropriate model and a few elements to the UI to assist with the conditionals. Start by creating the ",[711,777,778],{},"phi2CpuRadio"," variable that uses ",[711,781,782],{},".getElementById"," to target the radio button we created before:",[723,785,788],{"className":786,"code":787,"language":728},[726],"const phi2CpuRadio: HTMLElement | null = document.getElementById(\"phi2-cpu-radio\") as HTMLInputElement | null;\n",[711,789,787],{"__ignoreMap":731},[600,791,792],{},[617,793,738],{"href":794,"rel":795},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=f4ec45b78a",[621],[600,797,798],{},"Then we can create the full check to see:",[682,800,801,807,813,819,826],{},[685,802,803,804],{},"Whether or not the model is downloaded with ",[711,805,806],{},"if(!phi2Cpu?.downloaded)",[685,808,809,810],{},"What buttons should be added to the dom with ",[711,811,812],{},"document.createElement",[685,814,815,816],{},"Start the download with ",[711,817,818],{},"Pieces.ModelApi().modelSpecificModelDownload()",[685,820,821,822,825],{},"Create the id using the model ",[711,823,824],{},"id"," value so we can reference it uniquely",[685,827,828,829,832],{},"How to delete a model using ",[711,830,831],{},"ModelsApi.modelDeleteSpecificModelCache()"," if the model is already downloaded",[834,835,837],"h4",{"id":836},"creating-model-download-buttons","Creating Model Download Buttons",[600,839,840,841,843,844,847],{},"Since we created the radio buttons to include a few helpful qualities like ",[711,842,824],{},"s and the ability to use ",[711,845,846],{},"appendChild"," to attach elements later on, we can create a powerful flow that will either allow for a download of the Phi-2 model or the deletion of the same model.",[600,849,850],{},"Take a look at this snippet and its comments:",[723,852,855],{"className":853,"code":854,"language":728},[726],"\u002F\u002F Phi2 Cpu\nconst phi2CpuRadio: HTMLElement | null = document.getElementById(\"phi2-cpu-radio\") as HTMLInputElement | null;\n\nif (!phi2Cpu?.downloaded) {\n    phi2CpuRadio?.setAttribute('disabled', 'true');\n\n    \u002F\u002F Download container where we store the button for downloading.\n    const downloadPhi2CpuContainer = document.createElement(\"div\");\n    modelDownloadsContainer.appendChild(downloadPhi2CpuContainer);\n\n    \u002F\u002F The button that performs the action itself.\n    const downloadPhi2CpuButton = document.createElement(\"button\");\n    downloadPhi2CpuButton.innerText = \"Download Phi-2 CPU\";\n    downloadPhi2CpuContainer.appendChild(downloadPhi2CpuButton);\n\n    \u002F\u002F Download action\n    downloadPhi2CpuButton.onclick = () => {\n        new Pieces.ModelApi().modelSpecificModelDownload({ model: phi2Cpu.id });\n    }\n\n    \u002F\u002F Appends our container where we show the status of download.\n    const phi2CpuDownloadProgress = document.createElement(\"div\");\n    downloadPhi2CpuContainer.appendChild(phi2CpuDownloadProgress);\n\n    \u002F\u002F This id is how we identify the correct download progress box and get updates from the webhook.\n    phi2CpuDownloadProgress.id = `download-progress-${phi2Cpu.id}`;\n} else {\n    \u002F\u002F If the model is not downloaded, then the delete button will be added,\n    \u002F\u002F and the model files can be deleted to free up space or redownload.\n    const deletePhi2CpuButton = document.createElement(\"button\");\n    modelDownloadsContainer.appendChild(deletePhi2CpuButton);\n    deletePhi2CpuButton.innerText = 'Delete Phi2 (CPU)';\n\n    \u002F\u002F This delete button takes the model's id and then removes the model files through the Pieces.ModelsApi usage.\n    deletePhi2CpuButton.onclick = () => {\n        new Pieces.ModelsApi().modelsDeleteSpecificModelCache({ model: phi2Cpu.id, modelDeleteCacheInput: {} })\n            .then(() => {\n                window.location.reload();\n            });\n    }\n}\n",[711,856,854],{"__ignoreMap":731},[600,858,859],{},[617,860,738],{"href":861,"rel":862},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=2b34418f4d",[621],[600,864,865,866,869,870,623],{},"Now that the buttons are added, refresh your page. You’ll see the buttons there to \"Download Phi-2 CPU\". Go ahead and let that download finish, as you can watch it take place until it completes with the percentage updates coming from the ",[711,867,868],{},"ModelProgressController"," that is covered in depth in the article ",[617,871,874],{"href":872,"rel":873},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fhow-to-build-a-copilot-using-local-llms-with-pieces-client",[621],"How to Build a Copilot Using Local Large Language Models with Pieces Client",[600,876,877],{},"At this point, you can turn your WIFI off if you would like, as I am for the remainder of this article, to show the offline power and capability of a lightweight model in combination with Pieces Client.",[609,879,881],{"id":880},"using-phi-2-with-your-queries","Using Phi-2 With Your Queries",[600,883,884,885,889,890,893],{},"We can take the model that was just downloaded and append it to the data we are sending when we ask the copilot a question. We can pass the value of our selected model into the stream controller we set up. If you are building your project, you can get the entire ",[617,886,888],{"href":861,"rel":887},[621],"stream controller file",". Just add the ",[711,891,892],{},"CopilotStreamController.tsx"," file to the same folder as your index.ts.",[600,895,896,897,900],{},"Let's take a look at the specifics of asking a question with the Phi-2 models in ",[711,898,899],{},"askQGPT",":",[723,902,905],{"className":903,"code":904,"language":728},[726],"const input: Pieces.QGPTStreamInput = {\n    question: {\n        query, \u002F\u002F this is where the model itself is passed in.\n        model: CopilotStreamController.selectedModelId\n    },\n};\n",[711,906,904],{"__ignoreMap":731},[600,908,909],{},[617,910,738],{"href":911,"rel":912},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=cc754e9d10",[621],[600,914,915,916,919],{},"The ",[711,917,918],{},"CopilotStreamController.selectedModelId"," value is updated when the download finishes by simply reloading the page. This allows for the model to be detected when the DOM loads:",[723,921,924],{"className":922,"code":923,"language":728},[726],"\u002F\u002F When the models complete downloading, we refresh the page \n\u002F\u002F to detect what models are now downloaded.\nif (event.status === Pieces.ModelDownloadProgressStatusEnum.Completed) {\n    window.location.reload();\n}\n",[711,925,923],{"__ignoreMap":731},[600,927,928],{},[617,929,738],{"href":930,"rel":931},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=d68b45a446",[621],[600,933,934],{},"Alternatively, if you wanted to pass in your model ID in the same file with the stream input, you could pass in your ID directly to the model parameter:",[723,936,939],{"className":937,"code":938,"language":728},[726],"const input: Pieces.QGPTStreamInput = {\n    question: {\n        query, \u002F\u002F this is where the model itself is passed in.\n        model: phi2Cpu.id\n    }\n};\n",[711,940,938],{"__ignoreMap":731},[600,942,943],{},[617,944,738],{"href":945,"rel":946},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=42a142a1b3",[621],[600,948,949,950,953],{},"Now the model can be accessed and utilized by the ",[711,951,952],{},"Pieces.QGPTStreamInput"," when a question is asked, as long as the radio button is selected. Then you can start to ask different questions and see the Phi-2 model's responses in this offline environment.",[609,955,957],{"id":956},"conclusion","Conclusion",[600,959,960,961,966,967,623],{},"Now that you have seen some of the basic functionality of the Client - downloading and then using that model specifically in the chat question - you can start to understand the capabilities in an offline environment. To go along with this blog, you can get started with ",[617,962,965],{"href":963,"rel":964},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fbuild-your-own-copilot-with-local-context",[621],"Adding Context to Copilot Conversations"," to take this one step further and reference your local data to craft more specific copilot responses. All of the above examples are available inside of the ",[617,968,970],{"href":662,"rel":969},[621],"Pieces Copilot Vanilla Example Project",[600,972,973,974,978],{},"Thanks for reading along, and be sure to stay up to date with the newest blogs on using the Pieces Client and communicating with your local copilot after you check out the rest of the series and ",[617,975,977],{"href":471,"rel":976},[621],"join our open source program","!",{"title":731,"searchDepth":980,"depth":980,"links":981},2,[982,983,984,988,989,990,991],{"id":611,"depth":980,"text":612},{"id":642,"depth":980,"text":643},{"id":655,"depth":980,"text":656,"children":985},[986],{"id":676,"depth":987,"text":677},3,{"id":705,"depth":980,"text":706},{"id":767,"depth":980,"text":768},{"id":880,"depth":980,"text":881},{"id":956,"depth":980,"text":957},null,"Insights","2024-02-20T00:00:00.000Z","Build your own open source copilot with the Pieces Client and use the new PHI-2 model from microsoft local, and on-device.",false,"md","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fbuild-a-copilot-with-phi-2-using-pieces-client\u002Fhero.jpeg","Build a Copilot with Phi-2",{},"\u002Fblog\u002Fbuild-a-copilot-with-phi-2-using-pieces-client",{"title":591,"description":995},"blog\u002Fbuild-a-copilot-with-phi-2-using-pieces-client","V6f7L4SyZu7B5WekI6ipk0gZSrA2UiHqp_fuXqY-bYc",{"id":1006,"title":592,"body":1007,"description":731,"draft":996,"extension":997,"meta":1011,"navigation":20,"path":1012,"photo":1013,"photoAlt":992,"seo":1014,"stem":1015,"__hash__":1016},"authors\u002Fauthors\u002Fthe-pieces-team.md",{"type":597,"value":1008,"toc":1009},[],{"title":731,"searchDepth":980,"depth":980,"links":1010},[],{},"\u002Fauthors\u002Fthe-pieces-team","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fauthors\u002Fthe-pieces-team.png",{"title":592,"description":731},"authors\u002Fthe-pieces-team","_2O_QA8d8RjXlBp0ck4PWDG6iA74zW1kN0R0gkn2Lls"]