mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: #760
This commit is contained in:
parent
b95bacc7e8
commit
4a3090c6f9
3 changed files with 20 additions and 11 deletions
|
|
@ -5,7 +5,7 @@ export async function getChatHistoryGroup (e, num) {
|
|||
// if (e.adapter === 'shamrock') {
|
||||
// return await e.group.getChatHistory(0, num, false)
|
||||
// } else {
|
||||
let latestChats = await e.group.getChatHistory(0, 1)
|
||||
let latestChats = await e.group.getChatHistory(e.seq || e.message_id, 1)
|
||||
if (latestChats.length > 0) {
|
||||
let latestChat = latestChats[0]
|
||||
if (latestChat) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class Tokenizer {
|
|||
throw new Error('no valid group id')
|
||||
}
|
||||
let group = e.bot.pickGroup(groupId, true)
|
||||
let latestChat = await group.getChatHistory(0, 1)
|
||||
let latestChat = await group.getChatHistory(undefined, 1)
|
||||
let seq = latestChat[0].seq
|
||||
let chats = latestChat
|
||||
function compareByTime (a, b) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue