mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
Update the meta reference safety implementation to match new API
This commit is contained in:
parent
7e40eead4e
commit
82ddd851c8
11 changed files with 115 additions and 130 deletions
|
@ -13,11 +13,11 @@ import fire
|
|||
import httpx
|
||||
|
||||
from llama_models.llama3.api.datatypes import UserMessage
|
||||
|
||||
from llama_stack.distribution.datatypes import RemoteProviderConfig
|
||||
from pydantic import BaseModel
|
||||
from termcolor import cprint
|
||||
|
||||
from llama_stack.distribution.datatypes import RemoteProviderConfig
|
||||
|
||||
from .safety import * # noqa: F403
|
||||
|
||||
|
||||
|
@ -69,11 +69,7 @@ async def run_main(host: str, port: int):
|
|||
response = await client.run_shields(
|
||||
RunShieldRequest(
|
||||
messages=[message],
|
||||
shields=[
|
||||
ShieldDefinition(
|
||||
shield_type=BuiltinShield.llama_guard,
|
||||
)
|
||||
],
|
||||
shields=["llama_guard"],
|
||||
)
|
||||
)
|
||||
print(response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue