Update 'index.js'

This commit is contained in:
nodemixaholic 2024-03-15 20:46:28 +00:00
parent 9ce886d78b
commit a40e8add20

View file

@ -67,11 +67,11 @@ async function main() {
while (problemSolved == false) { while (problemSolved == false) {
try { try {
console.log(`Generation ${generation}`) console.log(`Generation ${generation}`)
console.log(answer.response)
answerParsed = answer.response.replaceAll("```javascript","").replaceAll("```",""); answerParsed = answer.response.replaceAll("```javascript","").replaceAll("```","");
langExec(answerParsed); langExec(answerParsed);
problemSolved = true; problemSolved = true;
generation = generation + 1; generation = generation + 1;
console.log(answerParsed)
} catch (error) { } catch (error) {
answer = await instance.prompt(`There was an error: ${error.message}. Please only provide the code, the full code, and nothing but the code. No chit-chat, no markdown, just code. Also, make sure it's written in ${getLangID()} without any libraries besides included.`) answer = await instance.prompt(`There was an error: ${error.message}. Please only provide the code, the full code, and nothing but the code. No chit-chat, no markdown, just code. Also, make sure it's written in ${getLangID()} without any libraries besides included.`)
} }
@ -82,7 +82,7 @@ async function main() {
async function aThousand() { async function aThousand() {
let potentialAnswersQuestion = `Which answer is best suited for ${problem}? let potentialAnswersQuestion = `Which answer is best suited for ${problem}?
If there are two or more answers that are about as equal, but one has lower quality code, choose the one with higher quality code. If there are two or more answers that are about as equal, but one has lower quality code, choose the one with higher quality code.
Pick ONLY ONE ANSWER. Pick ONLY ONE ANSWER. MUST BE PROGRAMMED IN THE LANGUAGE ${getLangID}!
Answers: Answers: