fix ModelArmorGuardrail

This commit is contained in:
Ishaan Jaffer 2025-10-27 17:47:19 -07:00
parent d5f48c7e23
commit 0e23f89eb7

View file

@ -56,6 +56,14 @@ class ModelArmorGuardrail(CustomGuardrail, VertexBase):
api_endpoint: Optional[str] = None,
**kwargs,
):
# Set supported event hooks if not already provided
if "event_hook" not in kwargs:
kwargs["event_hook"] = [
GuardrailEventHooks.pre_call,
GuardrailEventHooks.during_call,
GuardrailEventHooks.post_call,
]
# Initialize parent classes first
super().__init__(**kwargs)
VertexBase.__init__(self)