How to intercept multiple backticks notation in OpenAI response
I have written a simple OpenAI based chatbot in JS, but i want to intercept the backticks indicating the language in the chatbot response… in both opening and close I have tried multiple regexes, i came out with the following: fetch(API_URL, requestOptions) .then(res => res.json()) .then(data => { messageElement.textContent = data.choices[0].message.content.trim(); // Find and replace … Lees meer