Perform decision inference on the service

Auth

Answer a set of named questions about an input, such as whether a customer is complaining, which team should handle a request, or how angry a customer is. The questions are defined in the task settings of the inference endpoint, and can be replaced for a single request through task_settings.

Note

Only the elastic service currently supports the decision task.

Required privileges

Cluster privileges monitor_inference

Path parameters

inference_id string required

The unique identifier for the inference endpoint.

Query parameters

timeout string · default: 30s

The amount of time to wait for the inference request to complete.

Request body

input union oneOf required

The input to answer the questions about. It can be specified as a string, or as an object. The object form additionally allows specifying images.

string example:

"input": "I was charged twice for my order and nobody answers my emails."
		

object example:

"input": {
  "type": "image",
  "format": "base64",
  "value": "data:image/jpeg;base64,..."
}
		
One of:
task_settings object

Task settings for the individual inference request. These settings override the task settings specified when creating the inference endpoint.

questions map string to oneOf

The questions to answer, keyed by question name. The answers in the response use the same names. The questions replace the ones of the inference endpoint as a whole. At least one question is required.

Response

application/json
decision object required
answers map string to oneOf required

The answers, keyed by the name of the question they answer.