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

[Bug]: 正向代理无效 #703

Closed
Deemo119 opened this issue Feb 26, 2024 · 6 comments
Closed

[Bug]: 正向代理无效 #703

Deemo119 opened this issue Feb 26, 2024 · 6 comments
Assignees
Labels
bug? Bug或Bug修复相关

Comments

@Deemo119
Copy link

部署方式

手动部署

登录框架

Mirai

系统环境

Ubuntu23.04

Python环境

python3.12.1

QChatGPT版本

v3.0.1.3

异常情况

将正向代理文件system.json设置如下
{
"admin-sessions": [],
"network-proxies": {
"http":"http://192.168.31.123:7893",
"https": null
},
"report-usage": true,
"logging-level": "info",
"session-concurrency": {
"default": 1
},
"pipeline-concurrency": 20,
"help-message": "QChatGPT - 😎高稳定性、🧩支持插件、🌏实时联网的 ChatGPT QQ 机器人🤖\n链接:https://q.rkcn.top"
}

此中192.168.31.123:7893为旁路由openclash地址,同一局域网192.168.31.xxx下使用代理都可以访问chatgpt
反向代理文件provider.json内容如下:
{
"enable-chat": true,
"openai-config": {
"api-keys": [
"apixxxxxxxxxxxxxxxxxxxxxxxxxx" #消除过
],
"base_url": "https://api.openai.com/v1",
"chat-completions-params": {
"model": "gpt-3.5-turbo"
},
"request-timeout": 120
},
"prompt-mode": "normal",
"prompt": {
"default": "如果用户之后想获取帮助,请你说”输入!help获取帮助“。"
}
}

日志信息


/ _ \ / | | __ | | / | _ _ |
| (
) | (
| ' / ` | | ( | / | |
_
_\
|||_,|_|___|| ||

⭐️开源地址: https://github.com/RockChinQ/QChatGPT
📖文档地址: https://q.rkcn.top

[2024-02-26 21:24:11.957] /home/wuanjun/qqbot/QChatGPT/pkg/platform/manager.py (108) - [INFO] :
初始化平台适配器 0: yiri-mirai
2024-02-26 21:24:12 - INFO [WebSocket] 成功登录到账号2328412881。
2024-02-26 21:24:12 - INFO [WebSocket] 机器人开始运行。按 Ctrl + C 停止。
[2024-02-26 21:24:17.414] /home/wuanjun/qqbot/QChatGPT/pkg/pipeline/process/process.py (35) - [INFO] :
处理 person_1615630234 的请求(0): 1
[2024-02-26 21:30:19.895] /home/wuanjun/qqbot/QChatGPT/pkg/pipeline/process/handlers/chat.py (92) - [ERROR] :
对话(0)请求失败: 模型请求失败: 请求错误: Request timed out.
[2024-02-26 21:30:21.712] /home/wuanjun/qqbot/QChatGPT/pkg/core/controller.py (81) - [ERROR] :
模型请求失败: 请求错误: Request timed out.

启用的插件

No response

@Deemo119 Deemo119 added the bug? Bug或Bug修复相关 label Feb 26, 2024
@RockChinQ
Copy link
Owner

https也加一下看看

@Deemo119
Copy link
Author

添加https后为
{
"admin-sessions": [],
"network-proxies": {
"http":"http://192.168.31.123:7893/",
"https": "https:192.168.31.123:7893"
},
"report-usage": true,
"logging-level": "info",
"session-concurrency": {
"default": 1
},
"pipeline-concurrency": 20,
"help-message": "QChatGPT - 😎高稳定性、🧩支持插件、🌏实时联网的 ChatGPT QQ 机器人🤖\n链接:https://q.rkcn.top/"
}
依然出现相同报错,
请问新版本文件provider.json中,如何添加反向代理地址,在官网没有找到新版本的配置文件说明
{
"enable-chat": true,
"openai-config": {
"api-keys": [
"sk-xxxxxxxxxxxxxLe2e2S9"
],
"base_url": "https://api.openai.com/v1",
"chat-completions-params": {
"model": "gpt-3.5-turbo"
},
"request-timeout": 120
},
"prompt-mode": "normal",
"prompt": {
"default": "如果用户之后想获取帮助,请你说”输入!help获取帮助“。"
}
}
感谢作者

@RockChinQ RockChinQ self-assigned this Feb 27, 2024
@RockChinQ
Copy link
Owner

已解决的话可以关闭一下issue

@RockChinQ RockChinQ added the 低活跃度 因主要参与者不再回复而处于不活跃状态,这些issue将很快被关闭 label Feb 27, 2024
@Deemo119
Copy link
Author

依然报错,openclash运行日志内没有连接,请问新版本文件provider.json中,如何添加反向代理地址,在官网没有找到新版本的配置文件说明
{
"enable-chat": true,
"openai-config": {
"api-keys": [
"sk-xxxxxxxxxxxxxLe2e2S9"
],
"base_url": "https://api.openai.com/v1",
"chat-completions-params": {
"model": "gpt-3.5-turbo"
},
"request-timeout": 120
},
"prompt-mode": "normal",
"prompt": {
"default": "如果用户之后想获取帮助,请你说”输入!help获取帮助“。"
}
}
感谢作者

@RockChinQ
Copy link
Owner

反向代理地址就设置到 openai-config.base-url

@RockChinQ RockChinQ removed the 低活跃度 因主要参与者不再回复而处于不活跃状态,这些issue将很快被关闭 label Feb 27, 2024
@Deemo119
Copy link
Author

好的,感谢作者

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Bug或Bug修复相关
Projects
None yet
Development

No branches or pull requests

2 participants