[requirements]
- OpenAI API Key
- Node v16
- npm/yarn/pnpm
- python3 (3.7+)
- prepare dataset for the API
- upload a file
- return the file id
- send train request
- return model id
Details are in my repo.
koji / open-ai-fine-tuning-script
js scripts for OpenAI fine tuning API
Fine Tuning API with javascript
https://platform.openai.com/docs/guides/fine-tuning
steps
- prepare dataset for the API
- upload a file
- return the file id
- send train request
- return model id
Before running the script
Before running the node script, we need to do a couple of things.
requirements python + nodejs
-
Get OpenAI API Key Go to the following url and create a new API key.
https://platform.openai.com/account/api-keys
Then you need to create.env
file from.env.sample
and put the API key you got. -
Prepare the dataset For using OpenAI fine-tuning API, we will need to upload the dataset so first we need to create a file which is a
jsonl
.
The format is below. sample: data.jsonl
{ "prompt": "users' question", "completion": "answer to the question" }
// sample
{ "prompt": "What is the OT-2 Python Protocol API? ", "completion": "The OT-2 Python
…
Top comments (0)