TimeRainStarSky / Yunzai

Yunzai 应用端,支持多账号,支持协议端:go-cqhttp、ComWeChat、GSUIDCore、ICQQ、QQBot、QQ频道、微信、KOOK、Telegram、Discord
GNU General Public License v3.0
369 stars 33 forks source link

LLOneBot接入时无法使用chatgpt-plugin的@对话功能 #105

Open gitcitt1 opened 5 months ago

gitcitt1 commented 5 months ago

已确保项目文件均为最新版本

问题描述

在Linux图形版系统中使用TRSS崽+LinuxNTQQ+LLOneBot3.26.4,安装了最新版chatgpt插件后在群聊中@机器人对话无任何回应(具体LOG在附加消息),然而使用#chat1时却可以正常对话。

预期行为

@bot正常对话

实际行为

bot无反应

复制过程

使用均为最新版的LLOneBot+TRSS+GPT插件 群聊中@机器人对话无任何回应(具体LOG在附加消息),然而使用#chat1时却可以正常对话。

环境

LinuxMint系统,LinuxNTQQ3.2.7-23361,LLOneBot3.26.5最新版,TRSS崽最新版,chatgpt-plugin最新版

可能的解决方案

没有头绪,不知道具体是哪边导致的问题,chatgpt项目那边也提了issue

附加信息

[03:25:44.035][DEBU][ws://127.0.0.1:2536/OneBotv11 <= ::ffff:127.0.0.1:34978-6wXIp8iThGSxaAUVTSrhUA==] 消息 {"self_id":2315586933,"user_id":2246727592,"time":1717097143,"message_id":-2147407954,"real_id":-2147407954,"message_seq":-2147407954,"message_type":"group","sender":{"user_id":2246727592,"nickname":"Ukirala","card":"","role":"owner"},"raw_message":"[CQ:at,qq=2315586933] 你好","font":14,"sub_type":"normal","message":[{"data":{"qq":"2315586933"},"type":"at"},{"data":{"text":" 你好"},"type":"text"}],"message_format":"array","post_type":"message","group_id":317268310}
[03:25:44.036][INFO][2315586933 <= 317268310, 2246727592] 群消息:[SAY.SO, Ukirala] [CQ:at,qq=2315586933] 你好
[03:25:44.093][DEBU][317268310, Ukirala(2246727592)][你好][ChatGpt 对话(chatgpt)][开始处理]
[03:25:44.097][DEBU][317268310, Ukirala(2246727592)][你好][添加消息(getMessage)][开始处理]
[03:25:44.100][TRAC][TRSSYz] 获取 data/messageJson/317268310.json 状态错误 [Error: ENOENT: no such file or directory, stat 'data/messageJson/317268310.json'] {
  [stack]: "Error: ENOENT: no such file or directory, stat 'data/messageJson/317268310.json'",
  [message]: "ENOENT: no such file or directory, stat 'data/messageJson/317268310.json'",
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: 'data/messageJson/317268310.json'
}
[03:25:44.112][TRAC][TRSSYz] 获取 data/messageJson/global.json 状态错误 [Error: ENOENT: no such file or directory, stat 'data/messageJson/global.json'] {
  [stack]: "Error: ENOENT: no such file or directory, stat 'data/messageJson/global.json'",
  [message]: "ENOENT: no such file or directory, stat 'data/messageJson/global.json'",
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: 'data/messageJson/global.json'
}
gitcitt1 commented 5 months ago
[03:39:17.677][INFO][2315586933 <= 317268310, 2246727592] 群消息:[SAY.SO, Ukirala] /chat1你好
[03:39:17.692][INFO][317268310, Ukirala(2246727592)][#chat1你好][ChatGpt 对话(chatgpt1)][开始处理]
[03:39:17.708][INFO][TRSSYz] chatgpt prompt: 你好
[03:39:17.709][INFO][TRSSYz] {
  previousConversation: {
    sender: {
      user_id: 2246727592,
      nickname: 'Ukirala',
      card: 'Ukirala',
      role: 'owner'
    },
    ctime: '2024-05-30T19:39:17.708Z',
    utime: '2024-05-30T19:39:17.708Z',
    num: 0,
    messages: [ [Object] ],
    conversation: {}
  }
}
[03:39:17.719][MARK][TRSSYz] {
  conversation: {
    messages: [ [Object] ],
    conversationId: undefined,
    parentMessageId: undefined,
    clientId: undefined,
    invocationId: undefined,
    conversationSignature: undefined,
    bingToken: undefined
  }
}
[03:39:17.725][MARK][TRSSYz] using api mode

使用#chat1对话正常调用api

gitcitt1 commented 5 months ago

D8{HDKR 7C03X~YAJ K 08B

已经确定造成此问题的一次更新,测试到红色标志的版本便出现本issue的错误

momonini commented 4 months ago

D8{HDKR 7C03X~YAJ K 08B

已经确定造成此问题的一次更新,测试到红色标志的版本便出现本issue的错误

雀食是这个版本,把lib\plugins\loader.js里 case "at": if (i.qq === e.self_id)

改成 case "at": if (i.qq == e.self_id)

就能响应@了