ikechan8370 / chatgpt-plugin

云崽系机器人的智能聊天插件
https://www.yunzai.chat/
GNU General Public License v3.0
965 stars 100 forks source link

获取群聊聊天记录失败 #653

Closed Ray-lea closed 1 month ago

Ray-lea commented 4 months ago

问题描述

群聊使用时无法附带聊天记录

预期行为

附带聊天记录

实际行为

后台日志显示无法附带

复制过程

正常使用插件聊天

环境

Trss-yunzai,Windows Server 2022 Datacenter,Node.js v20.8.0,LLonebot

可能的解决方案

附加信息

0|TRSS-Yunzai  | [TRSSYz][17:08:15.595][INFO] {
0|TRSS-Yunzai  |   previousConversation: {
0|TRSS-Yunzai  |     sender: { user_id: 脱敏内容, nickname: '🐶', card: '🐶', role: 'member' },
0|TRSS-Yunzai  |     ctime: '2024-02-24T08:52:04.128Z',
0|TRSS-Yunzai  |     utime: '2024-02-24T08:52:04.128Z',
0|TRSS-Yunzai  |     num: 18,
0|TRSS-Yunzai  |     messages: [ [Object] ],
0|TRSS-Yunzai  |     conversation: { conversationId: 'a90f3851-b4b9-4891-bd7a-e99a069f7d75' },
0|TRSS-Yunzai  |     parentMessageId: 'chatcmpl-8viHUMoJOPK6CvDAnB6j26kbUFzl7'
0|TRSS-Yunzai  |   }
0|TRSS-Yunzai  | }
0|TRSS-Yunzai  | [TRSSYz][17:08:15.595][MARK] {
0|TRSS-Yunzai  |   conversation: {
0|TRSS-Yunzai  |     messages: [ [Object] ],
0|TRSS-Yunzai  |     conversationId: 'a90f3851-b4b9-4891-bd7a-e99a069f7d75',
0|TRSS-Yunzai  |     parentMessageId: 'chatcmpl-8viHUMoJOPK6CvDAnB6j26kbUFzl7',
0|TRSS-Yunzai  |     clientId: undefined,
0|TRSS-Yunzai  |     invocationId: undefined,
0|TRSS-Yunzai  |     conversationSignature: undefined,
0|TRSS-Yunzai  |     bingToken: undefined
0|TRSS-Yunzai  |   }
0|TRSS-Yunzai  | }
0|TRSS-Yunzai  | [TRSSYz][17:08:15.596][MARK] using api mode
0|TRSS-Yunzai  | [TRSSYz][17:08:15.597][WARN] 获取群聊聊天记录失败,本次对话不携带聊天记录 TypeError: e.group.getChatHistory is not a function
0|TRSS-Yunzai  |     at getChatHistoryGroup (file:///C:/Users/Administrator/Desktop/Miao-Yunzai/plugins/chatgpt-plugin/utils/chat.js:6:35)
0|TRSS-Yunzai  |     at chatgpt.sendMessage (file:///C:/Users/Administrator/Desktop/Miao-Yunzai/plugins/chatgpt-plugin/apps/chat.js:2224:29)
0|TRSS-Yunzai  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
0|TRSS-Yunzai  |     at async chatgpt.abstractChat (file:///C:/Users/Administrator/Desktop/Miao-Yunzai/plugins/chatgpt-plugin/apps/chat.js:1195:25)
0|TRSS-Yunzai  |     at async chatgpt (file:///C:/Users/Administrator/Desktop/Miao-Yunzai/plugins/chatgpt-plugin/apps/chat.js:965:5)
0|TRSS-Yunzai  |     at async PluginsLoader.deal (file:///C:/Users/Administrator/Desktop/Miao-Yunzai/lib/plugins/loader.js:279:52)
0|TRSS-Yunzai  | maxTokens: 1000, numTokens: 2520
0|TRSS-Yunzai  | [TRSSYz][17:08:18.539][INFO] {
0|TRSS-Yunzai  |   role: 'assistant',
0|TRSS-Yunzai  |   id: 'chatcmpl-8viJ0V9afCfbjo7PIkWCgEkglJRqo',
0|TRSS-Yunzai  |   conversationId: 'a90f3851-b4b9-4891-bd7a-e99a069f7d75',
0|TRSS-Yunzai  |   parentMessageId: '5f5ac17d-9a3b-4906-8985-a51181ec8f6f',
0|TRSS-Yunzai  |   text: '',
0|TRSS-Yunzai  |   functionCall: null,
0|TRSS-Yunzai  |   delta: '',
0|TRSS-Yunzai  |   detail: {
0|TRSS-Yunzai  |     id: 'chatcmpl-8viJ0V9afCfbjo7PIkWCgEkglJRqo',
0|TRSS-Yunzai  |     object: 'chat.completion.chunk',
0|TRSS-Yunzai  |     created: 1708765698,
0|TRSS-Yunzai  |     model: 'gpt-3.5-turbo-16k-0613',
0|TRSS-Yunzai  |     system_fingerprint: null,
0|TRSS-Yunzai  |     choices: [ [Object] ]
0|TRSS-Yunzai  |   }
0|TRSS-Yunzai  | }
github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 5 days with no activity.