From 6e4ab335bfaa0b94ad3a5851b8d7def7aca30006 Mon Sep 17 00:00:00 2001 From: Joel Balcaen Date: Wed, 1 May 2024 10:41:07 -0300 Subject: [PATCH] don't redact text --- lambdas/bedrock_invoker/src/index.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lambdas/bedrock_invoker/src/index.py b/lambdas/bedrock_invoker/src/index.py index 4eec8e7..ff5180e 100644 --- a/lambdas/bedrock_invoker/src/index.py +++ b/lambdas/bedrock_invoker/src/index.py @@ -50,14 +50,6 @@ def lambda_handler(event, context): ] } - # Replace all the text values in messages with "redacted" since we don't want to log sensitive data - redacted_claude_body = claude_body.copy() - - for message in redacted_claude_body["messages"]: - for content in message["content"]: - if 'text' in content: - content['text'] = "redacted" - print(f"Invoke bedrock with this body: ", claude_body) bedrock_model = 'anthropic.claude-3-sonnet-20240229-v1:0' print(f"Invoke bedock with this model: ", bedrock_model)