Update index.html

This commit is contained in:
The Ghost of FOSS' Future 2024-09-17 08:14:43 -05:00 committed by GitHub
parent 114669220f
commit e89efe85f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,11 +45,7 @@
} }
function generateHTMLFromPrompt(prompt) { function generateHTMLFromPrompt(prompt) {
const url = `https://olproxy.nodemixaholic.com`; // Replace with your proxy server URL and port const url = `http://localhost:11434`; // localhost ollama
const body = new URLSearchParams();
body.append('model', 'starcoder2:7b');
const answerCount = 0; // Assuming you want this to start at 0 const answerCount = 0; // Assuming you want this to start at 0
if (answerCount < 1) { if (answerCount < 1) {
@ -69,12 +65,10 @@ Do NOT use external libraries.
Fix any bugs as well.`; Fix any bugs as well.`;
} }
body.append('prompt', prompt); const body = JSON.stringify({
model: "starcoder2:7b",
//const body = JSON.stringify({ prompt: prompt // User's prompt from the text area
//model: "starcoder2:7b", });
//prompt: prompt // User's prompt from the text area
//});
return fetch(url, { return fetch(url, {
method: "POST", method: "POST",