From 17b97cd9303d7a75117e16fce96b9231d785fe31 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 30 Nov 2024 00:36:47 -0800 Subject: [PATCH] fix(bedrock_guardrails.py): pass in prepped data --- .../proxy/guardrails/guardrail_hooks/bedrock_guardrails.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py b/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py index 1127e4e7c..ef41ce9b1 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py +++ b/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py @@ -214,10 +214,10 @@ class BedrockGuardrail(CustomGuardrail, BaseAWSLLM): prepared_request.url, prepared_request.headers, ) - _json_data = json.dumps(request_data) # type: ignore + response = await self.async_handler.post( url=prepared_request.url, - json=request_data, # type: ignore + data=prepared_request.body, # type: ignore headers=prepared_request.headers, # type: ignore ) verbose_proxy_logger.debug("Bedrock AI response: %s", response.text)