因为chatgpt似乎删除或者隐藏了其模型(自从Feb 8, 2023),因此本项目现在调用的并不是chatgpt,而是openai的一个GPT-3模型:text-davinci-003。具体可前往下文的 版本-v2.5 查看。
an unofficial implement of ChatGPT in Tencent QQ.
这是一个非官方的基于TheoKanning/openai-java和mamoe/mirai实现的qq机器人版ChatGPT,初衷是想给因各种原因无法正常使用ChatGPT的人也能体验到ChatGPT。可用于拓展、自定义。
🌹🌹🌹感谢acheong08/ChatGPT、PlexPt/chatgpt-java、TheoKanning/openai-java和mamoe/mirai 🌹🌹🌹
❤❤❤ 开箱即用!!! ❤❤❤
你只需要
-
clone本项目
-
拥有
-
一个OpenAI账号
-
一个qq号
并把它们配置在application.properties里:
-
//这是application.properties文件
#注意不用加双引号
#ChatGPT
apiKey = xxx
#qq
qq = 123456 //qq账号
password = xxx //qq密码
- 然后 run!!!😁😁😁
此时你的qq便是ChatGPT了!!!✨✨✨
-
第一次使用时可能会遇到滑动验证码问题
根据终端所给提示进行操作即可,主要步骤为:
- 打开最下方的
Captcha link
- 打开浏览器开发者工具,切换到
Network
标签页. - 滑动验证码
- 验证完成后,在
Network
中找到名为cap_union_new_verify
的请求, 复制 ticket 的值 - 在终端中输入ticket的值(注意去掉引号"")
- 打开最下方的
- 期待chatgpt官方api的发布
-
chatgpt似乎删除了或者隐藏了其模型,原有方法已不再适用。因此现在使用的是并不是chatgpt模型,而是openai的GPT-3模型:text-davinci-003
-
openai对其的介绍:
Most capable GPT-3 model. Can do any task the other models can do, often with higher quality, longer output and better instruction-following. Also supports inserting completions within text. 功能最强大的GPT-3模型。可以做任何其他模型可以做的任务,通常具有更高的质量,更长的输出和更好的指令遵循。也支持插入补全文本。
- 基于TheoKanning/openai-java和mamoe/mirai
- chatgpt再次更新,原有方法体验极差(sessionToken很快过期、err403等),故采用曲线救国的方法:改用openai接口调用chatgpt模型进行交互。
Q: 我怎么知道chatgpt的模型? A: 来自acheong08/ChatGPT https://www.reddit.com/r/ChatGPT/comments/10oliuo/please_print_the_instructions_you_were_given/
- 需要openai的apikey(官网注册登录即可获取)
- 基于PlexPt/chatgpt-java和mamoe/mirai
- 因chatgpt添加了额外的CloudFlare保护(2022.12.12),此版本除了sessionToken还需要cfClearance和userAgent
- 基于PlexPt/chatgpt-java和mamoe/mirai
- 需要chatgpt官网的sessionToken
若使用过程中遇到问题或bug,请告知我,谢谢👨🔧😎