I am trying to trigger a human workflow through a piece of python code. This is to include Human Review for Textract.
The code snippet is as below:
sentiment = "Neutral"
blurb = "The sentiment of this document is neutral"
response = client.start_human_loop(
HumanLoopName='',#Loop name and FlowDefinitionArn are used, have been omitted in the question
FlowDefinitionArn='',
HumanLoopInput={
'InputContent': {
"initialValue": sentiment,
"taskObject": blurb
}
},
DataAttributes={
'ContentClassifiers': [
'FreeOfAdultContent',
]
}
When I run this, an exception occurs : botocore.exceptions.ParamValidationError: Parameter validation failed: Invalid type for parameter HumanLoopInput
Can anyone help me with an example of HumanLoopInput? Its configuration is already done in the analyze_document() function (HumanLoopConfig). Is there any other way to avoid this exception?
InputContent should be string try: