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

关于取消GPT代理的代码修改 #5

Open
596311341 opened this issue May 14, 2024 · 3 comments
Open

关于取消GPT代理的代码修改 #5

596311341 opened this issue May 14, 2024 · 3 comments

Comments

@596311341
Copy link

我修改了代码取消代理设置,再次运行后主程序提示GPT错误。各位大佬!请问一下还有哪里需要修改啊?(我是使用的第三方中转API KEY)

  1. 删除或注释掉定义代理的行:
url='https://api.gptsapi.net/v1/chat/completions'
#proxy= proxy
  1. 在请求中删除代理设置:
result = asession.post(url, headers=headers, json=prama, timeout=20)
@Lucky-183
Copy link
Owner

建议先确认这个三方API的请求头和请求内容格式是否与官方的一致,先单独运行 gpt.py 文件进行测试,看报错内容

@zym0208
Copy link

zym0208 commented Nov 24, 2024

大佬人在国外不需要用代理怎么办,或者可以用国外的代理填进去嘛?

@Lucky-183
Copy link
Owner

大佬人在国外不需要用代理怎么办,或者可以用国外的代理填进去嘛?

留空,或者如果有报错之类的话就删除 gpt.py 的第66行 proxies 参数

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