Once the availability of the dependency modules is successfully verified, model training process can be initiated. For each training, unique modelId parameter must be assigned, and training data must be sent in JSON format.
- Effective from v1.70, new training requests with the same
modelIdwhile a model training is already in progress will return the error message: "The training is still in progress for the same model ID: modelId" - Effective from v1.69,
modelIdparameter can only contain lowercase letters (a-z), numbers (0-9), and hyphens ("-"). Hyphens ("-") are not allowed at the beginning and end of the text.
- Using a different
modelIdwhile retraining a model will lead to a change in the endpoint used for inference. - Please ensure that the
modelIddoes not include any Turkish characters and does not exceed 63 characters.
Endpoint:
The following URL for sending training request will be deprecated starting January 1, 2025:
{{baseUrl}}/sestekai-api/api/app/external-trainings/train
Please use the external URL for sending training request provided below.
URL: {{baseUrl}}/sestekai-api/api/external/trainings/train
HTTP Method: POST
Content-Type: multipart/form-data
The access token acquired for the training must be included in the request header.
Text Classification Training
Here's an example of a request:
curl --location ' {{baseUrl}}/sestekai-api/api/external/trainings/train' \
--header 'Authorization: Bearer <token>' \
--form 'modelId="\"unique id of the model\""' \
--form 'productName="<productName>"' \
--form 'languageCode="\"en-US\" | \"tr-TR\" | \"ar-SA\" | \"lv-LV\" | \"ru-RU\" | \"es-ES\" | “ur-PK\" | \"fr-FR\" | \"nl-NL\" | “de-DE\" | \"it-IT\"
"' \
--form 'dataSchema="utterance"' \
--form 'dataFile=@"/path/to/file"'
Expected Response: 200 OK & Response Body: Experiment Object
text-classification-training-data.json
The JSON data file should have columns labeled as "Label" and "Text".
JSON Data Structure Sample:
{"Label": "label1", "Text": "text for the first entry."}
{"Label": "label2", "Text": "text for the second entry."}
{"Label": "label3", "Text": "text for the third entry."}
