Llama Guard 3's verdicts carry their hazards' names without a categories list
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
249a91aeec
commit
4721b8e353
1 file changed
+4
@@ -294,6 +294,10 @@ func parseJudgment(format string, names []string, body []byte, answer string) (j
|
||||
}
|
||||
switch format {
|
||||
case "llamaguard3":
|
||||
if len(names) == 0 {
|
||||
// Its own: S1 is Violent Crimes, S9 Indiscriminate Weapons.
|
||||
names = llamaGuard3Categories
|
||||
}
|
||||
lines := strings.Split(text, "\n")
|
||||
switch strings.ToLower(strings.TrimSpace(lines[0])) {
|
||||
case "safe":
|
||||
|
||||
Reference in new issue
Block a user