mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-05 20:27:35 +00:00
Update the meta reference safety implementation to match new API
This commit is contained in:
parent
93e4ef3829
commit
51245a417b
11 changed files with 115 additions and 130 deletions
|
@ -37,11 +37,8 @@ class RunShieldResponse(BaseModel):
|
|||
violation: Optional[SafetyViolation] = None
|
||||
|
||||
|
||||
ShieldType = str
|
||||
|
||||
|
||||
class Safety(Protocol):
|
||||
@webmethod(route="/safety/run_shield")
|
||||
async def run_shield(
|
||||
self, shield: ShieldType, messages: List[Message], params: Dict[str, Any] = None
|
||||
self, shield: str, messages: List[Message], params: Dict[str, Any] = None
|
||||
) -> RunShieldResponse: ...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue