当前位置: 首页 > article >正文

gptme - 终端中的个人 AI 助手

终端中的个人 AI 助手,带有工具,因此它可以:使用终端、运行代码、编辑文件、浏览 Web、使用视觉等等; 通过简单但功能强大的 CLI 协助各种知识工作,尤其是编程。

ChatGPT 的“代码解释器”的不受约束的本地替代方案。不受缺少软件、互联网访问、超时或隐私问题(如果使用本地模型)的限制。

3200 Stars 220 Forks 47 Issues 14 贡献者 MIT License Python 语言

代码: https://github.com/ErikBjare/gptme

主页: gptme documentation — gptme

更多AI开源软件:AI开源 - 小众AI

主要功能

  • 💻 代码执行

    • 使用 shell 和 python 工具在本地环境中执行代码。
  • 🧩 读取、写入和更改文件

    • 使用修补工具进行增量更改。
  • 🌐 搜索和浏览 Web。

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

    • 可以查看提示、桌面屏幕截图和网页中引用的图像。
  • 🔄 自我纠正

    • 输出反馈给助手,使其能够响应和自我纠正。
  • 🤖 支持多个 LLM 提供商

    • 使用 OpenAI、Anthropic、OpenRouter 或在本地使用llama.cpp​
  • 🌐 Web UI 和 REST API

    • chat.gptme.org 上的现代 Web 界面 (gptme-webui))
    • Python 包中包含的简单内置 Web UI
    • 具有 REST API 的服务器
  • 💻 计算机使用工具,正如 Anthropic 所炒作的那样(参见 #216)

    • 授予助手对完整桌面的访问权限,使其能够与 GUI 应用程序交互。
  • 🤖 长时间运行的代理和高级代理体系结构(请参阅 #143 和 #259)

    • 使用 gptme-agent-template 创建您自己的具有持久性的代理
  • ✨ 许多较小的功能可确保出色的体验

    • 🚰 Pipe in context via 或 as arguments.stdin​

      • 将文件名作为参数传递将读取文件并将其作为上下文包含。
    • → 智能补全和突出显示:

      • 命令和路径的 Tab 键完成和高亮显示
    • 📝 对话的自动命名

    • ✅ 检测并集成预提交

    • 🗣️ 文本到语音转换支持,使用 Kokoro 在本地生成

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

安装和使用

🚀 安装

使用 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.mp4
git diff | gptme 'complete the TODOs in this diff'
make test | gptme 'fix the failing tests'

有关更多信息,请参阅入门指南和文档中的示例。

🛠 用法
$ gptme --help
Usage: 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.
  -m, --model TEXT       Model to use, e.g. openai/gpt-4o,
                         anthropic/claude-3-5-sonnet-20240620. If only
                         provider given, a default is used.
  -w, --workspace TEXT   Path to workspace directory. Pass '@log' to create a
                         workspace in the log directory.
  -r, --resume           Load last conversation
  -y, --no-confirm       Skips all confirmation prompts.
  -n, --non-interactive  Force non-interactive mode. Implies --no-confirm.
  --system TEXT          System prompt. Can be 'full', 'short', or something
                         custom.
  -t, --tools TEXT       Comma-separated list of tools to allow. Available:
                         read, save, append, patch, shell, subagent, tmux,
                         browser, gh, chats, screenshot, vision, computer,
                         python.
  --no-stream            Don't stream responses
  --show-hidden          Show hidden system messages.
  -v, --verbose          Show verbose output.
  --version              Show version and configuration information
  --help                 Show this message and exit.

http://www.kler.cn/a/540124.html

相关文章:

  • 48V电气架构全面科普和解析:下一代智能电动汽车核心驱动
  • WPS如何接入DeepSeek(通过JS宏调用)
  • JAVA中的抽象学习
  • 使用PyCharm进行Django项目开发环境搭建
  • leetcode 做题思路快查
  • DeepSeek之Api的使用(将DeepSeek的api集成到程序中)
  • 《一》深入了解软件测试工具 JMeter-自我介绍
  • 基于lstm+gru+transformer的电池寿命预测健康状态预测-完整数据代码
  • iOS Swift算法之KDF2
  • 【1】深入解析 SD-WAN:从思科 SD-WAN 视角看现代网络发展
  • 题解:P1005 [NOIP 2007 提高组] 矩阵取数游戏
  • win10向windows server服务器传输文件
  • SQLite3实战教程:从入门到精通
  • 基于SeaTunnel同步mysql数据
  • 第18章 不可变对象设计模式(Java高并发编程详解:多线程与系统设计)
  • 优惠券平台(十五):实现兑换/秒杀优惠券功能(2)
  • Untiy3d 配置vs code开发环境
  • MySQL-binlog2sql闪回工具介绍与回滚实战
  • Unity项目实战-简单特效系统的管理
  • Laravel框架的视图操作主要通过Blade模板引擎实现
  • 《Java核心技术 卷II》Java平台的脚本机制
  • 小红书自动化:如何利用Make批量生成爆款笔记
  • Java面试题2025-JVM
  • 计算机毕业设计SparkStreaming+Kafka广告推荐系统 广告预测 广告数据分析可视化 广告爬虫 大数据毕业设计 深度学习 机器学习
  • MIT开源7B推理模型Satori:用行动思维链进行强化学习,增强自回归搜索
  • 用Llama Factory单机多卡微调Qwen2.5时报torch.OutOfMemoryError: CUDA out of memory的解决办法