mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-16 14:57:20 +00:00
Update provider_type -> inline::llama-guard in templates, update run.yaml
This commit is contained in:
parent
15ffceb533
commit
4971113f92
24 changed files with 121 additions and 98 deletions
|
@ -11,6 +11,7 @@ from llama_stack.apis.shields import ShieldType
|
|||
|
||||
from llama_stack.distribution.datatypes import Api, Provider
|
||||
from llama_stack.providers.inline.safety.llama_guard import LlamaGuardConfig
|
||||
from llama_stack.providers.inline.safety.prompt_guard import PromptGuardConfig
|
||||
from llama_stack.providers.remote.safety.bedrock import BedrockSafetyConfig
|
||||
|
||||
from llama_stack.providers.tests.resolver import resolve_impls_for_test_v2
|
||||
|
@ -44,6 +45,22 @@ def safety_llama_guard(safety_model) -> ProviderFixture:
|
|||
)
|
||||
|
||||
|
||||
# TODO: this is not tested yet; we would need to configure the run_shield() test
|
||||
# and parametrize it with the "prompt" for testing depending on the safety fixture
|
||||
# we are using.
|
||||
@pytest.fixture(scope="session")
|
||||
def safety_prompt_guard() -> ProviderFixture:
|
||||
return ProviderFixture(
|
||||
providers=[
|
||||
Provider(
|
||||
provider_id="inline::prompt-guard",
|
||||
provider_type="inline::prompt-guard",
|
||||
config=PromptGuardConfig().model_dump(),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def safety_bedrock() -> ProviderFixture:
|
||||
return ProviderFixture(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue