QQ-ChatGPT-Bot
实现openai qq对话功能,原生跨平台
![image.png](https://camo.githubusercontent.com/6e7ff1a225d12fb32524a1bc2158483ca6cb57b70d59b9ea917914effcecbd13/68747470733a2f2f73322e6c6f6c692e6e65742f323032332f30332f32372f36564a454b6b447341386449427a4c2e706e67)
如何使用
- 下载go-cqhttp
- 下载QQ-ChatGPT-Bot
Windows
- 双击go-cqhttp可执行文件,按照提示登录QQ,选择2正向WebSocket
- 双击QQ-ChatGPT-Bot可执行文件,将openai的api_key 填入
config.cfg
中,再次运行
- 如果要使用角色扮演功能,则请在config中的identity下填写想要bot扮演的角色的信息。同时,请将openai配置下的model更换成“text-davinci-003”。如不想使用角色扮演功能,请直接删掉identity下prompt里双引号内的内容。
Linux
./go-cqhttp*
# 按照提示操作,选择2正向websocket,将本地登录过的`sesssion.token`复制进服务器,防止tx风控
./QQ-ChatGPT*
# 在config.cfg填入openai的api_key
# 关掉窗口,运行:
nohup ./go-cqhttp* &
nohup ./QQ-ChatGPT* &
# config.yaml cqhttp配置文件
servers:
# 添加方式,同一连接方式可添加多个,具体配置说明请查看文档
#- http: # http 通信
#- ws: # 正向 Websocket
#- ws-reverse: # 反向 Websocket
#- pprof: #性能分析服务器
# 正向WS设置
- ws:
# 正向WS服务器监听地址
address: 0.0.0.0:8080
middlewares:
<<: *default # 引用默认中间件