mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-05 20:27:35 +00:00
Use inference APIs for executing Llama Guard
This commit is contained in:
parent
6236634d84
commit
37ca22cda6
3 changed files with 94 additions and 164 deletions
|
@ -88,10 +88,10 @@ class MetaReferenceSafetyImpl(Safety):
|
|||
assert (
|
||||
cfg is not None
|
||||
), "Cannot use LlamaGuardShield since not present in config"
|
||||
model_dir = resolve_and_get_path(cfg.model)
|
||||
|
||||
return LlamaGuardShield(
|
||||
model_dir=model_dir,
|
||||
model=cfg.model,
|
||||
inference_api=self.inference_api,
|
||||
excluded_categories=cfg.excluded_categories,
|
||||
disable_input_check=cfg.disable_input_check,
|
||||
disable_output_check=cfg.disable_output_check,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue