Get the OpenAPI API key and set it to an environment variable.
export OPENAI_API_KEY=<your api key>
Specify a JSONL-formatted training file and execute the following.
# Optionally you can use n_epochs after file path
npm run train sample.jsonl
After a while, the fine-tuned model name will be output on the console.
To check the result of fine-tuning, refer to job events or result_file
.
# get result_file from training job
npm run list-jobs
# list job event
npm run list-event <job-id>
# show result-file
npm run get-files <result_file-id>
Test with a fine-tuned model name and any prompts.
npm run chat -- <model-name> "<prompt>"