Update 'index.js'

This commit is contained in:
nodemixaholic 2024-03-15 21:40:11 +00:00
parent 106558caec
commit cf53a3ab91

View file

@ -53,8 +53,6 @@ function getLangID() {
} }
} }
let answer = await instance.prompt(`${problem} - This must be coded in pure ${getLangID()}, no external libraries or requirements. Please provide the code, the full code, and nothing but the code. No chit-chat, no markdown, just code.`);
function replaceAll(str, find, replace) { function replaceAll(str, find, replace) {
return str.replace(new RegExp(find, 'g'), replace); return str.replace(new RegExp(find, 'g'), replace);
} }
@ -63,6 +61,7 @@ async function main() {
model: "codellama", model: "codellama",
url: "http://127.0.0.1:11434/api/", url: "http://127.0.0.1:11434/api/",
}); });
let answer = await instance.prompt(`${problem} - This must be coded in pure ${getLangID()}, no external libraries or requirements. Please provide the code, the full code, and nothing but the code. No chit-chat, no markdown, just code.`);
let generation = 1; let generation = 1;
let answerParsed = "" let answerParsed = ""
let problemSolved = false; let problemSolved = false;