From c18ca95619a473732cb5a81eebc3c4e1a615f8bc Mon Sep 17 00:00:00 2001 From: Yuan Tang Date: Thu, 10 Oct 2024 21:10:50 -0400 Subject: [PATCH] Fix precommit Signed-off-by: Yuan Tang --- .../providers/impls/meta_reference/safety/llama_guard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_stack/providers/impls/meta_reference/safety/llama_guard.py b/llama_stack/providers/impls/meta_reference/safety/llama_guard.py index 19a20a899..a6f450fae 100644 --- a/llama_stack/providers/impls/meta_reference/safety/llama_guard.py +++ b/llama_stack/providers/impls/meta_reference/safety/llama_guard.py @@ -170,7 +170,7 @@ class LlamaGuardShield(ShieldBase): for i in range(1, len(messages)): if messages[i].role == messages[i - 1].role: raise ValueError( - f"Messages must alternate between user and assistant. Message {i} has the same role as message {i-1}" + f"Messages must alternate between user and assistant. Message {i} has the same role as message {i - 1}" ) return messages