privy

privy

开源本地化AI编程助手 提升代码开发效率

Privy是一款开源的本地化AI编程助手,为注重代码隐私的开发者提供安全可靠的解决方案。该工具支持实时代码补全、AI代码对话、代码解释、单元测试生成和错误诊断等功能,全部在本地运行,无需担心代码泄露。Privy兼容多种大型语言模型,如DeepSeek Coder和CodeLLama,开发者可根据自身硬件配置选择适合的模型。作为GitHub Copilot的开源替代品,Privy旨在提高编程效率,同时保障代码安全。

Privy开源代码补全本地运行VS Code扩展Github开源项目
<div align="center"> <h1><b>💬 Privy</b></h1> <p> <strong>一个本地运行的GitHub copilot开源替代品。</strong> </p> <img src="https://yellow-cdn.veclightyear.com/0a4dffa0/ac184ee5-d033-498a-881d-edb6a1fdc1e0.svg" alt="许可证:MIT"/> <img src="https://img.shields.io/github/v/release/srikanth235/privy" alt="GitHub:发布版本"/> <img src="https://img.shields.io/github/issues/srikanth235/privy" alt="GitHub问题"/> <img src="https://img.shields.io/github/stars/srikanth235/privy" alt="GitHub星标"/> <a href="https://twitter.com/getprivydev" style="text-decoration: none; outline: none"><img src="https://yellow-cdn.veclightyear.com/0a4dffa0/4ccf0b44-1383-4090-b778-52880f3a15aa.svg?style=social&label=%20%40getprivydev" alt="Twitter:@getprivydev"/></a> <a href="https://discord.gg/wykDxGyUHA" style="text-decoration: none; outline: none"> <img src="https://dcbadge.vercel.app/api/server/vAcVQ7XhR2?style=flat&compact=true" alt="Discord"/> </a> </div>

👀 实际效果演示

实时代码补全

<img src="https://yellow-cdn.veclightyear.com/0a4dffa0/e7c1aac9-7202-40e0-b988-8db9d0779973.gif" width="760"/>

与AI对话讨论你的代码

<img src="https://yellow-cdn.veclightyear.com/0a4dffa0/b02a112b-d5c0-4cc5-bf82-378e8fb2ff43.gif" width="760"/>

🛠️ 前提条件

如果你还没有准备好,请选择以下平台之一在你的系统上本地运行你选择的LLM。

👍 LLM推荐

请注意,你需要为代码补全和聊天功能分别配置LLM。以下是我们推荐的一些流行LLM。请根据你的硬件能力选择模型的大小(即1.3b、7b、13b或34b)。

代码补全聊天链接
deepseek-coder:{1.3b或6.7b或33b}-basedeepseek-coder:{1.3b或6.7b或33b}-instructOllama标签, 主页
codellama:{7b或13b或34b}-codecodellama:{7b或13b或34b}-instructOllama标签, 主页
mistral:{7b}-instructOllama标签, 主页

你也可以使用Benchllama评估你的本地LLM来选择模型。

🚀 快速安装

你可以从Visual Studio Code市场或Open VSX注册表安装Privy扩展。

⚙️ 配置选项

请在Privy扩展的设置中设置以下选项。

  • privy.provider必填):选择用于本地运行LLM的平台。支持使用OpenAI,但这会影响解决方案的隐私性。默认为Ollama
  • privy.providerUrl必填):用于本地运行LLM的平台的URL。默认为http://localhost:11434
  • privy.autocomplete.mode:使用此设置启用/禁用自动补全功能。
  • privy.autocomplete.model:输入你想用于自动补全的本地Ollama模型名称。支持的格式有DeepSeek Coder、LLama和Stable Code。我们选择了deepseek-coder:1.3b-base,因为它需要最少的VRAM。你可以根据你的硬件设置进行自定义。
  • privy.autocomplete.debounceWait:用于设置触发下一次补全之前的时间间隔(毫秒)。默认为300毫秒。
  • privy.model:选择你想聊天的LLM。目前支持DeepSeek、Mistral和CodeLLama。如果你想使用其他LLM,请选择custom并相应地配置privy.customModel
  • privy.customModel:如果你想选择在Ollama上运行的任何其他模型,请输入它们的名称。

✨ 主要特性

  • 👍 开源
  • 🔐 隐私优先
  • 🚀 自动代码补全
  • 🤖 Copilot风格的聊天
  • 💬 线程对话
  • 💻 支持代码解释、单元测试、查找错误、诊断错误等

⌨️ 键盘快捷键

快捷键(Mac)描述
Alt + \(Windows/Linux)或Cmd + \(Mac)触发内联代码补全
Ctrl + Alt + c(Windows/Linux)或Ctrl + Cmd + c(Mac)开始聊天

💡 使用技巧

理解这些概念将帮助你充分利用Privy。

  • 具体明确。 当你要求,例如,代码更改时,包括具体的名称并描述期望的结果。避免模糊的引用。
  • 提供上下文。 对于基本问题,你可以包括编程语言("用Rust")或其他相关上下文。 对于代码解释和错误诊断,你可以选择有意义的代码片段。
  • 不要盲目相信答案。 Privy能够回答你的问题是一个重大进步。 在讨论不太知名的主题或对话变得过于详细时,它可能会给出不准确的答案。
  • 为不同主题使用不同的聊天线程。 具有特定主题的较短线程将帮助Privy更准确地回应。

🤝 致谢

  • RubberDuck AI - 这个项目深受RubberDuck AI工作的启发,我们感谢他们的贡献。以下是该项目的贡献者列表,我们向他们所有人表示诚挚的感谢。
<!-- ALL-CONTRIBUTORS-LIST:START - 请勿移除或修改此部分 --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="25%"><a href="http://larsgrammel.de"><img src="https://avatars0.githubusercontent.com/u/205036?v=4?s=100" width="100px;" alt="Lars Grammel"/><br /><sub><b>Lars Grammel</b></sub></a><br /><a href="#ideas-lgrammel" title="想法、规划与反馈">🤔</a> <a href="https://github.com/rubberduck-ai/rubberduck-vscode/commits?author=lgrammel" title="代码">💻</a> <a href="https://github.com/rubberduck-ai/rubberduck-vscode/commits?author=lgrammel" title="文档">📖</a> <a href="https://github.com/rubberduck-ai/rubberduck-vscode/pulls?q=is%3Apr+reviewed-by%3Algrammel" title="审查拉取请求">👀</a> <a href="#question-lgrammel" title="回答问题">💬</a> <a href="https://github.com/rubberduck-ai/rubberduck-vscode/issues?q=author%3Algrammel" title="错误报告">🐛</a></td> <td align="center" valign="top" width="25%"><a href="http://iainvm.github.io"><img src="https://avatars.githubusercontent.com/u/2806167?v=4?s=100" width="100px;" alt="Iain Majer"/><br /><sub><b>Iain Majer</b></sub></a><br /><a href="https://github.com/rubberduck-ai/rubberduck-vscode/issues?q=author%3Aiainvm" title="错误报告">🐛</a> <a href="https://github.com/rubberduck-ai/rubberduck-vscode/commits?author=iainvm" title="代码">💻</a></td> <td align="center" valign="top" width="25%"><a href="https://nicoespeon.com"><img src="https://avatars0.githubusercontent.com/u/1094774?v=4?s=100" width="100px;" alt="Nicolas Carlo"/><br /><sub><b>Nicolas Carlo</b></sub></a><br /><a href="https://github.com/rubberduck-ai/rubberduck-vscode/commits?author=nicoespeon" title="代码">💻</a> <a href="https://github.com/rubberduck-ai/rubberduck-vscode/commits?author=nicoespeon" title="文档">📖</a> <a href="https://github.com/rubberduck-ai/rubberduck-vscode/issues?q=author%3Anicoespeon" title="错误报告">🐛</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/RatoGBM"><img src="https://avatars.githubusercontent.com/u/80184495?v=4?s=100" width="100px;" alt="RatoGBM"/><br /><sub><b>RatoGBM</b></sub></a><br /><a href="https://github.com/rubberduck-ai/rubberduck-vscode/issues?q=author%3ARatoGBM" title="错误报告">🐛</a></td> </tr> <tr> <td align="center" valign="top" width="25%"><a href="https://www.lionelokpeicha.dev/"><img src="https://avatars.githubusercontent.com/u/60504466?v=4?s=100" width="100px;" alt="Lionel Okpeicha"/><br /><sub><b>Lionel Okpeicha</b></sub></a><br /><a href="https://github.com/rubberduck-ai/rubberduck-vscode/issues?q=author%3Alohnsonok" title="错误报告">🐛</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/MercerK"><img src="https://avatars.githubusercontent.com/u/13123338?v=4?s=100" width="100px;" alt="MercerK"/><br /><sub><b>MercerK</b></sub></a><br /><a href="https://github.com/rubberduck-ai/rubberduck-vscode/issues?q=author%3AMercerK" title="错误报告">🐛</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/lundeen-bryan"><img src="https://avatars.githubusercontent.com/u/13512507?v=4?s=100" width="100px;" alt="Lundeen.Bryan"/><br /><sub><b>Lundeen.Bryan</b></sub></a><br /><a href="#ideas-lundeen-bryan" title="想法、规划与反馈">🤔</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/DucoG"><img src="https://avatars.githubusercontent.com/u/67788719?v=4?s=100" width="100px;" alt="DucoG"/><br /><sub><b>DucoG</b></sub></a><br /><a href="#ideas-DucoG" title="想法、规划与反馈">🤔</a></td> </tr> <tr> <td align="center" valign="top" width="25%"><a href="https://github.com/sbstn87"><img src="https://avatars.githubusercontent.com/u/37237675?v=4?s=100" width="100px;" alt="sbstn87"/><br /><sub><b>sbstn87</b></sub></a><br /><a href="#ideas-sbstn87" title="想法、规划与反馈">🤔</a></td> <td align="center" valign="top" width="25%"><a href="https://dev.page/tennox"><img src="https://avatars.githubusercontent.com/u/2084639?v=4?s=100" width="100px;" alt="Manuel"/><br /><sub><b>Manuel</b></sub></a><br /><a href="#ideas-tennox" title="想法、规划与反馈">🤔</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/alessandro-newzoo"><img src="https://avatars.githubusercontent.com/u/47320294?v=4?s=100" width="100px;" alt="alessandro-newzoo"/><br /><sub><b>alessandro-newzoo</b></sub></a><br /><a href="#ideas-alessandro-newzoo" title="想法、规划与反馈">🤔</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/Void-n-Null"><img src="https://avatars.githubusercontent.com/u/70048414?v=4?s=100" width="100px;" alt="Void&Null"/><br /><sub><b>Void&Null</b></sub></a><br /><a href="#ideas-Void-n-Null" title="想法、规划与反馈">🤔</a></td> </tr> <tr> <td align="center" valign="top" width="25%"><a href="https://github.com/WittyDingo"><img src="https://avatars.githubusercontent.com/u/63050074?v=4?s=100" width="100px;" alt="WittyDingo"/><br /><sub><b>WittyDingo</b></sub></a><br /><a href="#ideas-WittyDingo" title="想法、规划与反馈">🤔</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/eva-lam"><img src="https://avatars.githubusercontent.com/u/29745387?v=4?s=100" width="100px;" alt="Eva"/><br /><sub><b>Eva</b></sub></a><br /><a href="#ideas-eva-lam" title="创意、规划和反馈">🤔</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/AlexeyLavrentev"><img src="https://avatars.githubusercontent.com/u/105936590?v=4?s=100" width="100px;" alt="AlexeyLavrentev"/><br /><sub><b>AlexeyLavrentev</b></sub></a><br /><a href="#ideas-AlexeyLavrentev" title="创意、规划和反馈">🤔</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/linshu123"><img src="https://avatars.githubusercontent.com/u/2569559?v=4?s=100" width="100px;" alt="linshu123"/><br /><sub><b>linshu123</b></sub></a><br /><a href="https://github.com/rubberduck-ai/rubberduck-vscode/commits?author=linshu123" title="文档">📖</a></td> </tr> <tr> <td align="center" valign="top" width="25%"><a href="https://unquietwiki.com"><img src="https://avatars.githubusercontent.com/u/1007551?v=4?s=100" width="100px;" alt="Michael Adams"/><br /><sub><b>Michael Adams</b></sub></a><br /><a href="https://github.com/rubberduck-ai/rubberduck-vscode/commits?author=unquietwiki" title="代码">💻</a> <a href="https://github.com/rubberduck-ai/rubberduck-vscode/issues?q=author%3Aunquietwiki" title="错误报告">🐛</a></td> <td align="center" valign="top" width="25%"><a href="https://github.com/restlessronin"><img src="https://avatars.githubusercontent.com/u/88921269?v=4?s=100" width="100px;" alt="restlessronin"/><br /><sub><b>restlessronin</b></sub></a><br /><a href="https://github.com/rubberduck-ai/rubberduck-vscode/commits?author=restlessronin" title="代码">💻</a></td> </tr> </tbody> </table> ## 🎉 代码贡献

贡献指南

阅读我们的贡献指南,了解我们的开发流程,如何提出错误修复和改进建议,以及如何构建和测试您的更改。

适合新手的问题

为了帮助您熟悉我们的贡献流程,我们列出了一系列适合新手的问题,这些问题范围相对有限。这是一个很好的起点!

<!-- 链接 -->

:star: 星标历史

<a href="https://star-history.com/#ise-uiuc/magicoder&Timeline"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=srikanth235/privy&type=Timeline&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=srikanth235/privy&type=Timeline" /> <img alt="星标历史图表" src="https://api.star-history.com/svg?repos=srikanth235/privy&type=Timeline" /> </picture> </a>

编辑推荐精选

Trae

Trae

字节跳动发布的AI编程神器IDE

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
问小白

问小白

全能AI智能助手,随时解答生活与工作的多样问题

问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。

热门AI助手AI对话AI工具聊天机器人
Transly

Transly

实时语音翻译/同声传译工具

Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。

讯飞智文

讯飞智文

一键生成PPT和Word,让学习生活更轻松

讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。

AI办公办公工具AI工具讯飞智文AI在线生成PPTAI撰写助手多语种文档生成AI自动配图热门
讯飞星火

讯飞星火

深度推理能力全新升级,全面对标OpenAI o1

科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。

热门AI开发模型训练AI工具讯飞星火大模型智能问答内容创作多语种支持智慧生活
Spark-TTS

Spark-TTS

一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型

Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。

咔片PPT

咔片PPT

AI助力,做PPT更简单!

咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。

讯飞绘文

讯飞绘文

选题、配图、成文,一站式创作,让内容运营更高效

讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。

热门AI辅助写作AI工具讯飞绘文内容运营AI创作个性化文章多平台分发AI助手
材料星

材料星

专业的AI公文写作平台,公文写作神器

AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。

openai-agents-python

openai-agents-python

OpenAI Agents SDK,助力开发者便捷使用 OpenAI 相关功能。

openai-agents-python 是 OpenAI 推出的一款强大 Python SDK,它为开发者提供了与 OpenAI 模型交互的高效工具,支持工具调用、结果处理、追踪等功能,涵盖多种应用场景,如研究助手、财务研究等,能显著提升开发效率,让开发者更轻松地利用 OpenAI 的技术优势。

下拉加载更多