Path parameters
-
The type of the inference task that the model will perform.
Values are
text_embedding,completion,chat_completion,sparse_embedding, orrerank. -
The unique identifier of the inference endpoint.
Query parameters
-
Specifies the amount of time to wait for the inference endpoint to be created.
External documentation
Body Required
-
The chunking configuration object. Applies only to the
sparse_embeddingortext_embeddingtask types. Not applicable to thererank,completion, orchat_completiontask types.External documentation -
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_sagemakerservice andservice_settings.apiyou specified. -
Settings to configure the inference task. These settings are specific to the task type and
service_settings.apiyou 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" client.inference().put(p -> p .inferenceId("amazon_sagemaker_embeddings") .taskType(TaskType.TextEmbedding) .inferenceConfig(i -> i .service("amazon_sagemaker") .serviceSettings(JsonData.fromJson("{\"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", "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" } }