chatgpt-google-extension icon indicating copy to clipboard operation
chatgpt-google-extension copied to clipboard

ability to continue conversation or follow up

Open dominiksipowicz opened this issue 2 years ago • 11 comments

A link to ChatGPT can be used to continue the conversation

dominiksipowicz avatar Dec 05 '22 00:12 dominiksipowicz

I'm not sure if this will continue the conversation or start a new one

wong2 avatar Dec 05 '22 02:12 wong2

A standard link to the ChatGPT page would just start a new conversation. Maybe a way to approximate this would be to automate sending the same question through the input form, but even then ChatGPT doesn't always return the same answer.

Plutone11011 avatar Dec 05 '22 16:12 Plutone11011

What about a "Try again" button like the one in ChatGPT page?

This feature might warrant its own issue.

Plutone11011 avatar Dec 05 '22 20:12 Plutone11011

Given ChatGPT has released conversation saving/continuing now, this might be more viable?

Previous chats are accessible using their UUID with a link format of https://chat.openai.com/chat/:UUID. So as long as that UUID is something that the extension has available to it at that time, should be fairly trivial to create a link?

That said, this will likely conflict with the recently released 'delete search chat' feature:

  • https://github.com/wong2/chat-gpt-google-extension/issues/130
    • https://github.com/wong2/chat-gpt-google-extension/releases/tag/v1.9.0
      • https://github.com/wong2/chat-gpt-google-extension/commit/a65da0a5290a1150a4d24879daeab876f7f3cd0e

0xdevalias avatar Dec 21 '22 21:12 0xdevalias

Yes, that's what I'm trying to implement yesterday at first, but met some 429 problems so I decided to go the deletion way temporarily. Will try this again later!

wong2 avatar Dec 21 '22 23:12 wong2

This issue has been linked to a Canny post: Continue conversation on ChatGPT website :tada:

canny[bot] avatar Dec 22 '22 05:12 canny[bot]

+1 to this 😅 image

GovindKrishnan avatar Jan 02 '23 03:01 GovindKrishnan

Dear Mr. @wong2 I found a way how to handle follow-up questions. I would correctly implement it by myself but sadly i have little experience in typescript, browser-messaging and Data-Stream-handling.

When becoming the first answer, ChatGPT sends a conversation_id, which you already use to delete conversations. For follow-up questions, just include a: conversation_id in the message-body:

        await fetchSSE('https://chat.openai.com/backend-api/conversation', {
          method: 'POST',
          signal: controller.signal,
          headers: {
            'Content-Type': 'application/json',
            Authorization: `Bearer ${accessToken}`,
          },
          body: JSON.stringify({
            action: 'next',
            conversation_id: conversationId, //important change!
            messages: [
              {
                id: uuidv4(),
                role: "user",
                content: {
                  content_type: "text",
                  parts: ["can you elaborate on this?"] //TODO actual follow-up question
                }
              },
            ],
            model: 'text-davinci-002-render',
            parent_message_id: messageId,//take the uuidv4 from the previous generated
          }),
          onMessage(message: string) {
            console.debug('follow-up sse message:', message)
          },
        })

which results in something like this: grafik

grafik

For better understanding, I uploaded you the changed background → index.tsx file. index.zip

hope I could help

Duskfen avatar Jan 18 '23 18:01 Duskfen

I know a bit of Typescript and have been wanting to contribute to this excellent project. Let me take a look and see if I can help.

electraport avatar Jan 18 '23 19:01 electraport

Were you able to find any solution to continue the conversation?

isarikaya avatar Feb 03 '23 09:02 isarikaya

In case anyone wants to solve this problem. I create an npm package to bring the AI power of the ChatGPT to another webpage and it has the ability to continue the conversation.

https://github.com/lxfater/ai-bridge

lxfater avatar Feb 16 '23 03:02 lxfater

Released in v2.0.0

wong2 avatar Feb 20 '23 11:02 wong2