https://github.com/acheong08/ChatGPT
我选择用 anaconda 先配一个专属的环境
1 |
conda create -n chatgpt python=3.6 |
1 2 3 |
# 激活虚拟环境 conda activate 如果不行就用 source activate conda activate chatgpt # source activate chatgpt |
按照 官方给出的步骤https://github.com/acheong08/ChatGPT/wiki/
配置环境
这个过程强烈 建议使用手机开热点下载 不然可能非常慢
1 2 3 4 5 6 7 |
# 如果你在 conda 的虚拟环境中执行这步,pip3 可以用 pip 代替 pip3 install revChatGPT --upgrade # pip install revChatGPT --upgrade
# 如果你在 conda 的虚拟环境中执行这步,pip3 可以用 pip 代替 pip3 install revChatGPT --upgrade # pip install revChatGPT --upgrade |
方式1:使用账号密码作为登录的方法
方式2: 使用 session_token 作为登录方法
右键,打开检查:
Application -> Cookies
将 __Secure-next-auth.session-token 中的内容复制到 config.json 中的 session_token
将 config.json 文件中的字段给改成如下形式(Authorization)字段不需要填写:
方式3:使用 Access Token 作为登录方式
通过API 调用 官方给出的 开发文档https://github.com/acheong08/ChatGPT/wiki/Developer-Docs