Labelator.io Serving (1.0.0)
Download OpenAPI specification:Download
Hosting API for Labelator.io models allows management via Labelator.io configuration
Get predictions for request
Allows query predictions for one or more texts
If final handling is manual or manual-review, data will be added to labelatorio project (unlest test mode is activated ./predict?test=true)
For this it is recomended to list of string, but rather list of objects, cointaing key, text and optional contextData. This will allow additional data to be send to Labelator.io.
If explain mode activated ( ./predict?explain=true), response will contain explanations for all routing configuration for better understanding of the decision
Settings parameter is to enable query with custom settings for particular request. It is generaly not recomended to use this in production since it can rapidly decrease the performance.
Especialy if new settings are pointing to model that has not been preloaded by defaul configuration
query Parameters
model_name | string (Model Name) |
explain | boolean (Explain) Default: false |
test | boolean (Test) Default: false |
Request Body schema: application/json
required | Array of strings or PredictionRequestRecord (object) (Texts) |
Settings (object) or ModelSettings (object) (Settings) |
Responses
Request samples
- Payload
Content type
application/json
{- "texts": [
- "string"
], - "settings": { }
}
Response samples
- 200
- 422
Content type
application/json
{- "predictions": [
- {
- "predicted": [
- {
- "label": "string",
- "score": 0
}
], - "handling": "string",
- "key": "string",
- "explanations": [
- {
- "route_id": 0,
- "route_type": "string",
- "route_handling": "string",
- "matched": true,
- "used": true,
- "matched_prediction": [
- {
- "prediction": {
- "label": "string",
- "score": 0
}, - "matched": true
}
], - "matched_similar": true,
- "matched_similar_examples": [
- {
- "text": "string",
- "score": 0,
- "labels": [
- "string"
], - "correctly_predicted": true
}
], - "matched_regex": true
}
]
}
]
}