WongSaang / chatgpt-ui

A ChatGPT web client that supports multiple users, multiple languages, and multiple database connections for persistent data storage. Provides Docker images and quick deployment scripts.
https://wongsaang.github.io/chatgpt-ui/
MIT License
1.51k stars 333 forks source link

联网模式无法使用 #125

Open hbsgithub opened 1 year ago

hbsgithub commented 1 year ago

关闭联网模式时,可以正常生成回复,但是打开联网模式后,提示500

image
WongSaang commented 1 year ago

你的服务器能 ping 通 duckduckgo.com吗

hbsgithub commented 1 year ago

不能,看来是应该是这个原因,请问可以在环境变量里配置代理么?

WongSaang commented 1 year ago

那你的 OpenAI 也是配置了代理吗?目前没有这个环境变量。可以在系统配置 http_proxy, https_proxy

HeHuangbing @.***> 于 2023年4月6日周四 21:09写道:

不能,看来是应该是这个原因,请问可以在环境变量里配置代理么?

— Reply to this email directly, view it on GitHub https://github.com/WongSaang/chatgpt-ui/issues/125#issuecomment-1499041341, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALAX6FAOAPPN2IM2552COBTW726B5ANCNFSM6AAAAAAWVMKZYA . You are receiving this because you commented.Message ID: @.***>

hbsgithub commented 1 year ago

openai是使用了代理接口。我在宿主机中export http_proxy, https_proxy,但是还是ping 不通 duckduckgo.com。代理应该没有问题,因为使用proxychains ping duckduckgo.com是可以ping通的

WongSaang commented 1 year ago

ping 不走 http_proxy ,可以用 curl 试试

hbsgithub commented 1 year ago

curl也不行qaq,我后面部署到azure的虚拟机上可以联网搜索了,感谢作者的关心~

OYLFLMH commented 1 year ago

我也是这个问题,但我服务器可以curl 到duckduckgo.com,但是还是联网报错,如何系统配置http_proxy, https_proxy?我的openai也是使用了代理接口。

[root@localhost ~]# curl -I https://duckduckgo.com HTTP/1.1 200 Connection established

HTTP/1.1 200 OK Server: nginx Date: Sun, 09 Apr 2023 01:00:44 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 5952 Connection: keep-alive Vary: Accept-Encoding ETag: "6431ce8e-1740" Strict-Transport-Security: max-age=31536000 Permissions-Policy: interest-cohort=() Content-Security-Policy: default-src 'none' ; connect-src https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ ; manifest-src https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ ; media-src https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ ; script-src blob: https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ 'unsafe-inline' 'unsafe-eval' ; font-src data: https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ ; img-src data: https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ ; style-src https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ 'unsafe-inline' ; object-src 'none' ; worker-src blob: ; child-src blob: https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ ; frame-src blob: https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ ; form-action https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ ; frame-ancestors 'self' ; base-uri 'self' ; block-all-mixed-content ; X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1;mode=block X-Content-Type-Options: nosniff Referrer-Policy: origin Expect-CT: max-age=0 Expires: Sun, 09 Apr 2023 01:00:43 GMT Cache-Control: no-cache Accept-Ranges: bytes

OYLFLMH commented 1 year ago

是不是也可以把https://duckduckgo.com/也在配置文件里面建立一个代理指令,就如同在 backend-wsgi-server加入代理地址一样的方法,谢谢。 毕竟我只有国内的服务器。