chatGPT:12.12 之后更新的 chatGPT 的本地部署和接口调用,解决 response 403 (无法连接openai服务器)问题

问题

源代码改动

  • 首先下载最新的源代码
  • 通过在 config.json 文件中指定这三个字段的值来获得访问的身份,下面我会描述如何获得这三个字段:
    • session token
    • cf_clearance
    • user_agent

Session token 的获取

cf_clearance 的获取

user-agent 的获取

chatGPT:12.12 之后更新的 chatGPT 的本地部署和接口调用,解决 response 403 (无法连接openai服务器)问题

将 config.json.sample 内容修改并移动位置

附注:

环境配置

python >= 3.7

特别提示

playwright & cf_clearance

ERROR: Could not find a version that satisfies the requirement playwright (from versions: none)
ERROR: No matching distribution found for playwright

chatGPT:12.12 之后更新的 chatGPT 的本地部署和接口调用,解决 response 403 (无法连接openai服务器)问题

revChatGPT 版本

httpx

pip install httpx

OpenAIAuth

pip install OpenAIAuth

删除 import 中的错误

后记

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2023年3月22日 下午10:25
下一篇 2023年3月22日 下午10:30

相关推荐