TsgcHTTP_API_OpenAI › Methods › CreateFineTune
Creates a fine-tune using the legacy fine-tunes API (deprecated, use CreateFineTuningJob instead)
function CreateFineTune(const aRequest: TsgcOpenAIClass_Request_FineTune) : TsgcOpenAIClass_Response_FineTune;
| Name | Type | Description |
|---|---|---|
aRequest | const TsgcOpenAIClass_Request_FineTune | Legacy fine-tune request with training file id, base model and hyperparameters |
Fine-tune descriptor with id, status and created timestamp (TsgcOpenAIClass_Response_FineTune)
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.
oRequest := TsgcOpenAIClass_Request_FineTune.Create;
oRequest.Model := 'davinci';
oRequest.TrainingFile := 'file-abc123';
oResponse := oAPI.CreateFineTune(oRequest);
ShowMessage('Legacy fine-tune id: ' + oResponse.Id);