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]: go-cqhttp链接成功,没有gpt回复? #697

Closed
Radicalsign2713 opened this issue Feb 23, 2024 · 9 comments
Closed

[Bug]: go-cqhttp链接成功,没有gpt回复? #697

Radicalsign2713 opened this issue Feb 23, 2024 · 9 comments
Labels
bug? Bug或Bug修复相关 低活跃度 因主要参与者不再回复而处于不活跃状态,这些issue将很快被关闭

Comments

@Radicalsign2713
Copy link

部署方式

手动部署

登录框架

go-cqhttp

系统环境

MasOS Sonoma 14, 加拿大,链接了vpn

Python环境

3.10.9

QChatGPT版本

v3.0.1.3

异常情况

go-cqhttp链接成功,登录成功,能在go-cqhttp中看到qq号接到的消息,但是除此之外没有任何反应了,gpt似乎没有连接上?但是看了一遍也没看出哪里出问题了……platform.json和provider.json中的地址也和与go-cqhttp的config.yml里面的一样,设置了nakuru "enable": true, token也一样,似乎除了账号不会做出任何回复之外没什么问题了……不好意思,从来没有接触过这方面的东西,连github账号都是刚注册的,,麻烦了……!

日志信息

终端:
[2024-02-22 20:42:53] [INFO]: 当前版本:v1.2.0
[2024-02-22 20:42:53] [INFO]: 将使用 device.json 内的设备信息运行Bot.
[2024-02-22 20:42:53] [INFO]: 检查签名服务器:https://qsign.ikunshare.link (1/2)
[2024-02-22 20:42:53] [INFO]: 检查签名服务器:- (2/2)
[2024-02-22 20:42:54] [WARNING]: 签名服务器 https://qsign.ikunshare.link 可能不可用,请求出现错误:Get "https://qsign.ikunshare.link": dial tcp: lookup qsign.ikunshare.link: no such host
[2024-02-22 20:42:54] [WARNING]: no usable sign server
[2024-02-22 20:42:54] [WARNING]: 警告: 未配置签名服务器或签名服务器不可用, 这可能会导致登录 45 错误码或发送消息被风控
[2024-02-22 20:42:54] [INFO]: Bot将在5秒后登录并开始信息处理, 按 Ctrl+C 取消.
[2024-02-22 20:42:59] [INFO]: 开始尝试登录并同步消息...
[2024-02-22 20:42:59] [INFO]: 使用协议: MacOS 5.8.9
[2024-02-22 20:43:07] [INFO]: Protocol -> connect to server: [::ffff:43.154.240.7]:8080
[2024-02-22 20:43:08] [WARNING]: Protocol -> device lock is disabled. HTTP API may fail.
[2024-02-22 20:43:11] [INFO]: 收到服务器地址更新通知, 将在下一次重连时应用.
[2024-02-22 20:43:12] [INFO]: 正在检查协议更新...
[2024-02-22 20:43:12] [INFO]: 登录成功 欢迎使用: 卦AI(oc bot)
[2024-02-22 20:43:12] [INFO]: 开始加载好友列表...
[2024-02-22 20:43:13] [INFO]: 共加载 6 个好友.
[2024-02-22 20:43:13] [INFO]: 开始加载群列表...
[2024-02-22 20:43:13] [INFO]: 共加载 1 个群.
[2024-02-22 20:43:14] [INFO]: 资源初始化完成, 开始处理信息.
[2024-02-22 20:43:14] [INFO]: アトリは、高性能ですから!
[2024-02-22 20:43:14] [INFO]: 正在检查更新.
[2024-02-22 20:43:14] [INFO]: CQ WebSocket 服务器已启动: [::]:6700
[2024-02-22 20:43:14] [INFO]: CQ HTTP 服务器已启动: [::]:5700
[2024-02-22 20:43:14] [INFO]: 检查更新完成. 当前已运行最新版本.
[2024-02-22 20:43:14] [INFO]: 开始诊断网络情况
[2024-02-22 20:43:16] [INFO]: 网络诊断完成. 未发现问题
[2024-02-22 20:55:43] [INFO]: 收到好友 ᖽ·ρ•(1932188296) 的消息: 在? (2098927207)
[2024-02-22 21:02:50] [INFO]: 收到好友 ᖽ·ρ•(1932188296) 的消息: !help (169617137)
[2024-02-22 21:03:07] [INFO]: 收到好友 ᖽ·ρ•(1932188296) 的消息: 没有任何消息… (-1827309749)

启用的插件

No response

@Radicalsign2713 Radicalsign2713 added the bug? Bug或Bug修复相关 label Feb 23, 2024
@Radicalsign2713 Radicalsign2713 changed the title [Bug]: [Bug]: go-cqhttp链接成功,没有gpt回复? Feb 23, 2024
@RockChinQ
Copy link
Owner

你启动了 QChatGPT 吗?

正常情况的 go-cqhttp 输出,QChatGPT 连上之后会显示[2024-02-23 13:04:24] [INFO]: 接受 WebSocket 连接: 127.0.0.1:64674 (/) 类似的输出:

image

正常的 QChatGPT 启用 Nakuru ,启动后的输出:
image

@Radicalsign2713
Copy link
Author

输入python3 main.py后提示是
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3: can't open file '/Users/(用户名)/main.py': [Errno 2] No such file or directory

找到文件位置后输入python3 main.py会得到
Python3 /Users/(用户名)/Downloads/QChatGPT/main.py


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

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

Traceback (most recent call last):
File "/Users/(用户名)/Downloads/QChatGPT/main.py", line 18, in
asyncio.run(boot.main())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/Users/(用户名)/Downloads/QChatGPT/pkg/core/boot.py", line 148, in main
app_inst = await make_app()
File "/Users/(用户名)/Downloads/QChatGPT/pkg/core/boot.py", line 32, in make_app
generated_files = await files.generate_files()
File "/Users/(用户名)/Downloads/QChatGPT/pkg/core/bootutils/files.py", line 40, in generate_files
shutil.copyfile(required_files[file], file)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'templates/init.py'

每次安装的时候都没有问题但是启动第二次就不知道应该怎么做了T T……不好意思……

@Radicalsign2713
Copy link
Author

templates/init.py下是有文件的……只是init.py里似乎没什么东西……?
Screenshot 2024-02-23 at 9 47 36 AM

@RockChinQ
Copy link
Owner

既然你这里有这个文件,那应该是读得到的吧。提醒你必须在main.py同目录执行启动命令,也就是工作目录必须在main.py这个目录

@Radicalsign2713
Copy link
Author

谢谢大佬T T解决了!!不过现在每次发出请求的时候都会出现这样的错误,不过检查了网络连接确保一切没问题后仍然会这样想请问有解决方法吗……!(不好意思打扰了……谢谢!!)

[2024-02-24 16:14:05.725] /Users/(用户名)/QChatGPT/pkg/platform/manager.py (108) - [INFO] :
初始化平台适配器 0: nakuru
[2024-02-24 16:14:05.729] /Users/(用户名)/QChatGPT/pkg/platform/sources/nakuru.py (328) - [INFO] :
运行 Nakuru 适配器
[2024-02-24 16:14:46.852] /Users/(用户名)/QChatGPT/pkg/pipeline/process/process.py (35) - [INFO] :
处理 person_1932188296 的请求(0): 能看到吗?
[2024-02-24 16:14:49.718] /Users/(用户名)/QChatGPT/pkg/pipeline/process/handlers/chat.py (92) - [ERROR] :
对话(0)请求失败: 模型请求失败: 请求错误: Connection error.
[2024-02-24 16:14:49.729] /Users/(用户名)/QChatGPT/pkg/core/controller.py (152) - [ERROR] :
处理请求时出错 query_id=0: Unknown message type: 请求失败<class 'str'>
[2024-02-24 16:15:17.901] /Users/(用户名)/QChatGPT/pkg/pipeline/process/process.py (35) - [INFO] :
处理 person_1932188296 的请求(1): 1
[2024-02-24 16:15:20.335] /Users/(用户名)/QChatGPT/pkg/pipeline/process/handlers/chat.py (92) - [ERROR] :
对话(1)请求失败: 模型请求失败: 请求错误: Connection error.
[2024-02-24 16:15:20.337] /Users/(用户名)/QChatGPT/pkg/core/controller.py (152) - [ERROR] :
处理请求时出错 query_id=1: Unknown message type: 请求失败<class 'str'>

@RockChinQ
Copy link
Owner

按照文档配置一下反向代理和正向代理吧,在provider.jsonsystem.json

@hhhhhge
Copy link

hhhhhge commented Feb 25, 2024

下次就一个放一个run.bat和run.sh给小白跑,里面更新什么的都写上(◦˙▽˙◦)

@hhhhhge
Copy link

hhhhhge commented Feb 25, 2024

提个小建议

@RockChinQ
Copy link
Owner

若已解决请关闭issue

@RockChinQ RockChinQ added the 低活跃度 因主要参与者不再回复而处于不活跃状态,这些issue将很快被关闭 label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Bug或Bug修复相关 低活跃度 因主要参与者不再回复而处于不活跃状态,这些issue将很快被关闭
Projects
None yet
Development

No branches or pull requests

3 participants