Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
method OpenAI.prototype.createFineTuningJob
import { OpenAI } from "https://deno.land/x/openai_deno@v0.9.8/mod.ts";

Creates a job that fine-tunes a specified model from a given dataset.

Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.

Learn more about fine-tuning

Parameters

trainingFile: OpenAIFile | string

The ID of an uploaded file that contains training data.

See upload file for how to upload a file.

Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose fine-tune.

See the fine-tuning guide for more details.

model: string

The name of the model to fine-tune. You can select one of the supported models.

Optional parameters for the API.

Returns

Promise<FineTuningJob>

A fine-tuning.job object.