From 83ced7aa37055733572210fe96f8f996c1ec9557 Mon Sep 17 00:00:00 2001 From: Luca Beurer-Kellner Date: Thu, 3 Apr 2025 08:38:07 +0200 Subject: [PATCH] include guardrailing action --- gateway/integrations/explorer.py | 1 - client.py => tests/test-client.py | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) rename client.py => tests/test-client.py (89%) diff --git a/gateway/integrations/explorer.py b/gateway/integrations/explorer.py index eeed533..3ba9f86 100644 --- a/gateway/integrations/explorer.py +++ b/gateway/integrations/explorer.py @@ -50,7 +50,6 @@ def create_annotations_from_guardrails_errors( address=r, extra_metadata={ "source": "guardrails-error", - "guardrail-action": action, # if included in error, also include the source of the guardrail **( {"guardrail_content": error.get("guardrail_content")} diff --git a/client.py b/tests/test-client.py similarity index 89% rename from client.py rename to tests/test-client.py index cb7bec7..388e453 100644 --- a/client.py +++ b/tests/test-client.py @@ -1,3 +1,7 @@ +""" +Simple (non-streaming) test client for the Gateway (uses OpenAI integration). +""" + from openai import OpenAI from httpx import Client import os