TsgcHTTP_API_OpenAI › Methods › CancelFineTuningJob
Cancels a running fine-tuning job before it completes training
function CancelFineTuningJob(const aJobId: string) : TsgcOpenAIClass_Response_FineTuningJob;
| Name | Type | Description |
|---|---|---|
aJobId | const string | Identifier of the fine-tuning job to cancel |
Updated job descriptor reflecting the cancelled status (TsgcOpenAIClass_Response_FineTuningJob)
Calls the POST /v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel endpoint. Only jobs that are still in validating_files, queued or running can be cancelled; calling this on a finished job is a no-op. No partial model is produced when a job is cancelled.
oResponse := oAPI.CancelFineTuningJob('ftjob-abc123');
ShowMessage('Job status: ' + oResponse.Status);