Closed FujiwaraChoki closed 8 months ago
chatgpt
Next.js + ChakraUI, Windows, Node.js v20.8.0, Latest Windows Version (11)
When I send multiple messages using ChatGPTUnofficialProxyAPI, it justs appends my new prompt to the latest message, how do I fix this?
ChatGPTUnofficialProxyAPI
Code:
const sendFirstMessage = async () => { const response = await api.sendMessage("..."); return { conversationId: response.conversationId, parentMessageId: response.parentMessageId, }; }; const refinedPrompt = ""; // This is the new prompt, instead of sending a new message, it appends to firstMessage if (chat.messages.length === 0) { const firstMessage = await sendFirstMessage(); gptResponse = await api.sendMessage(refinedPrompt, { conversationId: firstMessage.conversationId, parentMessageId: firstMessage.parentMessageId, }); } else { gptResponse = await api.sendMessage(refinedPrompt, { conversationId: chat.messages[chat.messages.length - 1].conversationId, parentMessageId: chat.messages[chat.messages.length - 1].parentMessageId, }); }
Turns out I should've set parentMessageId to the message Id, not IT'S parent message...
Silly.
Verify latest release
chatgpt
releaseVerify webapp is working
Environment details
Next.js + ChakraUI, Windows, Node.js v20.8.0, Latest Windows Version (11)
Describe the Bug
When I send multiple messages using
ChatGPTUnofficialProxyAPI
, it justs appends my new prompt to the latest message, how do I fix this?Code: