The type of the inference task that the model will perform.
Values are text_embedding, completion, chat_completion, sparse_embedding, or rerank.
The unique identifier of the inference endpoint.
Specifies the amount of time to wait for the inference endpoint to be created.
The chunking configuration object.
The type of service supported for the specified task type. In this case, amazon_sagemaker.
Value is amazon_sagemaker.
Settings used to install the inference model.
These settings are specific to the amazon_sagemaker service and service_settings.api you specified.
Settings to configure the inference task.
These settings are specific to the task type and service_settings.api you specified.
PUT _inference/text_embedding/amazon_sagemaker_embeddings
{
"service": "amazon_sagemaker",
"service_settings": {
"access_key": "AWS-access-key",
"secret_key": "AWS-secret-key",
"region": "us-east-1",
"api": "elastic",
"endpoint_name": "my-endpoint",
"dimensions": 384,
"element_type": "float"
}
}
resp = client.inference.put(
task_type="text_embedding",
inference_id="amazon_sagemaker_embeddings",
inference_config={
"service": "amazon_sagemaker",
"service_settings": {
"access_key": "AWS-access-key",
"secret_key": "AWS-secret-key",
"region": "us-east-1",
"api": "elastic",
"endpoint_name": "my-endpoint",
"dimensions": 384,
"element_type": "float"
}
},
)
const response = await client.inference.put({
task_type: "text_embedding",
inference_id: "amazon_sagemaker_embeddings",
inference_config: {
service: "amazon_sagemaker",
service_settings: {
access_key: "AWS-access-key",
secret_key: "AWS-secret-key",
region: "us-east-1",
api: "elastic",
endpoint_name: "my-endpoint",
dimensions: 384,
element_type: "float",
},
},
});
response = client.inference.put(
task_type: "text_embedding",
inference_id: "amazon_sagemaker_embeddings",
body: {
"service": "amazon_sagemaker",
"service_settings": {
"access_key": "AWS-access-key",
"secret_key": "AWS-secret-key",
"region": "us-east-1",
"api": "elastic",
"endpoint_name": "my-endpoint",
"dimensions": 384,
"element_type": "float"
}
}
)
$resp = $client->inference()->put([
"task_type" => "text_embedding",
"inference_id" => "amazon_sagemaker_embeddings",
"body" => [
"service" => "amazon_sagemaker",
"service_settings" => [
"access_key" => "AWS-access-key",
"secret_key" => "AWS-secret-key",
"region" => "us-east-1",
"api" => "elastic",
"endpoint_name" => "my-endpoint",
"dimensions" => 384,
"element_type" => "float",
],
],
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"service":"amazon_sagemaker","service_settings":{"access_key":"AWS-access-key","secret_key":"AWS-secret-key","region":"us-east-1","api":"elastic","endpoint_name":"my-endpoint","dimensions":384,"element_type":"float"}}' "$ELASTICSEARCH_URL/_inference/text_embedding/amazon_sagemaker_embeddings"
{
"service": "amazon_sagemaker",
"service_settings": {
"access_key": "AWS-access-key",
"secret_key": "AWS-secret-key",
"region": "us-east-1",
"api": "elastic",
"endpoint_name": "my-endpoint",
"dimensions": 384,
"element_type": "float"
}
}
{
"service": "amazon_sagemaker",
"service_settings": {
"access_key": "AWS-access-key",
"secret_key": "AWS-secret-key",
"region": "us-east-1",
"api": "elastic",
"endpoint_name": "my-endpoint"
}
}
{
"service": "amazon_sagemaker",
"service_settings": {
"access_key": "AWS-access-key",
"secret_key": "AWS-secret-key",
"region": "us-east-1",
"api": "elastic",
"endpoint_name": "my-endpoint"
}
}
{
"service": "amazon_sagemaker",
"service_settings": {
"access_key": "AWS-access-key",
"secret_key": "AWS-secret-key",
"region": "us-east-1",
"api": "elastic",
"endpoint_name": "my-endpoint"
}
}
{
"service": "amazon_sagemaker",
"service_settings": {
"access_key": "AWS-access-key",
"secret_key": "AWS-secret-key",
"region": "us-east-1",
"api": "elastic",
"endpoint_name": "my-endpoint"
}
}