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 union oneOf · default: 30s

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

Values: -1 0

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:

Response

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

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

<string> union oneOf
One of:
type: predicate

The answer to a predicate question.

type enum required
Values: predicate
probability number required

The probability that the statement in the question is true.