mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-15 14:08:00 +00:00
minor fix
This commit is contained in:
parent
0d07ba1a65
commit
70ebc4b448
1 changed files with 1 additions and 1 deletions
|
@ -423,7 +423,7 @@ class LlamaGuardShield:
|
||||||
def create_safe_moderation_object(self, model: str) -> ModerationObject:
|
def create_safe_moderation_object(self, model: str) -> ModerationObject:
|
||||||
"""Create a ModerationObject for safe content."""
|
"""Create a ModerationObject for safe content."""
|
||||||
categories = dict.fromkeys(OPENAI_TO_LLAMA_CATEGORIES_MAP.keys(), False)
|
categories = dict.fromkeys(OPENAI_TO_LLAMA_CATEGORIES_MAP.keys(), False)
|
||||||
category_scores = dict.fromkeys(OPENAI_TO_LLAMA_CATEGORIES_MAP.keys(), 0.0)
|
category_scores = dict.fromkeys(OPENAI_TO_LLAMA_CATEGORIES_MAP.keys(), 1.0)
|
||||||
category_applied_input_types = {key: [] for key in OPENAI_TO_LLAMA_CATEGORIES_MAP.keys()}
|
category_applied_input_types = {key: [] for key in OPENAI_TO_LLAMA_CATEGORIES_MAP.keys()}
|
||||||
|
|
||||||
return ModerationObject(
|
return ModerationObject(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue