修复代码格式和文件名大小写问题
This commit is contained in:
@@ -8,7 +8,7 @@ def dyn_select_top_k(
|
||||
# 检查输入列表是否为空
|
||||
if not score:
|
||||
return []
|
||||
|
||||
|
||||
# 按照分数排序(降序)
|
||||
sorted_score = sorted(score, key=lambda x: x[1], reverse=True)
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ def fix_broken_generated_json(json_str: str) -> str:
|
||||
# Try to load the JSON to see if it is valid
|
||||
orjson.loads(json_str)
|
||||
return json_str # Return as-is if valid
|
||||
except orjson.JSONDecodeError: ...
|
||||
except orjson.JSONDecodeError:
|
||||
...
|
||||
|
||||
# Step 1: Remove trailing content after the last comma.
|
||||
last_comma_index = json_str.rfind(",")
|
||||
|
||||
Reference in New Issue
Block a user