Continue in-complete GPT responses.

A script that makes GPT responses continue.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Continue in-complete GPT responses.
// @description  A script that makes GPT responses continue. 
// @version      1.1
// @icon         https://www.google.com/favicon.ico
// @author       blank
// @namespace    https://google.com
// @match        https://chat.openai.com/*
// @run-at       document-start
// @license      MIT
// ==/UserScript==
(function() {
    "use strict";
 
    const log = console.log;
 
    // Get the ChatGPT response element.
    const responseElement = document.querySelector(".chat-gpt-response");
 
    // Check if the response is incomplete.
    if (responseElement.textContent.endsWith("...")) {
 
        // Get the last word in the response.
        const lastWord = responseElement.textContent.split(" ").pop();
 
        // Generate a continuation for the response.
        const continuation = GPT.continue(lastWord);
 
        // Append the continuation to the response.
        responseElement.textContent += continuation;
 
        // Check if the response is still incomplete.
        if (responseElement.textContent.endsWith("...")) {
 
            // Generate a new continuation for the response.
            const newContinuation = GPT.continue(continuation);
 
            // Append the new continuation to the response.
            responseElement.textContent += newContinuation;
        }
    }
})();