Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🙋 代理配置正常,返回报错 #146

Open
lcnwys opened this issue Mar 30, 2023 · 5 comments
Open

🙋 代理配置正常,返回报错 #146

lcnwys opened this issue Mar 30, 2023 · 5 comments

Comments

@lcnwys
Copy link

lcnwys commented Mar 30, 2023

问题反馈

服务器直接 curl https://api.openai.com/v1/chat/completions返回正常没有出现 tcp 连接错误

日志:INFO [gpt request error: Post "https://api.openai.com/v1/completions": dial tcp 108.160.170.52:443: i/o timeout]
WARN [get gpt result falied: ]

目前使用免费版,会不会是接口被封,最早开始部署国内服务器并未配置代理即可使用,后受限于官方限制,部署 clash 代理后仍然无法使用

@eryajf eryajf changed the title 🙋 代理配置正常,返回保存 🙋 代理配置正常,返回报错 Mar 30, 2023
@eryajf
Copy link
Owner

eryajf commented Mar 30, 2023

按说应该没问题,除非你的代理没有正确配置到项目当中。可否看下你的运行命令

@lcnwys
Copy link
Author

lcnwys commented Mar 31, 2023

docker run -itd --name chatgpt -p 8090:8090 --add-host="host.docker.internal:host-gateway" -e APIKEY=我的密钥 -e BASE_URL="" -e MODEL=“text-davinci-003" -e SESSION_TIMEOUT=600 -e HTTP_PROXY="http://host.docker.internal:7890” -e DEFAULT_MODE="单聊" -e MAX_REQUEST=0 -e PORT=8090 -e SERVICE_URL=“ 我的项目访问地址” --restart=always  eryajf/chatgpt-dingtalk:latest

@lcnwys
Copy link
Author

lcnwys commented Mar 31, 2023

按说应该没问题,除非你的代理没有正确配置到项目当中。可否看下你的运行命令

curl https://api.openai.com/v1/models
-H 'Authorization: Bearer key'
也有正常返回,可能真的是 docker 开启得不对

@eryajf
Copy link
Owner

eryajf commented Mar 31, 2023

你看看http_proxy是不是没有配置对

@sscoo
Copy link

sscoo commented Apr 29, 2023

配置代理有点麻烦,用这个方法很方便 :https://github.com/riba2534/openai-scf-goproxy 只需要调整BASE_URL=云函数地址

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants