Skip to content

Commit 70c902a

Browse files
authored
fix: prevent crash when scan_output receives None as response (#271)
1 parent 4121114 commit 70c902a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llm_guard/evaluate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def scan_output(
9292
results_valid = {}
9393
results_score = {}
9494

95-
if len(scanners) == 0 or output.strip() == "":
95+
if len(scanners) == 0 or output is None or output.strip() == "":
9696
return sanitized_output, results_valid, results_score
9797

9898
start_time = time.time()

0 commit comments

Comments
 (0)