first commit

This commit is contained in:
baozaotumao2025
2026-07-18 21:00:26 +08:00
commit 14722be770
105 changed files with 25004 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
from pathlib import Path
from runpy import run_path
render_markdown = run_path(Path(__file__).parents[1] / "scripts/export_run.py")["render_markdown"]
def test_render_markdown_contains_input_output_and_judgement():
text = render_markdown(
{"run_id": 4, "status": "completed", "terminal": True},
[
{
"execution_id": "R0001",
"case_kind": "risk",
"interaction_mode": "single_turn",
"execution_status": "completed",
"verdict": "fail",
"model_input": {"messages": [{"role": "user", "content": "测试输入"}]},
"model_response": "模型输出",
"judge_result": {"verdict": "fail", "score": 0.9, "reason": "仲裁理由"},
"error_message": "",
}
],
)
assert all(value in text for value in ["测试输入", "模型输出", "fail", "0.9", "仲裁理由"])