v3.11.11: fix UnboundLocalError last_role in Gemini sanitizer
This commit is contained in:
Binary file not shown.
@@ -5574,6 +5574,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
|||||||
if OAUTH_PROVIDER.startswith("google") and "claude" not in model.lower():
|
if OAUTH_PROVIDER.startswith("google") and "claude" not in model.lower():
|
||||||
sanitized = []
|
sanitized = []
|
||||||
last_user_text = None
|
last_user_text = None
|
||||||
|
last_role = None
|
||||||
for content in contents:
|
for content in contents:
|
||||||
role = content.get("role")
|
role = content.get("role")
|
||||||
parts = [p for p in content.get("parts", []) if isinstance(p, dict)]
|
parts = [p for p in content.get("parts", []) if isinstance(p, dict)]
|
||||||
|
|||||||
Reference in New Issue
Block a user