diff --git a/apps/chat.js b/apps/chat.js index c1254c4..85b937f 100644 --- a/apps/chat.js +++ b/apps/chat.js @@ -234,7 +234,7 @@ export class chatgpt extends plugin { // await this.reply('chatgpt初始化出错:' + e.msg, true) // } let previousConversation = await redis.get(`CHATGPT:CONVERSATIONS:${e.sender.user_id}`) - let conversation = null + let conversation = {} if (!previousConversation) { let ctime = new Date() previousConversation = { @@ -256,6 +256,9 @@ export class chatgpt extends plugin { } const use = await redis.get('CHATGPT:USE') try { + if (Config.debug) { + logger.mark(conversation) + } let chatMessage = await this.sendMessage(prompt, conversation, use) previousConversation.conversation = { conversationId: chatMessage.conversationId diff --git a/utils/message.js b/utils/message.js index a6a5e32..84d78f2 100644 --- a/utils/message.js +++ b/utils/message.js @@ -40,7 +40,7 @@ export class OfficialChatGPTClient { } } ], - conversationId, + conversation_id: conversationId, model: Config.plus ? 'text-davinci-002-render-sha' : 'text-davinci-002-render-sha', parent_message_id: parentMessageId }