mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 15:52:39 +00:00
shield_type->identifier
This commit is contained in:
parent
67bfd946dc
commit
ea9f5368cb
3 changed files with 6 additions and 6 deletions
|
|
@ -57,13 +57,13 @@ class MetaReferenceSafetyImpl(Safety, ShieldsProtocolPrivate):
|
|||
|
||||
async def run_shield(
|
||||
self,
|
||||
shield_type: str,
|
||||
identifier: str,
|
||||
messages: List[Message],
|
||||
params: Dict[str, Any] = None,
|
||||
) -> RunShieldResponse:
|
||||
shield_def = await self.shield_store.get_shield(shield_type)
|
||||
shield_def = await self.shield_store.get_shield(identifier)
|
||||
if not shield_def:
|
||||
raise ValueError(f"Unknown shield {shield_type}")
|
||||
raise ValueError(f"Unknown shield {identifier}")
|
||||
|
||||
shield = self.get_shield_impl(shield_def)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue