This repository aims to share a tool created for generating fine-tuning data for OpenAI models using Node.js. If you choose to download it, please make sure to customize it for your specific use case.
- After cloning or forking this repository, execute the
yarn
command to install all dependencies. - If you plan to upload your
generated.jsonl
file, you will need to include a.env
file with yourOPENAI_API_KEY
.
start
: Executes themain()
function once, generating thegenerated.jsonl
file.dev
: Runs continuously using nodemon.
Caution: Be careful not to run yarn dev
while uploading to OPENAI, as it may result in unintentional data submissions.
- Ensure you have created the
rawData
file in thesrc/data
directory. OpenAI requires a minimum of 10 messages to finetune a model, but recommends 50-100. - run
yarn start
- If your raw data is formatted correctly, the
generated.jsonl
will be saved insrc/data
.
Note: By default, the upload functionality is commented out to prevent unintentional submissions.