External Training

Prev Next

Token Endpoint:

URL: {{baseUrl}}/sestekai-api/api/external/generative-question-answering-trainings/train
HTTP Method: POST
Content-Type: multipart/form-data


  • modelId, projectName and one of dataFiles or dataUrls are required parameters within the request body.

  • The modelId should consist of lowercase letters in english (a-z), numbers (0-9), and hyphens (-). Hyphens are not allowed at the beginning or end of the text.

  • To track the progress of Generative QA model training, users have the option to provide callback information instead of relying solely on the "get training progress" endpoint. When callback information is provided, updates are sent to the specified callback URL in case of errors during training (train failed) or upon successful completion of training and deployment (train success), ensuring real-time updates on the training status.


Here's an example of a request:

curl --location '{{baseUrl}}/sestekai-api/api/external/generative-question-answering-trainings/train' \
--header 'Authorization: Bearer <token>' \
--form 'modelId="\"Model Id\""' \
--form 'projectName="<projectName>"' \
--form 'dataFiles=@"/path/to/file"' \
--form 'callbackAddress="\"Callback Address\""' \
--form 'callbackIdentityAddress="\"Callback Identity Address\""' \
--form 'callbackClientId="\"Callback Client Id\""' \
--form 'callbackClientSecret="\"Callback Client Secret\""'


Expected Response:

{
    "name": "<modelId>",
    "description": "<projectName>",
    "status": 0,
    "statusMessage": "Initialized",
    "percent": 0,
    "trainingParams": {},
    "endpoints": [],
    "documentationPath": null,
    "projectId": "718a761d-e8e3-51e4-329c-3a11ce0cae85",
    "moduleVersionId": "bc95ebb1-9fb1-183d-9069-3a11c1e3dd43",
    "experimentMetrics": [],
    "experimentDatasetMappings": [
        {
            "datasetColumn": null,
            "experimentId": "bd6aeba8-2198-744b-de5d-3a11ce0caee2",
            "datasetId": "6ceb7124-5184-7082-a086-3a11ce0caecc",
            "moduleDatasetColumnId": null,
            "isDeleted": false,
            "deleterId": null,
            "deletionTime": null,
            "lastModificationTime": null,
            "lastModifierId": null,
            "creationTime": "2024-04-08T04:03:12.7538601Z",
            "creatorId": null,
            "id": "4c1adb1f-011d-3bd3-441d-3a11ce0caef1"
        }
    ],
    "experimentTestsetMapping": [],
    "lastPublishTime": null,
    "tryToStop": null,
    "completionTime": null,
    "isDeleted": false,
    "deleterId": null,
    "deletionTime": null,
    "lastModificationTime": null,
    "lastModifierId": null,
    "creationTime": "2024-04-08T04:03:12.7406026Z",
    "creatorId": null,
    "id": "bd6aeba8-2198-744b-de5d-3a11ce0caee2"
}