Commit Graph

18 Commits

Author SHA1 Message Date
Luca Beurer-Kellner c01ef08f83 improved unauthorized handling 2025-04-03 11:24:30 +02:00
Luca Beurer-Kellner 278b3a8bf4 allow different guardrailing api key 2025-04-03 10:08:03 +02:00
Luca Beurer-Kellner 9c0f1d8ea7 minor refactor for getting invariant api keys for guardrailing 2025-04-03 09:53:38 +02:00
Luca Beurer-Kellner e17b53b927 Extract guardrails from header if provided (#33)
* guardrails from header

* use in-file guardrails in client.py

* support case without request

* remove client script

* tests: guardrailing rule passed in header

* include checked guardrails in annotation extra metadata

* include guardrailing action

* update guardrail metadata
2025-04-03 08:56:15 +02:00
Hemang 760b739894 Correct user API GET call to fetch policies. 2025-04-03 00:02:19 +02:00
Hemang 55f0f741c0 Add tests for guardrails integration with explorer. 2025-04-02 13:40:52 +02:00
Hemang 9aef873a74 Correct header name before calling explorer to fetch guardrails. 2025-04-02 13:40:52 +02:00
Hemang 750c83d3f8 Add calls to execute logging guardrails before pushing to explorer. 2025-04-02 13:40:52 +02:00
Hemang 050ec1ba58 Fetch guardrails from explorer. These have higher precedence than than the guardrails from file. 2025-04-02 13:40:52 +02:00
Luca Beurer-Kellner 7c0bb957fb Pipelined Guardrails (#32)
* initial draft: pipelined guardrails

* documentation on stream instrumentation

* more comments

* fix: return earlier

* non-streaming case

* handle non-streaming case

* fix more cases

* simplify request instrumentation

* improve comments

* fix import issues

* extend tests for input guardrailing

* anthropic integration of pipelined and pre-guardrailing

* fix gemini streamed refusal
2025-03-31 14:13:58 +02:00
Hemang e55df73487 Add guardrails for gemini integration. 2025-03-27 12:26:17 +01:00
Hemang 8191c83c12 Revert "Add debug logs for metadata push."
This reverts commit f247682fa3.
2025-03-26 19:57:00 +01:00
Hemang f247682fa3 Add debug logs for metadata push. 2025-03-26 15:20:26 +01:00
Hemang a4ee5f0c47 Add metadata before pushing to Explorer. 2025-03-20 10:59:27 +01:00
Hemang 44988c3535 Add a preload guardrails API call. 2025-03-19 09:39:23 +01:00
Hemang a5ea86a64e Show logs if the docker container doesn't start on doing up(). Tested when the guardrails file contained unparseable policy. 2025-03-17 07:45:45 +01:00
Hemang e773cc9f2d Add Guardrails verification logic for openai route. 2025-03-17 07:45:45 +01:00
Hemang 38504b3e45 Rename utils.explorer to integrations.explorer. The integrations module will contain API calls. 2025-03-10 15:18:13 +01:00