From 0b6a852d1465b13d5df2683507ff1dbe6d0476db Mon Sep 17 00:00:00 2001 From: Luca Beurer-Kellner Date: Mon, 31 Mar 2025 17:50:25 +0200 Subject: [PATCH] use in-file guardrails in client.py --- client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.py b/client.py index e4771b6..759337d 100644 --- a/client.py +++ b/client.py @@ -12,7 +12,7 @@ raise "Rule 1: Do not talk about Fight Club" if: openai_client = OpenAI( default_headers={ "Invariant-Authorization": "Bearer " + os.getenv("INVARIANT_API_KEY"), - "Invariant-Guardrails": open("guardrails.py").read().encode("unicode_escape"), + "Invariant-Guardrails": guardrails, }, base_url="http://localhost:8000/api/v1/gateway/non-streaming/openai", )