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();Variable in function name?
-
Im trying to automate many platforms.

I have thought of this way to do it:
- take one platform domain from resource list
- check if the platform is either reddit or pinterest (or 100 other platforms)
- then call function RedditCom
is there more automated way to do it? So i dont create separate IF and "call function" every platform?
It can get very messy once I reach 100 platforms this way
-
@yourfriendkarol Yes, eval() is what you need. It is obvious.
-
@yourfriendkarol
You can do like this._call(eval([[FUNCTION_NAME]]),null)!Following solution will work for run mode, but won't work in record mode.
