add missing license part

This commit is contained in:
Kate Plawiak 2024-07-22 22:03:05 -07:00
parent 16fe0e4594
commit ab8a220faa

View file

@ -1,3 +1,4 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved. # All rights reserved.
# #
# This source code is licensed under the terms described in the LICENSE file in # This source code is licensed under the terms described in the LICENSE file in
@ -217,7 +218,7 @@ class LlamaGuardShield(ShieldBase):
raise ValueError(f"Unexpected response: {response}") raise ValueError(f"Unexpected response: {response}")
async def run(self, messages: List[Message]) -> ShieldResponse: async def run(self, messages: List[Message]) -> ShieldResponse:
if self.disable_input_check and messages[-1].role == Role.user.value: if self.disable_input_check and messages[-1].role == Role.user.value:
return ShieldResponse( return ShieldResponse(
shield_type=BuiltinShield.llama_guard, is_violation=False shield_type=BuiltinShield.llama_guard, is_violation=False
) )