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();How to check if a variable value exists?
-
Help please
How to check if a variable value exists in a file as a resource?
For example:variable: A1 It's ture

variable: A1 It's false

-
var a = RMap(RESOURCE_NAME).indexOf(ELEMENT_VALUE); if(a == -1){ VAR_RESULT = false; }else{ VAR_RESULT = true; }https://community.bablosoft.com/topic/10194/sf_modul - Resource_is_element
-
@tet-vivi said in How to check if a variable value exists?:
var a = RMap(RESOURCE_NAME).indexOf(ELEMENT_VALUE);
Thank you very much.
Are there any ways by using BAS module ?
So sorry, I'm no coding skills -
@linagoode1 either use a third-party module (install it) or use the code
-
Yes, i tried it. It's great!
But I am not success.When a variable value is a string "A1",
I want to check "A1" is or not in a file.
I have set the file as a resource.when the file doesn't have "A1", the result is false,
but when the flie has "A1",the result is still false.