Update index.html

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

View file

@ -45,7 +45,11 @@
} }
function generateHTMLFromPrompt(prompt) { function generateHTMLFromPrompt(prompt) {
const url = `https://cloud.sparksammy.com/yaps.php?targetUrl=https://ollama-api.nodemixaholic.com/api/generate`; // https://ollama-api.nodemixaholic.com/api/generate const url = `https://olproxy.nodemixaholic.com`; // Replace with your proxy server URL and port
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) {
@ -65,10 +69,12 @@ Do NOT use external libraries.
Fix any bugs as well.`; Fix any bugs as well.`;
} }
const body = JSON.stringify({ body.append('prompt', prompt);
model: "starcoder2:7b",
prompt: prompt // User's prompt from the text area //const body = JSON.stringify({
}); //model: "starcoder2:7b",
//prompt: prompt // User's prompt from the text area
//});
return fetch(url, { return fetch(url, {
method: "POST", method: "POST",