让token中转站记录关键字信息
需求 当用户输入"帮我SSH登录"时, 让token中转站记录上下文信息 以 CPA 中转站 项目为例 搭建一个能编译成功的源码环境 安装Go环境 去 https://go.dev/dl/ 可以找到下载和安装的命令 clone 指定tag v6.10.8 的 CPA git clone https://github.com/router-for-me/CLIProxyAPI.git cd CLIProxyAPI git checkout v6.10.8 下载依赖 go mod download 编译 go build -o cli-proxy-api ./cmd/server 检查有新生成的 cli-proxy-api 文件 搭建一个能正常使用的中转站 用 官方建议的一键安装 命令 curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/refs/heads/master/cliproxyapi-installer | bash 更多的复杂设置, 比如想套域名, 可以参考这一份教程 https://zelikk.blogspot.com/2026/03/cpa-cliproxyapi.html 替换主程序为自己编译的版本 检查版本号 面向GPT开发 分析 这个项目 https://github.com/router-for-me/CLIProxyAPI 如果我要对 用户提交到模型的内容进行关键字分析和记录日志, 应该怎么修改 更多细节调整 略 实现了最简单的演示功能: 监控关键字 "帮我SSH登录" 记录到 /root/cpa.log 效果 与agent的对话 /root/cpa.log 文件内容 ======== Github https://github.com/crazypeace/CLIProxyAPI/tree/feature/keyword-filter-simple