improved registration flow

This commit is contained in:
Dinesh Yeduguru 2024-11-08 11:07:41 -08:00
parent 39f0c5f544
commit 0eaca98229
10 changed files with 95 additions and 26 deletions

View file

@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
BEDROCK_SUPPORTED_SHIELDS = [
ShieldType.generic_content_shield.value,
ShieldType.generic_content_shield,
]
@ -53,6 +53,9 @@ class BedrockSafetyAdapter(Safety, ShieldsProtocolPrivate):
f"Shield {shield.identifier} with version {shield.params['guardrailVersion']} not found in Bedrock"
)
async def supported_shield_types(self) -> List[ShieldType]:
return BEDROCK_SUPPORTED_SHIELDS
async def run_shield(
self, shield_id: str, messages: List[Message], params: Dict[str, Any] = None
) -> RunShieldResponse: