From e0937ccc53ec2d7676bfcd816587b088f3f86e05 Mon Sep 17 00:00:00 2001 From: Nathalie Jonathan Date: Wed, 19 Nov 2025 12:19:43 -0800 Subject: [PATCH 1/4] Add Nova MME blueprint Signed-off-by: Nathalie Jonathan --- ...nnector_nova_multimodal_model_blueprint.md | 624 ++++++++++++++++++ 1 file changed, 624 insertions(+) create mode 100644 docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md diff --git a/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md b/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md new file mode 100644 index 0000000000..88a614c348 --- /dev/null +++ b/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md @@ -0,0 +1,624 @@ +# Bedrock connector blueprint example for Nova MultiModal Model + +## 1. Add connector endpoint to trusted URLs: + +Note: no need to do this after 2.11.0 + +```json +PUT /_cluster/settings +{ + "persistent": { + "plugins.ml_commons.trusted_connector_endpoints_regex": [ + "^https://bedrock-runtime\\..*[a-z0-9-]\\.amazonaws\\.com/.*$" + ] + } +} +``` + +## 2. Create connector for Amazon Bedrock: + +Note: Different modality types require separate connectors. Create one connector for each modality you plan to use: text embedding, image embedding, video embedding, or audio embedding. + + +### Text Embedding + +If you are using self-managed Opensearch, you should supply AWS credentials: + +```json +POST /_plugins/_ml/connectors/_create +{ + "name": "Amazon Bedrock Nova multimodal model - text embedding", + "description": "Test connector for Amazon Bedrock Nova multimodal model - text embedding", + "version": 1, + "protocol": "aws_sigv4", + "credential": { + "access_key": "", + "secret_key": "", + "session_token": "" + }, + "parameters": { + "region": "", + "service_name": "bedrock", + "model": "amazon.nova-2-multimodal-embeddings-v1:0", + "input_docs_processed_step_size": 1, + "dimensions": 1024, + "normalize": true, + "embeddingTypes": [ + "float" + ], + "truncationMode": "" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "headers": { + "content-type": "application/json", + "x-amz-content-sha256": "required" + }, + "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", + "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"GENERIC_INDEX\",\n \"embeddingDimension\": ${parameters.dimensions},\n \"text\": {\n \"truncationMode\": \"${parameters.truncationMode}\",\n \"value\": \"${parameters.inputText}\"\n }\n }\n}", + "pre_process_function": "connector.pre_process.bedrock.nova.text_embedding", + "post_process_function": "connector.post_process.bedrock.nova.embedding" + } + ] +} +``` + +If using the AWS Opensearch Service, you can provide an IAM role arn that allows access to the bedrock service. +Refer to this [AWS doc](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ml-amazon-connector.html) + +```json +POST /_plugins/_ml/connectors/_create +{ + "name": "Amazon Bedrock Nova multimodal model - text embedding", + "description": "Test connector for Amazon Bedrock Nova multimodal model - text embedding", + "version": 1, + "protocol": "aws_sigv4", + "credential": { + "roleArn": "" + }, + "parameters": { + "region": "", + "service_name": "bedrock", + "model": "amazon.nova-2-multimodal-embeddings-v1:0", + "input_docs_processed_step_size": 1, + "dimensions": 1024, + "normalize": true, + "embeddingTypes": [ + "float" + ], + "truncationMode": "" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "headers": { + "content-type": "application/json", + "x-amz-content-sha256": "required" + }, + "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", + "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"GENERIC_INDEX\",\n \"embeddingDimension\": ${parameters.dimensions},\n \"text\": {\n \"truncationMode\": \"${parameters.truncationMode}\",\n \"value\": \"${parameters.inputText}\"\n }\n }\n}", + "pre_process_function": "connector.pre_process.bedrock.nova.text_embedding", + "post_process_function": "connector.post_process.bedrock.nova.embedding" + } + ] +} +``` + +### Image Embedding + +If you are using self-managed Opensearch, you should supply AWS credentials: + +```json +POST /_plugins/_ml/connectors/_create +{ + "name": "Amazon Bedrock Nova multimodal model - image embedding", + "description": "Test connector for Amazon Bedrock Nova multimodal model - image embedding", + "version": 1, + "protocol": "aws_sigv4", + "credential": { + "access_key": "", + "secret_key": "", + "session_token": "" + }, + "parameters": { + "region": "", + "service_name": "bedrock", + "model": "amazon.nova-2-multimodal-embeddings-v1:0", + "input_docs_processed_step_size": 1, + "dimensions": 1024, + "normalize": true, + "embeddingTypes": [ + "float" + ], + "imageFormat": "", + "detailLevel": "" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "headers": { + "content-type": "application/json", + "x-amz-content-sha256": "required" + }, + "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", + "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"IMAGE_RETRIEVAL\",\n \"embeddingDimension\": ${parameters.dimensions},\n \"image\": {\n \"format\": \"${parameters.imageFormat}\",\n \"detailLevel\": \"${parameters.detailLevel}\",\n \"source\": {\n \"bytes\": \"${parameters.inputImage}\"\n }\n }\n }\n}", + "pre_process_function": "connector.pre_process.bedrock.nova.image_embedding", + "post_process_function": "connector.post_process.bedrock.nova.embedding" + } + ] +} +``` + +If using the AWS Opensearch Service, you can provide an IAM role arn that allows access to the bedrock service. +Refer to this [AWS doc](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ml-amazon-connector.html) + +```json +POST /_plugins/_ml/connectors/_create +{ + "name": "Amazon Bedrock Nova multimodal model - image embedding", + "description": "Test connector for Amazon Bedrock Nova multimodal model - image embedding", + "version": 1, + "protocol": "aws_sigv4", + "credential": { + "roleArn": "" + }, + "parameters": { + "region": "", + "service_name": "bedrock", + "model": "amazon.nova-2-multimodal-embeddings-v1:0", + "input_docs_processed_step_size": 1, + "dimensions": 1024, + "normalize": true, + "embeddingTypes": [ + "float" + ], + "imageFormat": "", + "detailLevel": "" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "headers": { + "content-type": "application/json", + "x-amz-content-sha256": "required" + }, + "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", + "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"IMAGE_RETRIEVAL\",\n \"embeddingDimension\": ${parameters.dimensions},\n \"image\": {\n \"format\": \"${parameters.imageFormat}\",\n \"detailLevel\": \"${parameters.detailLevel}\",\n \"source\": {\n \"bytes\": \"${parameters.inputImage}\"\n }\n }\n }\n}", + "pre_process_function": "connector.pre_process.bedrock.nova.image_embedding", + "post_process_function": "connector.post_process.bedrock.nova.embedding" + } + ] +} +``` + +### Video Embedding + +If you are using self-managed Opensearch, you should supply AWS credentials: + +```json +POST /_plugins/_ml/connectors/_create +{ + "name": "Amazon Bedrock Nova multimodal model - video embedding", + "description": "Test connector for Amazon Bedrock Nova multimodal model - video embedding", + "version": 1, + "protocol": "aws_sigv4", + "credential": { + "access_key": "", + "secret_key": "", + "session_token": "" + }, + "parameters": { + "region": "", + "service_name": "bedrock", + "model": "amazon.nova-2-multimodal-embeddings-v1:0", + "input_docs_processed_step_size": 1, + "dimensions": 1024, + "normalize": true, + "embeddingTypes": [ + "float" + ], + "videoFormat": "", + "embeddingMode": "" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "headers": { + "content-type": "application/json", + "x-amz-content-sha256": "required" + }, + "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", + "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"VIDEO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"video\": {\n \"format\": \"${parameters.videoFormat}\",\n \"embeddingMode\": \"${parameters.embeddingMode}\",\n \"source\": {\n \"bytes\": \"${parameters.inputVideo}\"\n }\n }\n }\n}", + "pre_process_function": "connector.pre_process.bedrock.nova.video_embedding", + "post_process_function": "connector.post_process.bedrock.nova.embedding" + } + ] +} +``` + +If using the AWS Opensearch Service, you can provide an IAM role arn that allows access to the bedrock service. +Refer to this [AWS doc](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ml-amazon-connector.html) + +```json +POST /_plugins/_ml/connectors/_create +{ + "name": "Amazon Bedrock Nova multimodal model - video embedding", + "description": "Test connector for Amazon Bedrock Nova multimodal model - video embedding", + "version": 1, + "protocol": "aws_sigv4", + "credential": { + "roleArn": "" + }, + "parameters": { + "region": "", + "service_name": "bedrock", + "model": "amazon.nova-2-multimodal-embeddings-v1:0", + "input_docs_processed_step_size": 1, + "dimensions": 1024, + "normalize": true, + "embeddingTypes": [ + "float" + ], + "videoFormat": "", + "embeddingMode": "" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "headers": { + "content-type": "application/json", + "x-amz-content-sha256": "required" + }, + "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", + "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"VIDEO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"video\": {\n \"format\": \"${parameters.videoFormat}\",\n \"embeddingMode\": \"${parameters.embeddingMode}\",\n \"source\": {\n \"bytes\": \"${parameters.inputVideo}\"\n }\n }\n }\n}", + "pre_process_function": "connector.pre_process.bedrock.nova.video_embedding", + "post_process_function": "connector.post_process.bedrock.nova.embedding" + } + ] +} +``` + +### Audio Embedding + +If you are using self-managed Opensearch, you should supply AWS credentials: + +```json +POST /_plugins/_ml/connectors/_create +{ + "name": "Amazon Bedrock Nova multimodal model - audio embedding", + "description": "Test connector for Amazon Bedrock Nova multimodal model - audio embedding", + "version": 1, + "protocol": "aws_sigv4", + "credential": { + "access_key": "", + "secret_key": "", + "session_token": "" + }, + "parameters": { + "region": "", + "service_name": "bedrock", + "model": "amazon.nova-2-multimodal-embeddings-v1:0", + "input_docs_processed_step_size": 1, + "dimensions": 1024, + "normalize": true, + "embeddingTypes": [ + "float" + ], + "audioFormat": "" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "headers": { + "content-type": "application/json", + "x-amz-content-sha256": "required" + }, + "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", + "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"AUDIO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"audio\": {\n \"format\": \"${parameters.audioFormat}\",\n\"source\": {\n \"bytes\": \"${parameters.inputAudio}\"\n }\n }\n }\n}", + "pre_process_function": "connector.pre_process.bedrock.nova.audio_embedding", + "post_process_function": "connector.post_process.bedrock.nova.embedding" + } + ] +} +``` + +If using the AWS Opensearch Service, you can provide an IAM role arn that allows access to the bedrock service. +Refer to this [AWS doc](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ml-amazon-connector.html) + +#### For AOS 2.17, 2.19, and 3.1 + +```json +POST /_plugins/_ml/connectors/_create +{ + "name": "Amazon Bedrock Nova multimodal model - audio embedding", + "description": "Test connector for Amazon Bedrock Nova multimodal model - audio embedding", + "version": 1, + "protocol": "aws_sigv4", + "credential": { + "roleArn": "" + }, + "parameters": { + "region": "", + "service_name": "bedrock", + "model": "amazon.nova-2-multimodal-embeddings-v1:0", + "input_docs_processed_step_size": 1, + "dimensions": 1024, + "normalize": true, + "embeddingTypes": [ + "float" + ], + "audioFormat": "" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "headers": { + "content-type": "application/json", + "x-amz-content-sha256": "required" + }, + "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", + "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"AUDIO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"audio\": {\n \"format\": \"${parameters.audioFormat}\",\n\"source\": {\n \"bytes\": \"${parameters.inputAudio}\"\n }\n }\n }\n}", + "pre_process_function": "connector.pre_process.bedrock.nova.video_embedding", + "post_process_function": "connector.post_process.bedrock.nova.embedding" + } + ] +} +``` + +#### For AOS 3.3+ + +```json +POST /_plugins/_ml/connectors/_create +{ + "name": "Amazon Bedrock Nova multimodal model - audio embedding", + "description": "Test connector for Amazon Bedrock Nova multimodal model - audio embedding", + "version": 1, + "protocol": "aws_sigv4", + "credential": { + "roleArn": "" + }, + "parameters": { + "region": "", + "service_name": "bedrock", + "model": "amazon.nova-2-multimodal-embeddings-v1:0", + "input_docs_processed_step_size": 1, + "dimensions": 1024, + "normalize": true, + "embeddingTypes": [ + "float" + ], + "audioFormat": "" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "headers": { + "content-type": "application/json", + "x-amz-content-sha256": "required" + }, + "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", + "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"AUDIO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"audio\": {\n \"format\": \"${parameters.audioFormat}\",\n\"source\": {\n \"bytes\": \"${parameters.inputAudio}\"\n }\n }\n }\n}", + "pre_process_function": "connector.pre_process.bedrock.nova.audio_embedding", + "post_process_function": "connector.post_process.bedrock.nova.embedding" + } + ] +} +``` + +## 3. Register remote model: + +### Text Embedding + +```json +POST /_plugins/_ml/models/_register +{ + "name": "Amazon Bedrock Nova Multi-Modal Text Embedding model", + "function_name": "remote", + "description": "Test model for Amazon Bedrock Nova text embedding model", + "connector_id": "" +} +``` + +### Image Embedding + +```json +POST /_plugins/_ml/models/_register +{ + "name": "Amazon Bedrock Nova Multi-Modal Image Embedding model", + "function_name": "remote", + "description": "Test model for Amazon Bedrock Nova image embedding model", + "connector_id": "" +} +``` + +### Video Embedding + +```json +POST /_plugins/_ml/models/_register +{ + "name": "Amazon Bedrock Nova Multi-Modal Video Embedding model", + "function_name": "remote", + "description": "Test model for Amazon Bedrock Nova video embedding model", + "connector_id": "" +} +``` + +### Audio Embedding + +```json +POST /_plugins/_ml/models/_register +{ + "name": "Amazon Bedrock Nova Multi-Modal Audio Embedding model", + "function_name": "remote", + "description": "Test model for Amazon Bedrock Nova audio embedding model", + "connector_id": "" +} +``` + +## 4. Test model inference: + +### Text Embedding + +```json +POST /_plugins/_ml/models//_predict +{ + "parameters": { + "inputText": "hello world" + } +} +``` + +Sample response: + +```json +{ + "inference_results": [ + { + "output": [ + { + "name": "sentence_embedding", + "data_type": "FLOAT32", + "shape": [ + 1024 + ], + "data": [ + -0.014445321, + 0.029572023, + -0.024120959, + ... + ] + } + ] + } + ] +} +``` + +### Image Embedding + +Replace `{{image_base64}}` with your base64-encoded image string: + +```json +POST /_plugins/_ml/models//_predict +{ + "parameters": { + "inputImage": "{{image_base64}}" + } +} +``` + +Sample response: + +```json +{ + "inference_results": [ + { + "output": [ + { + "name": "sentence_embedding", + "data_type": "FLOAT32", + "shape": [ + 1024 + ], + "data": [ + 0.0012908162, + -2.3238199E-5, + -0.04998639, + ... + ] + } + ] + } + ] +} +``` + +### Video Embedding + +Replace `{{video_base64}}` with your base64-encoded video string: + + +```json +POST /_plugins/_ml/models//_predict +{ + "parameters": { + "inputVideo": "{{video_base64}}" + } +} +``` + +Sample response: + +```json +{ + "inference_results": [ + { + "output": [ + { + "name": "sentence_embedding", + "data_type": "FLOAT32", + "shape": [ + 1024 + ], + "data": [ + 0.014660299, + -0.023394907, + 0.022433588, + ... + ] + } + ] + } + ] +} +``` + +### Audio Embedding + +Replace `{{audio_base64}}` with your base64-encoded audio string: + + +```json +POST /_plugins/_ml/models//_predict +{ + "parameters": { + "inputAudio": "{{audio_base64}}" + } +} +``` + +Sample response: + +```json +{ + "inference_results": [ + { + "output": [ + { + "name": "sentence_embedding", + "data_type": "FLOAT32", + "shape": [ + 1024 + ], + "data": [ + -0.019146109, + -0.02901372, + -0.041826885, + ... + ] + } + ] + } + ] +} +``` \ No newline at end of file From fc0916d1a097d6b028a345e6a0b1eae59d2df45c Mon Sep 17 00:00:00 2001 From: Nathalie Jonathan Date: Wed, 19 Nov 2025 12:24:08 -0800 Subject: [PATCH 2/4] Fix register model part Signed-off-by: Nathalie Jonathan --- ...nnector_nova_multimodal_model_blueprint.md | 42 ++----------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md b/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md index 88a614c348..b74e711cc8 100644 --- a/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md +++ b/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md @@ -417,50 +417,14 @@ POST /_plugins/_ml/connectors/_create ## 3. Register remote model: -### Text Embedding - -```json -POST /_plugins/_ml/models/_register -{ - "name": "Amazon Bedrock Nova Multi-Modal Text Embedding model", - "function_name": "remote", - "description": "Test model for Amazon Bedrock Nova text embedding model", - "connector_id": "" -} -``` - -### Image Embedding - -```json -POST /_plugins/_ml/models/_register -{ - "name": "Amazon Bedrock Nova Multi-Modal Image Embedding model", - "function_name": "remote", - "description": "Test model for Amazon Bedrock Nova image embedding model", - "connector_id": "" -} -``` - -### Video Embedding - -```json -POST /_plugins/_ml/models/_register -{ - "name": "Amazon Bedrock Nova Multi-Modal Video Embedding model", - "function_name": "remote", - "description": "Test model for Amazon Bedrock Nova video embedding model", - "connector_id": "" -} -``` - -### Audio Embedding +Register a separate model for each connector created in step 2. Use the corresponding connector_id for each modality: ```json POST /_plugins/_ml/models/_register { - "name": "Amazon Bedrock Nova Multi-Modal Audio Embedding model", + "name": "Amazon Bedrock Nova Multi-Modal Embedding model", "function_name": "remote", - "description": "Test model for Amazon Bedrock Nova audio embedding model", + "description": "Test model for Amazon Bedrock Nova embedding model", "connector_id": "" } ``` From 88345af90571f2dfcda1582f1546495222044001 Mon Sep 17 00:00:00 2001 From: Nathalie Jonathan Date: Wed, 19 Nov 2025 13:18:58 -0800 Subject: [PATCH 3/4] Fix formatting Signed-off-by: Nathalie Jonathan --- ...nnector_nova_multimodal_model_blueprint.md | 68 +++++++++---------- .../standard_blueprints/README.md | 1 + 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md b/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md index b74e711cc8..796da1d34c 100644 --- a/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md +++ b/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md @@ -44,7 +44,7 @@ POST /_plugins/_ml/connectors/_create "dimensions": 1024, "normalize": true, "embeddingTypes": [ - "float" + "float" ], "truncationMode": "" }, @@ -53,8 +53,8 @@ POST /_plugins/_ml/connectors/_create "action_type": "predict", "method": "POST", "headers": { - "content-type": "application/json", - "x-amz-content-sha256": "required" + "content-type": "application/json", + "x-amz-content-sha256": "required" }, "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"GENERIC_INDEX\",\n \"embeddingDimension\": ${parameters.dimensions},\n \"text\": {\n \"truncationMode\": \"${parameters.truncationMode}\",\n \"value\": \"${parameters.inputText}\"\n }\n }\n}", @@ -76,7 +76,7 @@ POST /_plugins/_ml/connectors/_create "version": 1, "protocol": "aws_sigv4", "credential": { - "roleArn": "" + "roleArn": "" }, "parameters": { "region": "", @@ -86,7 +86,7 @@ POST /_plugins/_ml/connectors/_create "dimensions": 1024, "normalize": true, "embeddingTypes": [ - "float" + "float" ], "truncationMode": "" }, @@ -95,8 +95,8 @@ POST /_plugins/_ml/connectors/_create "action_type": "predict", "method": "POST", "headers": { - "content-type": "application/json", - "x-amz-content-sha256": "required" + "content-type": "application/json", + "x-amz-content-sha256": "required" }, "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"GENERIC_INDEX\",\n \"embeddingDimension\": ${parameters.dimensions},\n \"text\": {\n \"truncationMode\": \"${parameters.truncationMode}\",\n \"value\": \"${parameters.inputText}\"\n }\n }\n}", @@ -131,7 +131,7 @@ POST /_plugins/_ml/connectors/_create "dimensions": 1024, "normalize": true, "embeddingTypes": [ - "float" + "float" ], "imageFormat": "", "detailLevel": "" @@ -141,8 +141,8 @@ POST /_plugins/_ml/connectors/_create "action_type": "predict", "method": "POST", "headers": { - "content-type": "application/json", - "x-amz-content-sha256": "required" + "content-type": "application/json", + "x-amz-content-sha256": "required" }, "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"IMAGE_RETRIEVAL\",\n \"embeddingDimension\": ${parameters.dimensions},\n \"image\": {\n \"format\": \"${parameters.imageFormat}\",\n \"detailLevel\": \"${parameters.detailLevel}\",\n \"source\": {\n \"bytes\": \"${parameters.inputImage}\"\n }\n }\n }\n}", @@ -164,7 +164,7 @@ POST /_plugins/_ml/connectors/_create "version": 1, "protocol": "aws_sigv4", "credential": { - "roleArn": "" + "roleArn": "" }, "parameters": { "region": "", @@ -174,7 +174,7 @@ POST /_plugins/_ml/connectors/_create "dimensions": 1024, "normalize": true, "embeddingTypes": [ - "float" + "float" ], "imageFormat": "", "detailLevel": "" @@ -184,8 +184,8 @@ POST /_plugins/_ml/connectors/_create "action_type": "predict", "method": "POST", "headers": { - "content-type": "application/json", - "x-amz-content-sha256": "required" + "content-type": "application/json", + "x-amz-content-sha256": "required" }, "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"IMAGE_RETRIEVAL\",\n \"embeddingDimension\": ${parameters.dimensions},\n \"image\": {\n \"format\": \"${parameters.imageFormat}\",\n \"detailLevel\": \"${parameters.detailLevel}\",\n \"source\": {\n \"bytes\": \"${parameters.inputImage}\"\n }\n }\n }\n}", @@ -220,7 +220,7 @@ POST /_plugins/_ml/connectors/_create "dimensions": 1024, "normalize": true, "embeddingTypes": [ - "float" + "float" ], "videoFormat": "", "embeddingMode": "" @@ -230,8 +230,8 @@ POST /_plugins/_ml/connectors/_create "action_type": "predict", "method": "POST", "headers": { - "content-type": "application/json", - "x-amz-content-sha256": "required" + "content-type": "application/json", + "x-amz-content-sha256": "required" }, "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"VIDEO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"video\": {\n \"format\": \"${parameters.videoFormat}\",\n \"embeddingMode\": \"${parameters.embeddingMode}\",\n \"source\": {\n \"bytes\": \"${parameters.inputVideo}\"\n }\n }\n }\n}", @@ -253,7 +253,7 @@ POST /_plugins/_ml/connectors/_create "version": 1, "protocol": "aws_sigv4", "credential": { - "roleArn": "" + "roleArn": "" }, "parameters": { "region": "", @@ -263,7 +263,7 @@ POST /_plugins/_ml/connectors/_create "dimensions": 1024, "normalize": true, "embeddingTypes": [ - "float" + "float" ], "videoFormat": "", "embeddingMode": "" @@ -273,8 +273,8 @@ POST /_plugins/_ml/connectors/_create "action_type": "predict", "method": "POST", "headers": { - "content-type": "application/json", - "x-amz-content-sha256": "required" + "content-type": "application/json", + "x-amz-content-sha256": "required" }, "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"VIDEO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"video\": {\n \"format\": \"${parameters.videoFormat}\",\n \"embeddingMode\": \"${parameters.embeddingMode}\",\n \"source\": {\n \"bytes\": \"${parameters.inputVideo}\"\n }\n }\n }\n}", @@ -309,7 +309,7 @@ POST /_plugins/_ml/connectors/_create "dimensions": 1024, "normalize": true, "embeddingTypes": [ - "float" + "float" ], "audioFormat": "" }, @@ -318,8 +318,8 @@ POST /_plugins/_ml/connectors/_create "action_type": "predict", "method": "POST", "headers": { - "content-type": "application/json", - "x-amz-content-sha256": "required" + "content-type": "application/json", + "x-amz-content-sha256": "required" }, "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"AUDIO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"audio\": {\n \"format\": \"${parameters.audioFormat}\",\n\"source\": {\n \"bytes\": \"${parameters.inputAudio}\"\n }\n }\n }\n}", @@ -333,7 +333,7 @@ POST /_plugins/_ml/connectors/_create If using the AWS Opensearch Service, you can provide an IAM role arn that allows access to the bedrock service. Refer to this [AWS doc](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ml-amazon-connector.html) -#### For AOS 2.17, 2.19, and 3.1 +#### For AOS 2.17, 2.19, and 3.1: ```json POST /_plugins/_ml/connectors/_create @@ -343,7 +343,7 @@ POST /_plugins/_ml/connectors/_create "version": 1, "protocol": "aws_sigv4", "credential": { - "roleArn": "" + "roleArn": "" }, "parameters": { "region": "", @@ -353,7 +353,7 @@ POST /_plugins/_ml/connectors/_create "dimensions": 1024, "normalize": true, "embeddingTypes": [ - "float" + "float" ], "audioFormat": "" }, @@ -362,8 +362,8 @@ POST /_plugins/_ml/connectors/_create "action_type": "predict", "method": "POST", "headers": { - "content-type": "application/json", - "x-amz-content-sha256": "required" + "content-type": "application/json", + "x-amz-content-sha256": "required" }, "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"AUDIO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"audio\": {\n \"format\": \"${parameters.audioFormat}\",\n\"source\": {\n \"bytes\": \"${parameters.inputAudio}\"\n }\n }\n }\n}", @@ -374,7 +374,7 @@ POST /_plugins/_ml/connectors/_create } ``` -#### For AOS 3.3+ +#### For AOS 3.3+: ```json POST /_plugins/_ml/connectors/_create @@ -384,7 +384,7 @@ POST /_plugins/_ml/connectors/_create "version": 1, "protocol": "aws_sigv4", "credential": { - "roleArn": "" + "roleArn": "" }, "parameters": { "region": "", @@ -394,7 +394,7 @@ POST /_plugins/_ml/connectors/_create "dimensions": 1024, "normalize": true, "embeddingTypes": [ - "float" + "float" ], "audioFormat": "" }, @@ -403,8 +403,8 @@ POST /_plugins/_ml/connectors/_create "action_type": "predict", "method": "POST", "headers": { - "content-type": "application/json", - "x-amz-content-sha256": "required" + "content-type": "application/json", + "x-amz-content-sha256": "required" }, "url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke", "request_body": "{\n \"taskType\": \"SINGLE_EMBEDDING\",\n \"singleEmbeddingParams\": {\n \"embeddingPurpose\": \"AUDIO_RETRIEVAL\", \"embeddingDimension\": ${parameters.dimensions},\n \"audio\": {\n \"format\": \"${parameters.audioFormat}\",\n\"source\": {\n \"bytes\": \"${parameters.inputAudio}\"\n }\n }\n }\n}", diff --git a/docs/remote_inference_blueprints/standard_blueprints/README.md b/docs/remote_inference_blueprints/standard_blueprints/README.md index d8a91af00a..de255061eb 100644 --- a/docs/remote_inference_blueprints/standard_blueprints/README.md +++ b/docs/remote_inference_blueprints/standard_blueprints/README.md @@ -37,6 +37,7 @@ These blueprints include pre- and post-processing functions, suitable when you n - Bedrock: - [amazon.titan-embed-text-v1](https://github.com/opensearch-project/ml-commons/blob/main/docs/remote_inference_blueprints/bedrock_connector_titan_embedding_blueprint.md) - [amazon.titan-embed-image-v1](https://github.com/opensearch-project/ml-commons/blob/main/docs/remote_inference_blueprints/bedrock_connector_titan_multimodal_embedding_blueprint.md) + - [amazon.nova-2-multimodal-embeddings-v1:0](https://github.com/opensearch-project/ml-commons/blob/main/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md) - [cohere.embed-english-v3](https://github.com/opensearch-project/ml-commons/blob/main/docs/remote_inference_blueprints/bedrock_connector_cohere_cohere.embed-english-v3_blueprint.md) - [cohere.embed-multilingual-v3](https://github.com/opensearch-project/ml-commons/blob/main/docs/remote_inference_blueprints/bedrock_connector_cohere_cohere.embed-multilingual-v3_blueprint.md) - Cohere From fcfdec0e1956adead663a05b76aa3007e26e018b Mon Sep 17 00:00:00 2001 From: Nathalie Jonathan Date: Wed, 19 Nov 2025 17:40:40 -0800 Subject: [PATCH 4/4] Remove unnecessary step Signed-off-by: Nathalie Jonathan --- ...nnector_nova_multimodal_model_blueprint.md | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md b/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md index 796da1d34c..09bd124d2d 100644 --- a/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md +++ b/docs/remote_inference_blueprints/bedrock_connector_nova_multimodal_model_blueprint.md @@ -1,21 +1,6 @@ # Bedrock connector blueprint example for Nova MultiModal Model -## 1. Add connector endpoint to trusted URLs: - -Note: no need to do this after 2.11.0 - -```json -PUT /_cluster/settings -{ - "persistent": { - "plugins.ml_commons.trusted_connector_endpoints_regex": [ - "^https://bedrock-runtime\\..*[a-z0-9-]\\.amazonaws\\.com/.*$" - ] - } -} -``` - -## 2. Create connector for Amazon Bedrock: +## 1. Create connector for Amazon Bedrock: Note: Different modality types require separate connectors. Create one connector for each modality you plan to use: text embedding, image embedding, video embedding, or audio embedding. @@ -415,7 +400,7 @@ POST /_plugins/_ml/connectors/_create } ``` -## 3. Register remote model: +## 2. Register remote model: Register a separate model for each connector created in step 2. Use the corresponding connector_id for each modality: @@ -429,7 +414,7 @@ POST /_plugins/_ml/models/_register } ``` -## 4. Test model inference: +## 3. Test model inference: ### Text Embedding