feat: 修复JSON解析问题并增加批量标注大小至50

This commit is contained in:
Windpicker-owo
2025-12-12 15:09:00 +08:00
parent 1087d46ce2
commit 7d547b7b80

View File

@@ -346,6 +346,8 @@ class DatasetGenerator:
response = response.split("```")[1].split("```")[0].strip()
# 解析JSON
import json_repair
response = json_repair.repair_json(response)
data = json.loads(response)
# 验证格式
@@ -416,7 +418,7 @@ class DatasetGenerator:
messages: list[dict[str, Any]],
persona_info: dict[str, Any],
save_path: Path | None = None,
batch_size: int = 20,
batch_size: int = 50,
) -> list[dict[str, Any]]:
"""批量标注消息(真正的批量模式)