Skip to content

Commit

Permalink
add demo notebook for creating connector
Browse files Browse the repository at this point in the history
Signed-off-by: Yaliang Wu <[email protected]>
  • Loading branch information
ylwu-amzn committed Mar 12, 2024
1 parent 2e0946a commit fbd771a
Show file tree
Hide file tree
Showing 7 changed files with 1,081 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ POST /_plugins/_ml/connectors/_create
"content-type": "application/json"
},
"url": "<PLEASE ADD YOUR Sagemaker MODEL INFERENCE ENDPOINT URL>",
"request_body": "${parameters.inputs}",
"request_body": "${parameters.input}",
"pre_process_function": "connector.pre_process.default.embedding",
"post_process_function": "connector.post_process.default.embedding"
}
Expand Down
1,069 changes: 1,069 additions & 0 deletions docs/tutorials/aws/AIConnectorHelper.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

> The easiest way for setting up embedding model on your Amazon OpenSearch cluster is using [AWS CloudFormation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cfn-template.html)
> Another easy way is using python, check [AIConnectorHelper](./AIConnectorHelper.ipynb)
> This tutorial explains detail steps if you want to configure everything manually.
> Bedrock has [quota limit](https://docs.aws.amazon.com/bedrock/latest/userguide/quotas.html). You can purchase [Provisioned Throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html) to increase quota limit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

> The easiest way for setting up embedding model on your Amazon OpenSearch cluster is using [AWS CloudFormation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cfn-template.html)
> Another easy way is using python, check [AIConnectorHelper](./AIConnectorHelper.ipynb)
> This tutorial explains detail steps if you want to configure everything manually.
> Bedrock has [quota limit](https://docs.aws.amazon.com/bedrock/latest/userguide/quotas.html). You can purchase [Provisioned Throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html) to increase quota limit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

> The easiest way for setting up embedding model on your Amazon OpenSearch cluster is using [AWS CloudFormation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cfn-template.html)
> Another easy way is using python, check [AIConnectorHelper](./AIConnectorHelper.ipynb)
> This tutorial explains detail steps if you want to configure everything manually. You can also connect to other service with similar way.
This doc introduces how to build semantic search in Amazon managed OpenSearch with [Cohere embedding model](https://docs.cohere.com/reference/embed).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Topic

> An easy way is using python, check [AIConnectorHelper](./AIConnectorHelper.ipynb)
This doc introduces how to build semantic search in Amazon managed OpenSearch with [OpenAI embedding model](https://platform.openai.com/docs/guides/embeddings).
If you are not using Amazon OpenSearch, you can refer to [openai_connector_embedding_blueprint](https://github.com/opensearch-project/ml-commons/blob/2.x/docs/remote_inference_blueprints/openai_connector_embedding_blueprint.md) and [OpenSearch semantic search](https://opensearch.org/docs/latest/search-plugins/semantic-search/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

> The easiest way for setting up embedding model on your Amazon OpenSearch cluster is using [AWS CloudFormation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cfn-template.html)
> Another easy way is using python, check [AIConnectorHelper](./AIConnectorHelper.ipynb)
> This tutorial explains detail steps if you want to configure everything manually.
This doc introduces how to build semantic search in Amazon managed OpenSearch with embedding model running on [Sagemaker](https://aws.amazon.com/sagemaker/).
Expand Down Expand Up @@ -272,7 +274,7 @@ Sample output
POST /_plugins/_ml/models/NxU9Qo0BTaDH9c7t1Bca/_predict
{
"parameters": {
"inputs": ["hello world", "how are you"]
"input": ["hello world", "how are you"]
}
}
```
Expand Down

0 comments on commit fbd771a

Please sign in to comment.