File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,11 @@ <h3>Output:</h3>
122122 </ div >
123123
124124 < div id ="message-box "> </ div >
125+
125126 < script >
126- URL = 'https://illustrious-dolphin-b31b9c.netlify.app/.netlify/functions/gemini-proxy' ;
127+ // Change this variable to update the proxy endpoint
128+ const GEMINI_PROXY_URL = "https://illustrious-dolphin-b31b9c.netlify.app/.netlify/functions/gemini-proxy" ;
129+
127130 async function sendPrompt ( ) {
128131 const prompt = document . getElementById ( "prompt" ) . value . trim ( ) ;
129132 const output = document . getElementById ( "output" ) ;
@@ -132,13 +135,13 @@ <h3>Output:</h3>
132135 output . textContent = "Generating... Please wait." ;
133136 copyButton . style . display = "none" ;
134137 downloadButton . style . display = "none" ;
135-
138+
136139 try {
137140 if ( ! prompt . trim ( ) ) {
138141 throw new Error ( "Please enter a prompt to generate code." ) ;
139142 }
140-
141- const response = await fetch ( URL , {
143+
144+ const response = await fetch ( GEMINI_PROXY_URL , {
142145 method : "POST" ,
143146 headers : {
144147 "Content-Type" : "application/json"
@@ -229,5 +232,3 @@ <h3>Output:</h3>
229232 </ script >
230233</ body >
231234</ html >
232-
233-
You can’t perform that action at this time.
0 commit comments