From 86d8c5044a0fb8f120ce78eecb07767528b71d9a Mon Sep 17 00:00:00 2001 From: Mic Date: Wed, 15 May 2024 19:22:45 +0200 Subject: [PATCH] stripping ChatGPT in front of the response. Fixes #60 --- js/mzta-chatgpt.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index 186aecd3..06e0f74e 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -97,6 +97,7 @@ async function chatgpt_getFromDOM(pos) { response = responseDivs[nthOfResponse - 1].textContent; } response = response.replace(/^ChatGPTChatGPT/, ''); // strip sender name + response = response.replace(/^ChatGPT/, ''); // strip sender name response = response.trim().replace(/^"|"$/g, ''); // strip quotation marks //console.log('chatgpt_getFromDOM: ' + response); }