-
-
Save KyMidd/6db7faeefc95f138d739f1d89899fc7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check for blocked message | |
| if "input has been blocked by Veradigm's content filter" in response: | |
| if os.environ.get("VERA_DEBUG", "False") == "True": | |
| print("🚀 Full event payload:", full_event_payload) | |
| for event in full_event_payload: | |
| if "metadata" in event and "trace" in event["metadata"]: | |
| trace = event["metadata"]["trace"] | |
| guardrail = trace.get("guardrail", {}) | |
| input_assessment = guardrail.get("inputAssessment", {}) | |
| if guardrailIdentifier in input_assessment: | |
| assessment = input_assessment[guardrailIdentifier] | |
| filters = assessment.get("contentPolicy", {}).get("filters", []) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment