diff --git a/extension.js b/extension.js index f461fe7..8b7f413 100644 --- a/extension.js +++ b/extension.js @@ -219,7 +219,7 @@ return '';} } - setApiUrl(args) { + setApiUrl(args) { const newApiUrl = args.URL; // Update the api_url variable api_url = newApiUrl; @@ -246,14 +246,16 @@ }); } - singlePrompt(args) { - const prompt = args.PROMPT; + const prompt = args.PROMPT; + const fakerefer = "https://" + Math.round(Math.random() * 40000000) + ".com" + // this is to bypass some apis from blocking scratch ides return Scratch.fetch(api_url, { method: 'POST', headers: { 'Content-Type': 'application/json', + 'Origin': ''+ fakerefer +'', }, body: JSON.stringify({ model: "gpt-3.5-turbo",