Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apidoc.deerapi.com/llms.txt

Use this file to discover all available pages before exploring further.

gptme 是一款命令行 AI 助手,支持本地工具执行、代码生成和文件操作。通过 DeerAPI,可在终端中接入各类主流模型。

准备工作

1

安装 gptme

参考官方文档安装:https://github.com/ErikBjare/gptme
2

获取 DeerAPI API Key

登录 DeerAPI,进入 API Key 页面,点击「添加 API Key」,获取:
  • API Key<DEERAPI_KEY>
  • Base URLhttps://api.deerapi.com
登录 DeerAPI
API Key列表
获取 API Key 详情

API 配置

1

修改 config.toml

打开 ~/.config/gptme/config.toml,填写以下配置:
[openai]
api_key = "<DEERAPI_KEY>"  # 替换为你的 DeerAPI Key
api_base = "https://api.deerapi.com/v1"
config.toml 配置示例

调用测试

配置完成后,在终端运行 gptme 并输入测试指令。若返回正常回答,配置成功。
若调用失败,请确认 api_base 末尾包含 /v1,以及 api_key 格式正确。