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();Setting Fail output
-
Hello
I'm trying to figure out how to set fail conditions. For example, the thread could fail on random error I don't know of.. would there be a way to write data to a file, if thread fails? I don't have specific error, so I'm not sure how to set this in BAS.
Help is much appreciated as always
Thanks & Happy New Year