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

怎么改api地址,我用的本地模型 #87

Open
Kiritor729 opened this issue Aug 7, 2023 · 5 comments
Open

怎么改api地址,我用的本地模型 #87

Kiritor729 opened this issue Aug 7, 2023 · 5 comments

Comments

@Kiritor729
Copy link

用rwkv跑的,我注册的api过期了,她一直连不上大脑,看到报错
ERROR HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000019ED00D5300>, 'Connection to api.openai.com timed out. (connect timeout=None)'))
2023-08-08 01:29:29,106 INFO Something wrong with internet, sending:
里面有写host='api.openai.com',我要把这个改成http://127.0.0.1:8000

@xiaoxiaoguai-yyds
Copy link

我也想问问,我有一个自己的接口

@LIEGU0317
Copy link

LIEGU0317 commented Oct 16, 2023

修改GPT/GPTService.pyelif self.chatVer == 3部分代码。
https://api.geekerwan.net/chatgpt2改为你的接口地址,api_key视情况填写内容。

@Kiritor729
Copy link
Author

修改GPT/GPTService.pyelif self.chatVer == 3部分代码。 将https://api.geekerwan.net/chatgpt2改为你的接口地址,api_key视情况填写内容。

谢大佬,我试试

@Kiritor729
Copy link
Author

Kiritor729 commented Nov 1, 2023

修改GPT/GPTService.pyelif self.chatVer == 3部分代码。
https://api.geekerwan.net/chatgpt2改为你的接口地址,api_key视情况填写内容。

我貌似本来没有GPTService这个文件,从库里下载复制粘贴到GPT文件夹并修改之后,出现了新的报错
2023-11-01 15:25:55,687 ERROR HTTPSConnectionPool(host='api.geekerwan.net', port=443): Max retries exceeded with url: /chatgpt2 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000234B749DCC0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))2023-11-01 15:25:55,692 INFO Something wrong with internet, sending: 你等一下。。。
这个又在哪改,还是说,我应该先搭个梯子🤣

@LIEGU0317
Copy link

修改GPT/GPTService.pyelif self.chatVer == 3部分代码。
https://api.geekerwan.net/chatgpt2改为你的接口地址,api_key视情况填写内容。

我貌似本来没有GPTService这个文件,从库里下载复制粘贴到GPT文件夹并修改之后,出现了新的报错 2023-11-01 15:25:55,687 ERROR HTTPSConnectionPool(host='api.geekerwan.net', port=443): Max retries exceeded with url: /chatgpt2 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000234B749DCC0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))2023-11-01 15:25:55,692 INFO Something wrong with internet, sending: 你等一下。。。 这个又在哪改,还是说,我应该先搭个梯子🤣

这确实网络的问题,当‘chatbot’连接不到目标网络时就会出现这个报错,此过程是需要富强上网。如果改动api.openai.com为自建端口可能会出现一些意想不到的错误,推荐是不要改动项目以外的包,而是启动时附带chatVer为3(可以参考run-gpt3.5-api.bat),并参照我在此issue·的上一个回答,我想这对你会有所帮助。

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