mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-06 12:37:33 +00:00
Update safety implementation inside agents
This commit is contained in:
parent
82ddd851c8
commit
d6a41d98d2
8 changed files with 17 additions and 67 deletions
|
@ -5,7 +5,6 @@
|
|||
# the root directory of this source tree.
|
||||
|
||||
from typing import AsyncIterator, List, Optional, Union
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
import pytest
|
||||
|
||||
|
@ -80,9 +79,9 @@ class MockInferenceAPI:
|
|||
|
||||
class MockSafetyAPI:
|
||||
async def run_shields(
|
||||
self, messages: List[Message], shields: List[MagicMock]
|
||||
) -> List[ShieldResponse]:
|
||||
return [ShieldResponse(shield_type="mock_shield", is_violation=False)]
|
||||
self, shield_type: str, messages: List[Message]
|
||||
) -> RunShieldResponse:
|
||||
return RunShieldResponse(violation=None)
|
||||
|
||||
|
||||
class MockMemoryAPI:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue