Skip to content

Commit

Permalink
Small fix in blueprint docs (opensearch-project#2501)
Browse files Browse the repository at this point in the history
* fix region

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* small fix

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
  • Loading branch information
zhichao-aws authored Jun 5, 2024
1 parent 9b072c4 commit 865a424
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ POST /_plugins/_ml/connectors/_create
"headers": {
"content-type": "application/json"
},
"url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-v2/invoke",
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/anthropic.claude-v2/invoke",
"request_body": "{\"prompt\":\"\\n\\nHuman: ${parameters.inputs}\\n\\nAssistant:\",\"max_tokens_to_sample\":300,\"temperature\":0.5,\"top_k\":250,\"top_p\":1,\"stop_sequences\":[\"\\\\n\\\\nHuman:\"]}"
}
]
Expand Down Expand Up @@ -73,7 +73,7 @@ POST /_plugins/_ml/connectors/_create
"headers": {
"content-type": "application/json"
},
"url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-v2/invoke",
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/anthropic.claude-v2/invoke",
"request_body": "{\"prompt\":\"\\n\\nHuman: ${parameters.inputs}\\n\\nAssistant:\",\"max_tokens_to_sample\":300,\"temperature\":0.5,\"top_k\":250,\"top_p\":1,\"stop_sequences\":[\"\\\\n\\\\nHuman:\"]}"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ POST /_plugins/_ml/connectors/_create
{
"action_type": "predict",
"method": "POST",
"url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-embed-text-v1/invoke",
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/amazon.titan-embed-text-v1/invoke",
"headers": {
"content-type": "application/json",
"x-amz-content-sha256": "required"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ POST /_plugins/_ml/connectors/_create
{
"action_type": "predict",
"method": "POST",
"url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-embed-image-v1/invoke",
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/amazon.titan-embed-image-v1/invoke",
"headers": {
"content-type": "application/json",
"x-amz-content-sha256": "required"
Expand Down Expand Up @@ -75,7 +75,7 @@ POST /_plugins/_ml/connectors/_create
{
"action_type": "predict",
"method": "POST",
"url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-embed-image-v1/invoke",
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/amazon.titan-embed-image-v1/invoke",
"headers": {
"content-type": "application/json",
"x-amz-content-sha256": "required"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ POST /_plugins/_ml/connectors/_create
POST /_plugins/_ml/models/<ENTER MODEL ID HERE>/_predict
{
"parameters": {
"prompt": ["Say this is a test"]
"prompt": "Say this is a test"
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ POST /_plugins/_ml/connectors/_create
"url": "<PLEASE ADD YOUR Sagemaker MODEL INFERENCE ENDPOINT URL>",
"request_body": "${parameters.input}",
"pre_process_function": "connector.pre_process.default.embedding",
"post_process_function": "connector.post_process.default.embedding"
"post_process_function": "connector.post_process.default.embedding" \\ remove this parameter for sparse_encoding SageMaker endpoint
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ POST /_plugins/_ml/connectors/_create
{
"action_type": "predict",
"method": "POST",
"url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-instant-v1/invoke",
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/anthropic.claude-instant-v1/invoke",
"headers": {
"content-type": "application/json",
"x-amz-content-sha256": "required"
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/agent_framework/build_your_own_chatbot.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ POST /_plugins/_ml/connectors/_create
{
"action_type": "predict",
"method": "POST",
"url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-instant-v1/invoke",
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/anthropic.claude-instant-v1/invoke",
"headers": {
"content-type": "application/json",
"x-amz-content-sha256": "required"
Expand Down

0 comments on commit 865a424

Please sign in to comment.