From df17226b7ae290aa1618ec2f8a054b4aa8b2261d Mon Sep 17 00:00:00 2001 From: mic Date: Wed, 1 May 2024 00:05:38 +0200 Subject: [PATCH] stripping quotation marks from the response --- js/mzta-chatgpt.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index bd9a115a..22fea733 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.trim().replace(/^"|"$/g, ''); // strip quotation marks //console.log('chatgpt_getFromDOM: ' + response); } return response;