From a7a79b31c2cdb325808e02385c815c5767ba92eb Mon Sep 17 00:00:00 2001 From: knielsen404 Date: Wed, 16 Jul 2025 16:59:44 +0200 Subject: [PATCH] remove timestamp --- gateway/integrations/guardrails.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gateway/integrations/guardrails.py b/gateway/integrations/guardrails.py index 0a6dbca..00336e8 100644 --- a/gateway/integrations/guardrails.py +++ b/gateway/integrations/guardrails.py @@ -147,14 +147,11 @@ async def check_guardrails( async with httpx.AsyncClient() as client: url = os.getenv("GUARDRAILS_API_URL", DEFAULT_API_URL).rstrip("/") - # Note: This is probably not how we should implement this. For demonstration purposes only. - new_message = messages[-1].copy() - new_message["timestamp"] = datetime.now().isoformat() try: result = await client.post( f"{url}/api/v1/policy/check/batch", json={ - "messages": messages[:-1] + [new_message], + "messages": messages, "policies": [g.content for g in guardrails], "parameters": context.guardrails_parameters or {}, "dataset_name": context.dataset_name,