TsgcHTTP_API_OpenAIMethods › CreateFineTune

CreateFineTune Method

Creates a fine-tune using the legacy fine-tunes API (deprecated, use CreateFineTuningJob instead)

Syntax

function CreateFineTune(const aRequest: TsgcOpenAIClass_Request_FineTune) : TsgcOpenAIClass_Response_FineTune;

Parameters

NameTypeDescription
aRequestconst TsgcOpenAIClass_Request_FineTuneLegacy fine-tune request with training file id, base model and hyperparameters

Return Value

Fine-tune descriptor with id, status and created timestamp (TsgcOpenAIClass_Response_FineTune)

Remarks

Calls the legacy POST /v1/fine-tunes endpoint. This API is deprecated and only supports the original base models (ada, babbage, curie, davinci). For any new work use CreateFineTuningJob, which targets the current /v1/fine_tuning/jobs endpoint and supports modern chat models. This method is kept for backward compatibility with existing workflows.

Example

oRequest := TsgcOpenAIClass_Request_FineTune.Create;
oRequest.Model := 'davinci';
oRequest.TrainingFile := 'file-abc123';
oResponse := oAPI.CreateFineTune(oRequest);
ShowMessage('Legacy fine-tune id: ' + oResponse.Id);

Back to Methods