Fix: DynamoDB Typeerror with AWS Bedrock
When using AWS Bedrock, _update_item throws a TypeError as AWS Bedrock returns floats in its response. Dynamodb requires floats to be provided as Decimal. The reverse can also occur if you call get_thread from anywhere in code, as Decimal is not JSON serializable.
The issue can be seen here #1116
I have added two new functions within DynamoDBDataLater that converts floats to decimals and decimals to floats, calling each function from _update_item and get_thread respectively. This change resolves the TypeErrors.
Diffs LGTM. Next step is to get it past pipeline and for @willydouhard / @tpatel / team to test and approve.
Anything you need from me to progress this @mayaankvad ?
No, I think the changes look good. Now it needs @willydouhard / teams approval
Seems like mypy is failing @munday-tech
Are you able to make this fix @munday-tech?
Will get it done asap
@willydouhard @mayaankvad should be good now.
Any updates on this one? Looking forward to this being merged
Looks ok to me.
I am waiting for this one to be merged
Also waiting on this to be merged - would someone be able to add the required changes so it can be done soon please?
any news about this?
Also needing this to be merged.