This repository contains a script for gathering responses from ChatGPT API and produce a file with the responses.
To use this script, you must have Node.js and npm installed on your system.
- Clone this repository to your local machine.
- Navigate to the repository directory in your terminal.
- Run
npm install
to install the necessary dependencies. - Copy
.env.example
to.env
and fill in theOPENAI_API_KEY
which can be obtained by following this page. - Run
npx prisma generate
to generate Prisma client. - Run
npx prisma migrate dev --name init
to initialize database and sync with Prisma.
- Run the script using the command
npm start -s="<SOURCE_FOLDER>"
. For example,npm start -s="./competition"
. - The script will output response files in
../<SOURCE_FOLDER>/competition/<TEAM_NAME>/raw/<CHARACTER>
folder. The fileresponse_log_<DATE_TIME>.txt
will be created in the../<SOURCE_FOLDER>/competition/logs
folder.
You might need to run the script at least twice to ensure that all responses are generated correctly.
Please ensure that the source folder contains only text files.
Please note that interacting with ChatGPT via API costs money. Please refer to this page for more information.
If you would like to contribute to this project, please fork this repository and submit a pull request. Please ensure that your code is well documented and that you have tested your code before submitting a pull request.
If you find any bugs, please submit an issue on this repository.