mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-24 06:02:03 +00:00
起草失败单独记一种状态,别再停在「起草中」
没有可用模型、模型回复读不懂时,草稿此前一直留在 drafting,界面会以为还在跑。现在置 failed 并把原因写进 error;补上真指标后 PATCH 仍能把它推回正常流程。
This commit is contained in:
@@ -220,7 +220,7 @@ async def test_a_model_that_is_unavailable_leaves_the_draft_with_an_error(client
|
||||
monkeypatch.setattr(docdraft, "extract", unavailable)
|
||||
body = (await client.post("/api/ledger/drafts/extract", json={"documents": [doc]})).json()
|
||||
made = (await client.get(f"/api/ledger/drafts/{body['draft_id']}")).json()
|
||||
assert made["status"] == "drafting" and made["error"] == "还没有接入可用的起草模型"
|
||||
assert made["status"] == "failed" and made["error"] == "还没有接入可用的起草模型"
|
||||
assert made["metric_count"] == 0 and not made.get("metrics")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user