Skip to content

Commit

Permalink
Added chatgpt.response.continue() + aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed May 17, 2024
1 parent 1391404 commit 4d977c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chatgpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ const chatgpt = { // eslint-disable-line no-redeclare
}
},

continueChat: function() { this.response.continue(); },

detectLanguage: async function(text) {
if (!text) return console.error('Text argument not supplied. Pass some text!');
if (typeof text !== 'string') return console.error('Text argument must be a string!');
Expand Down Expand Up @@ -1411,6 +1413,12 @@ const chatgpt = { // eslint-disable-line no-redeclare
resend: async function() { chatgpt.send(await chatgpt.getChatData('latest', 'msg', 'user', 'latest')); },

response: {
continue: function() {
const continueBtn = chatgpt.getContinueGeneratingButton();
if (continueBtn) continueBtn.click();
else console.error('Continue button not found!');
},

get: function() {
// * Returns response via DOM by index arg if OpenAI chat page is active, otherwise uses API w/ following args:
// chatToGet = index|title|id of chat to get (defaults to latest if '' unpassed)
Expand Down Expand Up @@ -1884,6 +1892,7 @@ const funcAliases = [
['actAs', 'actas', 'act', 'become', 'persona', 'premadePrompt', 'preMadePrompt', 'prePrompt', 'preprompt', 'roleplay', 'rolePlay', 'rp'],
['activateAutoRefresh', 'activateAutoRefresher', 'activateRefresher', 'activateSessionRefresher',
'autoRefresh', 'autoRefresher', 'autoRefreshSession', 'refresher', 'sessionRefresher'],
['continueChat', 'continue', 'continueGenerating', 'continueResponse'],
['deactivateAutoRefresh', 'deactivateAutoRefresher', 'deactivateRefresher', 'deactivateSessionRefresher'],
['detectLanguage', 'getLanguage'],
['executeCode', 'codeExecute'],
Expand Down Expand Up @@ -1924,6 +1933,7 @@ const synonyms = [
['analyze', 'check', 'evaluate', 'review'],
['ask', 'send', 'submit'],
['button', 'btn'],
['continue', 'resume'],
['chat', 'conversation', 'convo'],
['data', 'details'],
['deactivate', 'deActivate', 'turnOff'],
Expand Down

0 comments on commit 4d977c4

Please sign in to comment.