Skip to content

Commit cccf5f0

Browse files
committed
remove add trusted endpoint
Signed-off-by: Mingshi Liu <[email protected]>
1 parent e0ef6e7 commit cccf5f0

7 files changed

+60
-6
lines changed

docs/remote_inference_blueprints/standard_blueprints/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ These blueprints use the ML inference processor to handle input/output mapping,
2020
- Cohere
2121
- text embedding: [embed-english-v3.0 & embed-english-v2.0](https://github.com/opensearch-project/ml-commons/blob/main/docs/remote_inference_blueprints/standard_blueprints/cohere_connector_text_embedding_standard_blueprint.md)
2222
- image embedding: [embed-multimodal-v3.0 & embed-multimodal-v2.0](https://github.com/opensearch-project/ml-commons/blob/main/docs/remote_inference_blueprints/standard_blueprints/cohere_connector_image_embedding_blueprint.md)
23-
-
2423
- OpenAI:
2524
- [text-embedding-ada-002](https://github.com/opensearch-project/ml-commons/blob/main/docs/remote_inference_blueprints/standard_blueprints/openai_connector_embedding_standard_blueprint.md)
2625

docs/remote_inference_blueprints/standard_blueprints/bedrock_connector_cohere_cohere.embed-english-v3_standard_blueprint.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ PUT /_cluster/settings
1818
}
1919
```
2020

21+
Sample response:
22+
```json
23+
{
24+
"acknowledged": true,
25+
"persistent": {
26+
"plugins": {
27+
"ml_commons": {
28+
"trusted_connector_endpoints_regex": [
29+
"^https://bedrock-runtime\\..*[a-z0-9-]\\.amazonaws\\.com/.*$"
30+
]
31+
}
32+
}
33+
},
34+
"transient": {}
35+
}
36+
```
2137
## 2. Create connector for Amazon Bedrock:
2238

2339
If you are using self-managed Opensearch, you should supply AWS credentials:
@@ -144,7 +160,7 @@ Sample response:
144160
POST /_plugins/_ml/models/lyjxwZABNrAVdFa9zrcZ/_predict
145161
{
146162
"parameters": {
147-
"texts" : ["Hello world", "This is a test"]
163+
"texts" : ["上海", "This is a test"]
148164
}
149165
}
150166
```

docs/remote_inference_blueprints/standard_blueprints/bedrock_connector_cohere_cohere.embed-multilingual-v3_standard_blueprint.md

+16
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ PUT /_cluster/settings
1818
}
1919
```
2020

21+
Sample response:
22+
```json
23+
{
24+
"acknowledged": true,
25+
"persistent": {
26+
"plugins": {
27+
"ml_commons": {
28+
"trusted_connector_endpoints_regex": [
29+
"^https://bedrock-runtime\\..*[a-z0-9-]\\.amazonaws\\.com/.*$"
30+
]
31+
}
32+
}
33+
},
34+
"transient": {}
35+
}
36+
```
2137

2238
## 2. Create connector for Amazon Bedrock:
2339

docs/remote_inference_blueprints/standard_blueprints/bedrock_connector_titan_embedding_standard_blueprint.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ Sample response:
126126

127127
Follow Titan text embedding model v1, just change "model" to `amazon.titan-embed-text-v2:0` and configure extra parameters and request body as:
128128

129-
130-
```
129+
```json
131130
POST /_plugins/_ml/connectors/_create
132131
{
133132
"name": "Amazon Bedrock Connector: embedding",
@@ -154,9 +153,10 @@ POST /_plugins/_ml/connectors/_create
154153
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke",
155154
"headers": {
156155
"content-type": "application/json",
157-
"x-amz-content-sha256": "required" "request_body": "{ \"inputText\": \"${parameters.inputText}\", \"dimensions\": ${parameters.dimensions}, \"normalize\": ${parameters.normalize}, \"embeddingTypes\": ${parameters.embeddingTypes} }"
158-
156+
"x-amz-content-sha256": "required"
159157
},
158+
"request_body": "{ \"inputText\": \"${parameters.inputText}\", \"dimensions\": ${parameters.dimensions}, \"normalize\": ${parameters.normalize}, \"embeddingTypes\": ${parameters.embeddingTypes} }"
159+
}
160160
}
161161
]
162162
}

docs/remote_inference_blueprints/standard_blueprints/cohere_connector_image_embedding_standard_blueprint.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ See [Cohere's /embed API docs](https://docs.cohere.com/reference/embed) for more
1111

1212
## 1. Add connector endpoint to trusted URLs:
1313

14+
Note: no need to do this after 2.11.0
15+
1416
```json
1517
PUT /_cluster/settings
1618
{

docs/remote_inference_blueprints/standard_blueprints/cohere_connector_text_embedding_standard_blueprint.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ See [Cohere's /embed API docs](https://docs.cohere.com/reference/embed) for more
1111

1212
## 1. Add connector endpoint to trusted URLs:
1313

14+
Note: no need to do this after 2.11.0
15+
1416
```json
1517
PUT /_cluster/settings
1618
{

docs/remote_inference_blueprints/standard_blueprints/openai_connector_embedding_standard_blueprint.md

+19
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Note that if using a model that requires pre and post processing functions, you
66

77
## 1. Add connector endpoint to trusted URLs:
88

9+
Note: no need to do this after 2.11.0
10+
911
```json
1012
PUT /_cluster/settings
1113
{
@@ -17,6 +19,23 @@ PUT /_cluster/settings
1719
}
1820
```
1921

22+
Sample response:
23+
```json
24+
{
25+
"acknowledged": true,
26+
"persistent": {
27+
"plugins": {
28+
"ml_commons": {
29+
"trusted_connector_endpoints_regex": [
30+
"^https://api\\.openai\\.com/.*$"
31+
]
32+
}
33+
}
34+
},
35+
"transient": {}
36+
}
37+
```
38+
2039
## 2. Create connector for OpenAI embedding model:
2140

2241
Refer to OpenAI [official doc](https://platform.openai.com/docs/guides/embeddings).

0 commit comments

Comments
 (0)