This robot helps you to ask your questions automatically from OpenAI ChatGPT.
Due to the increasing demand for the use of artificial intelligence in development, this robot has been developed.
- ChatGPT-3.5
- ChatGPT-4
- Node.js +16
- Node package managements (NPM / Yarn)
- Install dependencies:
npm install
/yarn install
- Install Playwright test Chromium browser with:
npx playwright install
- Install EditThisCookie extension for your favorite browsers: Chrome / Firefox
- Go to the OpenAI Chat website and login to your account.
- Now open the EditThisCookie extension and export your cookies from the top navigation bar in extension panel. (It will copy all of your cookies into clipboard automatically)
- Open cookies.json file in
./src/cookies.json
and paste cookies object here. (Note: Please change all wordssameSite
toSameSite
. The first letter should be capital letter, otherwise the bot will not work) - Open
./src/questions.ts
and arrange your questions in an array. - Run
npm run dev
- After the Chromium browser is running, and it goes to OpenAI Chat page, you have to click the 'OK' button for the first time.
- You should ask the questions clearly to get the best answer. ๐ฆ
- You can use prompts. Just make sure that the desired prompt is written in one. ๐พ
- Use \n for asking multiple questions in the one question item
- Don't use '\n' between code-block tag
โ
php $a = 10; echo $a;
โ php $a = 10; \n echo $a;
By default, your question will be asked every 5 minutes, but you can implement the limit of cronjob you need, Open the ./src/OpenAI.ts
file and edit the highlighted section:
(Please note that for ChatGPT-4 version, it is recommended to send a question every 5 minutes to easily bypass the limit of 50 questions per 3 hours.)
questionsSchedule()
{
// Change '*/5 * * * *' to everything you want
cron.schedule("*/5 * * * *", async () => {
if (this.questionId < this.questionsArr.length) {
await this.askingScheduledQuestions(this.questionsArr[this.questionId]);
this.questionId++;
} else {
console.log((chalk.yellow('All your questions have been asked! Please stop the bot (using Crtl + C on Windows or Control + C on Mac) and update the list of questions at src/questions.ts.')));
}
});
}