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

[Feature]:建议增加开关,当使用第三方服务商时,不开启代理 #1769

Open
adjjckjckla opened this issue May 8, 2024 · 1 comment

Comments

@adjjckjckla
Copy link

Class | 类型

其他

Feature Request | 功能请求

建议增加开关,当使用第三方服务商时,不开启代理,如图所示,该服务商本身在国内可用,无需开启代理,希望可以增加开关
1715161474554

@binaryYuki
Copy link
Contributor

Hi,

如果您的 config.py中没有开启代理 则不会使用代理

gpt_academic/config.py

Lines 14 to 29 in 43ed8cb

# [step 2]>> 改为True应用代理,如果直接在海外服务器部署,此处不修改;如果使用本地或无地域限制的大模型时,此处也不需要修改
USE_PROXY = False
if USE_PROXY:
"""
代理网络的地址,打开你的代理软件查看代理协议(socks5h / http)、地址(localhost)和端口(11284)
填写格式是 [协议]:// [地址] :[端口],填写之前不要忘记把USE_PROXY改成True,如果直接在海外服务器部署,此处不修改
<配置教程&视频教程> https://github.com/binary-husky/gpt_academic/issues/1>
[协议] 常见协议无非socks5h/http; 例如 v2**y 和 ss* 的默认本地协议是socks5h; 而cl**h 的默认本地协议是http
[地址] 填localhost或者127.0.0.1(localhost意思是代理软件安装在本机上)
[端口] 在代理软件的设置里找。虽然不同的代理软件界面不一样,但端口号都应该在最显眼的位置上
"""
proxies = {
# [协议]:// [地址] :[端口]
"http": "socks5h://localhost:11284", # 再例如 "http": "http://127.0.0.1:7890",
"https": "socks5h://localhost:11284", # 再例如 "https": "http://127.0.0.1:7890",
}

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

2 participants