-
Notifications
You must be signed in to change notification settings - Fork 131
Add new workflow #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new workflow #384
Conversation
## Requirements | ||
|
||
- Create an AWS account if you do not already have one and log in. The IAM user that you use must have sufficient permissions to make necessary AWS service calls and manage AWS resources. | ||
- AWS CLI installed and configured |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- AWS CLI installed and configured
DefaultQueue: | ||
Type: AWS::SQS::Queue | ||
Properties: | ||
MessageRetentionPeriod: 345600 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest reducing this to a day or less. Or call it out in the README
Update information texts Co-authored-by: Ben <9841563+bfreiberg@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, some more minor comments. As a side note, it would be good to move the state machine definition to JSONata (can be done after publishing)
@@ -0,0 +1,92 @@ | |||
# Message categorizing with Amazon Bedrock and Amazon SQS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Message categorizing with Amazon Bedrock and Amazon SQS | |
# Message categorization with Amazon Bedrock and Amazon SQS |
@@ -0,0 +1,92 @@ | |||
# Message categorizing with Amazon Bedrock and Amazon SQS | |||
|
|||
This workflow demonstrates how you can use Amazon Bedrock to categorize messages and then send them to an Amazon SQS queue for further processing. The AWS Serverless Application Model (SAM) template deploys the AWS Step Functions state machine which defines the workflow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow demonstrates how you can use Amazon Bedrock to categorize messages and then send them to an Amazon SQS queue for further processing. The AWS Serverless Application Model (SAM) template deploys the AWS Step Functions state machine which defines the workflow. | |
This workflow demonstrates how you can use Amazon Bedrock to categorize messages and then send them to an Amazon SQS queue for further processing. The AWS Serverless Application Model (SAM) template deploys an AWS Step Functions state machine which defines the workflow. |
- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) installed and configured | ||
- [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) | ||
- [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed | ||
- NOTE! This example uses Amazon Bedrock foundation model anthropic.claude-3-haiku-20240307-v1:0. To change the model used in the example, you will need to adjust the BedrockAccess policy attached to the Step Functions. Also note that different models take inputs in different formats. To use another model, you will also need to adjust the input parameters sent to the model in the State Machine invokeModel step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- NOTE! This example uses Amazon Bedrock foundation model anthropic.claude-3-haiku-20240307-v1:0. To change the model used in the example, you will need to adjust the BedrockAccess policy attached to the Step Functions. Also note that different models take inputs in different formats. To use another model, you will also need to adjust the input parameters sent to the model in the State Machine invokeModel step. | |
- NOTE! This example uses Amazon Bedrock foundation model anthropic.claude-3-haiku-20240307-v1:0. To change the model used in the example, you will need to adjust the BedrockAccess policy attached to the Step Functions state machine. Also note that different models take inputs in different formats. To use another model, you will also need to adjust the input parameters sent to the model in the `invokeModel` step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Step Functions is the service, state machine the resource
} | ||
``` | ||
|
||
after the execution you will see the same message in your Billing SQS Queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after the execution you will see the same message in your Billing SQS Queue. | |
after the execution you will see the same message in your Billing SQS queue. |
}, | ||
{ | ||
"type": "text", | ||
"text": "You are a text categorizing program. Given the a list of categories [\"COMPLAINT\",\"BILLING\"], categorize the text into one of these classes (\"Category\"). Give the answer with exactly one class and no additional text. If you cannot categorize the text, please use [\"UNKNOWN\"] category. Do not try to make up a category." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"text": "You are a text categorizing program. Given the a list of categories [\"COMPLAINT\",\"BILLING\"], categorize the text into one of these classes (\"Category\"). Give the answer with exactly one class and no additional text. If you cannot categorize the text, please use [\"UNKNOWN\"] category. Do not try to make up a category." | |
"text": "You are a text categorizing program. Given the list of categories [\"COMPLAINT\",\"BILLING\"], categorize the text into one of these classes (\"Category\"). Give the answer with exactly one class and no additional text. If you cannot categorize the text, please use [\"UNKNOWN\"] category. Do not try to make up a category." |
Looks good, thanks for your contribution. Your workflow will be merged soon |
Issue #, if available:
Description of changes:
Message categorizing no-code example with AWS Step Functions, Amazon Bedrock and Amazon Simple Queue Service
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.