专栏名称: GitHubStore
分享有意思的开源项目
目录
相关文章推荐
不正常人类研究中心  ·  能带我一个吗?人家不收研究生学历的 ·  2 天前  
不正常人类研究中心  ·  抑郁并没有消失,只是转移了 ·  2 天前  
不正常人类研究中心  ·  这也太哑了!你怎么讲话会发射激光 ·  2 天前  
中国国家地理  ·  科考旅行 ... ·  2 天前  
51好读  ›  专栏  ›  GitHubStore

功能强大的开源终端 AI 助手:gptme

GitHubStore  · 公众号  ·  · 2025-02-07 08:58

正文

项目简介

一款功能强大的开源终端 AI 助手:gptme。

安装了它,你可以在终端上执行本地代码、读写文件、搜索和浏览网页以及进行视觉识别等操作。

支持目前主流 LLM 提供商,如 OpenAI、Anthropic 和 OpenRouter,也可以使用 llama.cpp 在本地提供服务。

🌟 特点

  • 💻 代码执行

    • 在您的本地环境中使用 shell 和 Python 工具执行代码。

  • 阅读、写入和更改文件

    • 使用补丁工具进行增量更改。

  • 🌐 搜索和浏览网页。

    • 可以使用 Playwright 浏览器工具通过浏览器。

  • 👀 视觉

    • 可以看到提示中引用的图片、桌面截图和网页。

  • 🔄 自我校正

    • 输出反馈给助手,使其能够响应并自我纠正。

  • 支持多个LLM提供商

    • 使用 OpenAI、Anthropic、OpenRouter 或使用 llama.cpp 本地提供服务

  • 🌐 网页界面和 REST API

    • 现代网页界面在 chat.gptme.org(gptme-webui)

    • Python 包中包含的简单内置 Web UI

    • 服务器带 REST API

  • 💻 计算机使用工具,如 Anthropic 所宣传的(见#216)

    • 给予助手访问完整桌面的权限,使其能够与 GUI 应用程序交互。

  • 🤖 长运行代理和高级代理架构(见 #143 和 #259)

    • 创建使用 gptme-agent-template 模板的持久性代理

  • ✨ 许多小功能确保优质体验

    • Tab 补全和命令及路径的高亮显示

    • 传递一个文件名作为参数将读取该文件并将其包含为上下文。

    • 通过 stdin 或作为参数进行管道操作。

    • 智能补全和突出显示:

    • 自动命名对话

    • ✅ 检测并集成预提交

    • 语音合成支持,本地使用 Kokoro 生成

    • 高级用法功能标志,请参阅配置文档


🛠 用例

  • 🖥 开发:借助 AI 辅助,更快地编写和运行代码。

  • 🎯 Shell 专家:使用自然语言获取正确的命令(不再需要记忆标志!)。

  • 数据分析:直接在您的终端中处理和分析数据。

  • 互动学习:亲身体验新技术或代码库。

  • 🤖 代理与工具:在本地环境中实验代理与工具。


🛠 Developer perks

  • 工具箱 易扩展

    • 大多数功能都作为工具实现,这使得添加新功能变得容易。

  • 广泛测试,高覆盖率。

  • 干净代码库,使用 mypy ruff pyupgrade 检查和格式化。

  • GitHub 机器人从评论中请求更改!(见#16)

    • 在此仓库中运行!(见 #18 举例)

    • 完全运行在 GitHub Actions 中。

  • 📊 评估套件,用于测试不同模型的性能

  • gptme.vim 用于轻松集成到 Vim 中



🚀 开始使用

使用 pipx 安装:

# requires Python 3.10+pipx install gptme

现在,要开始,请运行:

gptme

这里有一些示例:

gptme 'write an impressive and colorful particle effect using three.js to particles.html'gptme 'render mandelbrot set to mandelbrot.png'gptme 'suggest improvements to my vimrc'gptme 'convert to h265 and adjust the volume' video.mp4git diff | gptme 'complete the TODOs in this diff'make test | gptme 'fix the failing tests'

🛠 使用方法

$ gptme --helpUsage: gptme [OPTIONS] [PROMPTS]...
gptme is a chat-CLI for LLMs, empowering them with tools to run shell commands, execute code, read and manipulate files, and more.
If PROMPTS are provided, a new conversation will be started with it. PROMPTS can be chained with the '-' separator.
The interface provides user commands that can be used to interact with the system.
Available commands: /undo Undo the last action /log Show the conversation log /tools Show available tools /edit Edit the conversation in your editor /rename Rename the conversation /fork Create a copy of the conversation with a new name /summarize Summarize the conversation /replay Re-execute codeblocks in the conversation, wont store output in log /impersonate Impersonate the assistant /tokens Show the number of tokens used /export Export conversation as standalone HTML /help Show this help message /exit Exit the program
Options: -n, --name TEXT Name of conversation. Defaults to generating a random name.






请到「今天看啥」查看全文


推荐文章
不正常人类研究中心  ·  能带我一个吗?人家不收研究生学历的
2 天前
不正常人类研究中心  ·  抑郁并没有消失,只是转移了
2 天前
不正常人类研究中心  ·  这也太哑了!你怎么讲话会发射激光
2 天前
经典短篇阅读小组  ·  预兆 |顾城
8 年前
经典短篇阅读小组  ·  预兆 |顾城
8 年前