修复UnboundLocalError: cannot access local variable 'json' where it is not associated

with a value 这个 bug
This commit is contained in:
sxhxliang
2026-01-05 21:14:19 +08:00
parent b6d272fcfb
commit 69477ca70c
2 changed files with 2 additions and 6 deletions

View File

@@ -600,7 +600,6 @@ class GenerationHandler:
# Parse error message to check if it's a structured error (JSON)
error_response = None
try:
import json
error_response = json.loads(str(e))
except:
pass