Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Last active May 2, 2025 18:12
Show Gist options
  • Select an option

  • Save KyMidd/6db7faeefc95f138d739f1d89899fc7a to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/6db7faeefc95f138d739f1d89899fc7a to your computer and use it in GitHub Desktop.
# 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