TsgcHTTP_API_OpenAIMethods › RetrieveFineTuningJob

RetrieveFineTuningJob Method

Retrieves the current state of a fine-tuning job including status and result model name

Syntax

function RetrieveFineTuningJob(const aJobId: string) : TsgcOpenAIClass_Response_FineTuningJob;

Parameters

NameTypeDescription
aJobIdconst stringIdentifier of the fine-tuning job, typically starting with "ftjob-"

Return Value

Full fine-tuning job descriptor including Status, FineTunedModel and TrainedTokens (TsgcOpenAIClass_Response_FineTuningJob)

Remarks

Calls the GET /v1/fine_tuning/jobs/{fine_tuning_job_id} endpoint. Poll this method to observe progress of a long-running job: Status transitions through validating_files, queued, running and eventually succeeded, failed or cancelled. When Status equals "succeeded", FineTunedModel contains the deployable model name.

Example

oResponse := oAPI.RetrieveFineTuningJob('ftjob-abc123');
ShowMessage(Format('Status: %s, Model: %s',
  [oResponse.Status, oResponse.FineTunedModel]));

Back to Methods