mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
Merge branch 'v2' of github.com:ikechan8370/chatgpt-plugin into v2
This commit is contained in:
commit
83c481a4bc
3 changed files with 9 additions and 8 deletions
|
|
@ -16,13 +16,13 @@ export async function getChatHistoryGroup (e, num) {
|
|||
if (!chatHistory || chatHistory.length === 0) {
|
||||
break
|
||||
}
|
||||
chats.push(...chatHistory)
|
||||
if (seq === chatHistory[0].seq || seq === chatHistory[0].message_id) {
|
||||
chats.push(...chatHistory.reverse())
|
||||
if (seq === chatHistory[chatHistory.length - 1].seq || seq === chatHistory[chatHistory.length - 1].message_id) {
|
||||
break
|
||||
}
|
||||
seq = chatHistory[0].seq || chatHistory[0].message_id
|
||||
seq = chatHistory[chatHistory.length - 1].seq || chatHistory[chatHistory.length - 1].message_id
|
||||
}
|
||||
chats = chats.slice(0, num)
|
||||
chats = chats.slice(0, num).reverse()
|
||||
try {
|
||||
let mm = await e.bot.gml
|
||||
for (const chat of chats) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue