TsgcHTTP_API_OpenAIMethods › CancelFineTuningJob

CancelFineTuningJob Method

Cancels a running fine-tuning job before it completes training

Syntax

function CancelFineTuningJob(const aJobId: string) : TsgcOpenAIClass_Response_FineTuningJob;

Parameters

NameTypeDescription
aJobIdconst stringIdentifier of the fine-tuning job to cancel

Return Value

Updated job descriptor reflecting the cancelled status (TsgcOpenAIClass_Response_FineTuningJob)

Remarks

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.

Example

oResponse := oAPI.CancelFineTuningJob('ftjob-abc123');
ShowMessage('Job status: ' + oResponse.Status);

Back to Methods