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();Test if found word matches a list of variables?
-
Heres what I'm trying to do, I'm trying to read a chat log, and test if that chat log has a found word from a list of variables.
Let's say my variables is bot, bots, Bot, Bots then i want it to respond based on that. I did this about 1 year ago but my project file doesn't seem to be the correct one....
I remember doing a IF then used .match("bot") | ("bots") | ("Bot") | ("Bots")
Can anyone remind me how I do it?
thanks in advance