Skip to content

Commit f07c8b6

Browse files
committed
replace lending corrupted lending document and make HITL parameters generic for all patterns
1 parent c544e1a commit f07c8b6

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

patterns/pattern-2/template.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,19 @@ Parameters:
8181
Default: ""
8282
Description: "If you provided a Bedrock Guardrail Id above, provide the corresponding Guardrail version here"
8383

84+
EnableHITL:
85+
Type: String
86+
Default: "false"
87+
AllowedValues:
88+
- "true"
89+
- "false"
90+
Description: "Enable Human In The Loop (A2I) for document review"
91+
92+
SageMakerA2IReviewPortalURL:
93+
Type: String
94+
Default: ""
95+
Description: "SageMaker A2I Review Portal URL for HITL workflows"
96+
8497
ConfigurationDefaultS3Uri:
8598
Type: String
8699
Description: "S3 URI (s3://bucket/path/config.json) to import default configuration from S3"
@@ -105,6 +118,7 @@ Conditions:
105118
HasCustomClassificationModelARN : !Not [!Equals [!Ref CustomClassificationModelARN , ""]]
106119
HasCustomExtractionModelARN : !Not [!Equals [!Ref CustomExtractionModelARN , ""]]
107120
HasPermissionsBoundary: !Not [!Equals [!Ref PermissionsBoundaryArn, ""]]
121+
IsHITLEnabled: !Equals [!Ref EnableHITL, "true"]
108122

109123

110124
Resources:

patterns/pattern-3/template.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,23 @@ Parameters:
9595
AllowedPattern: "^(|arn:aws:iam::[0-9]{12}:policy/.+)$"
9696
ConstraintDescription: Must be empty or a valid IAM policy ARN
9797

98+
EnableHITL:
99+
Type: String
100+
Default: "false"
101+
AllowedValues:
102+
- "true"
103+
- "false"
104+
Description: "Enable Human In The Loop (A2I) for document review"
105+
106+
SageMakerA2IReviewPortalURL:
107+
Type: String
108+
Default: ""
109+
Description: "SageMaker A2I Review Portal URL for HITL workflows"
110+
98111
Conditions:
99112
HasGuardrailConfig: !And [!Not [!Equals [!Ref BedrockGuardrailId, ""]], !Not [!Equals [!Ref BedrockGuardrailVersion, ""]]]
100113
HasPermissionsBoundary: !Not [!Equals [!Ref PermissionsBoundaryArn, ""]]
114+
IsHITLEnabled: !Equals [!Ref EnableHITL, "true"]
101115

102116
Resources:
103117

samples/lending_package.pdf

-98.9 KB
Binary file not shown.

template.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,11 @@ Resources:
926926
- "s3://${ConfigurationBucket}/config_library/pattern-3/${ConfigPath}/config.yaml"
927927
- ConfigPath: !FindInMap [Pattern3ConfigurationMap, !Ref Pattern3Configuration, ConfigPath]
928928
ConfigLibraryHash: "<CONFIG_LIBRARY_HASH_TOKEN>"
929+
EnableHITL: !Ref EnableHITL
930+
SageMakerA2IReviewPortalURL: !If
931+
- IsHITLEnabled
932+
- !GetAtt WorkforceURLResource.PortalURL
933+
- ""
929934
PermissionsBoundaryArn: !Ref PermissionsBoundaryArn
930935

931936
##########################################################################

0 commit comments

Comments
 (0)