Update the meta reference safety implementation to match new API

This commit is contained in:
Ashwin Bharambe 2024-09-20 14:17:44 -07:00
parent 93e4ef3829
commit 51245a417b
11 changed files with 115 additions and 130 deletions

View file

@ -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)