Training
The training API handles all training methods for bots that both use AL or not.
The Training APIs are as simple as it can be - Both contain 3 methods, one for listing, one that requests a new training, and a last one which discerns whether a training should be available as of now. If you send a trainign request while the /training-availability does not inform it's available, the training proccess will fail at the nlp.
Standard Training
Creates a request for a bot training, which will be sent to it's nlp-adequate training MS. Returns a TrainingAvailabilityDTO with the current training version and status.
A valid uuid of an organization
A valid uuid of an environment
The UUID of the bot whose entity you are searching belong to
Ok
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Internal Server Error
POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/training HTTP/1.1
Host:
Accept: */*
{
"trainingAvailable": "text",
"currentVersion": 1,
"nextVersion": 1,
"documentStatus": "text"
}
Returns a TrainingAvailabilityDTO indicating wether there is an ongoing training and if a new one is elibigle. When a new value is eligible, the next version number will be sent instead.
A valid uuid of an organization
A valid uuid of an environment
The UUID of the bot whose entity you are searching belong to
Ok
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Internal Server Error
GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/training/training-availability HTTP/1.1
Host:
Accept: */*
{
"trainingAvailable": "text",
"currentVersion": 1,
"nextVersion": 1,
"documentStatus": "text"
}
Returns a page of the bot's trainings. If validOnly is sent with value true, only successfull trainings are shown, instead.
A valid uuid of an organization
A valid uuid of an environment
The UUID of the bot whose entity you are searching belong to
Boolean that filters the search in order to find only trainings that obtained success
false
Current page, starting at 1
1
Size of the page
5
Field want to ordernate, the default is 'updatedAt'
updatedAt
Direction of ordenation, ASC or DESC. The default is DESC
DESC
Ok
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Internal Server Error
GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/training/list?page=1&size=5 HTTP/1.1
Host:
Accept: */*
{
"totalPages": 1,
"totalElements": 1,
"pageable": {
"unpaged": true,
"paged": true,
"pageNumber": 1,
"pageSize": 1,
"offset": 1,
"sort": {
"unsorted": true,
"sorted": true,
"empty": true
}
},
"numberOfElements": 1,
"size": 1,
"content": [
{
"id": "text",
"version": "text",
"status": "text",
"statusDocument": "text",
"statusFAQ": "text",
"accuracy": 1,
"updatedAt": "text",
"errorMsg": "text",
"errorDocument": "text",
"errorFAQ": "text",
"statistics": {
"documentsUpdated": 1,
"success": 1,
"error": 1
},
"user": {
"name": "text",
"imageUrl": "text"
}
}
],
"number": 1,
"sort": {
"unsorted": true,
"sorted": true,
"empty": true
},
"first": true,
"last": true,
"empty": true
}
Knowledge AI Training
UUID of the organization
UUID of the environment
UUID of the bot
It is an identifier provided by the API client that will be used to identify distributed logs.
Optional structure. used to add new rules into the training and bypass new fields into KAI's register-doc v2
Optional. Maximum size of a chunk.
Optional. Limit of overlapping characters between chunks. Bigger overlap preserves context but increases token usage.
Optional. A list of collectionUUIDs (Document groups) to train. If empty, it trains all documents instead.
Optional. A list of documentIds to train. If empty, it trains all documents instead.
Flag to indicate if wants to train all collections from bot. If true, it will override filterCollectionUuids
Accepted
Bad Request
Unauthorized
Forbidden
Not Found
Request Timeout
Conflict
Unprocessable Entity
Internal Server Error
POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/training/automated-learn HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 120
{
"windowsLength": 1,
"overlap": 1,
"filterCollectionUuids": [
"text"
],
"filterDocumentIds": [
"text"
],
"trainAllCollections": true
}
{
"trainingAvailable": "text",
"currentTrainingUUID": "text",
"currentVersion": 1,
"nextVersion": 1,
"documentStatus": "text"
}
Returns a TrainingAvailabilityDTO indicating wether there is an ongoing training and if a new one is elibigle. When a new value is eligible, the next version number will be sent instead.
It is the organization uuid where the bot is.
It is the environment uuid where the bot is.
It is the identification of the bot.
Optional collection UUID
A boolean flag indicating whether the operation should consider any collection or a specific one. When this flag is true, the collectionUUID will be disregarded
false
A boolean flag indicating whether to check if the AI feature is enabled.
false
Ok
Bad Request
Unauthorized
Forbidden
Not Found
Request Timeout
Conflict
Unprocessable Entity
Internal Server Error
GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/training/automated-learn/availability HTTP/1.1
Host:
Accept: */*
{
"trainingAvailable": "text",
"currentTrainingUUID": "text",
"currentVersion": 1,
"nextVersion": 1,
"documentStatus": "text"
}
Returns a page of the bot's trainings. If validOnly is sent with value true, only successfull trainings are shown, instead.
A valid uuid of an organization
A valid uuid of an environment
The UUID of the bot whose entity you are searching belong to
Boolean that filters the search in order to find only trainings that obtained success
false
Current page, starting at 1
1
Size of the page
5
Field want to ordernate, the default is 'updatedAt'
updatedAt
Direction of ordenation, ASC or DESC. The default is DESC
DESC
Ok
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Internal Server Error
GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/training/automated-learn?page=1&size=5 HTTP/1.1
Host:
Accept: */*
{
"totalPages": 1,
"totalElements": 1,
"pageable": {
"unpaged": true,
"paged": true,
"pageNumber": 1,
"pageSize": 1,
"offset": 1,
"sort": {
"unsorted": true,
"sorted": true,
"empty": true
}
},
"numberOfElements": 1,
"size": 1,
"content": [
{
"id": "text",
"version": "text",
"status": "text",
"statusDocument": "text",
"statusFAQ": "text",
"accuracy": 1,
"updatedAt": "text",
"errorMsg": "text",
"errorDocument": "text",
"errorFAQ": "text",
"statistics": {
"documentsUpdated": 1,
"success": 1,
"error": 1
},
"user": {
"name": "text",
"imageUrl": "text"
}
}
],
"number": 1,
"sort": {
"unsorted": true,
"sorted": true,
"empty": true
},
"first": true,
"last": true,
"empty": true
}
Last updated
Was this helpful?