younifyd
Menu

Perform text embedding inference on the service

Perform text embedding inference on the service

POST/_inference/text_embedding/{inference_id}

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Perform text embedding inference on the service action (under inference).
  3. Fill in the fields below, then reference the result from later steps as {{performTextEmbeddingInferenceOnTheService.response.data}}.

Request

Path parameters

inference_idstringrequired

The inference Id

Query parameters

timeoutoneOf

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

Request body

Enter the body as JSON in the step's Body field.

inputoneOfrequired

Inference input. Either a string or an array of strings.

input_typestring

The input data type for the text embedding model. Possible values include: * `SEARCH` * `INGEST` * `CLASSIFICATION` * `CLUSTERING` Not all services support all values. Unsupported values will trigger a validation exception. Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info. > info > The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.

task_settingsany

Task settings for the individual inference request. These settings are specific to the <task_type> you specified and override the task settings specified when initializing the service.

json
{
  "input": null,
  "input_type": "string",
  "task_settings": null
}

Response

Returns 200 with an object. Read it in later steps with {{performTextEmbeddingInferenceOnTheService.response.data.<field>}}.

text_embedding_bytesarray<object>
embeddinganyrequired
text_embedding_bitsarray<object>
embeddinganyrequired
text_embeddingarray<object>
embeddinganyrequired
json
{
  "text_embedding_bytes": [
    {
      "embedding": null
    }
  ],
  "text_embedding_bits": [
    {
      "embedding": null
    }
  ],
  "text_embedding": [
    {
      "embedding": null
    }
  ]
}

Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.

Perform text embedding inference on the service — Elasticsearch — Documentation