mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix ModelArmorGuardrail
This commit is contained in:
parent
d5f48c7e23
commit
0e23f89eb7
1 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue