fix(api): 修復最後 2 個 bare except 錯誤

- scripts/test_nemotron_tool_calling.py: except -> except Exception

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-29 15:37:02 +08:00
parent d89f0520f9
commit 2c79cba629

View File

@@ -295,7 +295,7 @@ def parse_nemotron_response(response: dict) -> tuple:
tool_name = tool_call["function"]["name"]
try:
params = json.loads(tool_call["function"]["arguments"])
except:
except Exception:
params = {}
return (tool_name, params, None)
@@ -347,7 +347,7 @@ async def run_single_test(test_case: dict) -> list:
raw = None
try:
raw = json.dumps(resp["data"].get("choices", [{}])[0].get("message", {}), indent=2)[:200]
except:
except Exception:
pass
results.append(TestResult(
model="Nemotron-mini-4B",