It does not work if I do this:
const OpenAI = require('openai'); const openai = new OpenAI({ apiKey: [[CHATGPTAPIKEY]] }); async function main() { const completion = await openai.chat.completions.create({ model: [[MODEL]], messages: [ {"role": "system", "content": "You are a "+[[COMMENTSTYLE]]+" assistant."}, {"role": "user", "content": [[SAVED_TEXT]]} ], temperature: [[TEMPERATURE2]], max_tokens: 150, stop: ["\n", "User:"], n: 1 }); [[OUTPUT]] = completion.choices[0]; } main();GET variable with spaces
-
-
@basmail said in GET variable with spaces:
Hello guys!
I want to add a variable like "12 South St Romford RM1 1RA UK" with the GET function to my database but it does not work.
A variable like "text123" is working just fine.Does anyone know what the problem is?
Thank you and best regards!
spaces in the url must be escaped. Use the encodeURIComponent() method
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
