gpt_academic
gpt_academic copied to clipboard
[feature]使用cloudflare解决openai api无法访问的问题
- 参考https://github.com/x-dr/chatgptProxyAPI 通过cloudflare配置一个openai api的proxy
- 修改config.py里面的API_URL_REDIRECT配置,将reverse-proxy-url换成你在cloudflare里面配置的域名
# 举例: API_URL_REDIRECT = {"https://api.openai.com/v1/chat/completions": "https://reverse-proxy-url/v1/chat/completions"}
API_URL_REDIRECT = {}
这样就可以以最低的成本使用openai api了
非常好的点子
https://developers.cloudflare.com/ai-gateway/
这个gateway也行