读取ground truth代码文件
(gt_code_path: Path)
| 573 | |
| 574 | |
| 575 | def read_gt_code(gt_code_path: Path) -> str: |
| 576 | """读取ground truth代码文件""" |
| 577 | try: |
| 578 | with open(gt_code_path, 'r', encoding='utf-8') as f: |
| 579 | return f.read().strip() |
| 580 | except Exception as e: |
| 581 | print(f"❌ Error reading ground truth code from {gt_code_path}: {e}") |
| 582 | return "" |
| 583 | |
| 584 | def create_data_evaluation_request(gt_code_path:Path, code_path: Path, data_evaluation_prompt: str, model_name: str) -> Dict: |
| 585 | gt_code = read_gt_code(gt_code_path) |
no outgoing calls
no test coverage detected