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();Integrating OpenAI GPT-4 with BAS
-
Can someone give me a step by step guide on how exactly I can setup up open ai with BAS for social site commenting, for eg. On Facebook, I want to be able to do the following
Scrape Post Content
Call ChatGPT API (HTTP Request)
Parse Response JSON
Enter Generated Comment
Submit the CommentBut i dont have coding knowlege. I'd like to repeat the process for Instagram, X, Tiktok.
Thanks
Gav
-
@kaelcamaris Search for OpenAI in the forum, there's a free module