v1.0.167: fix grouping dead code (classified→docs) + max_tokens 500→1000

This commit is contained in:
2026-06-24 09:35:42 +04:00
parent 49c472b46d
commit 115e71b2a1
5 changed files with 27 additions and 5 deletions
+3 -3
View File
@@ -79,9 +79,9 @@ def group_documents(batch_id):
groups.append(group)
# Unmatched documents → "unresolved" group
# Unmatched documents → "unresolved" group (including failed/pending)
unmatched = [s for s in supplements_list if s.get("doc_type") != "contract"]
unmatched += [d for d in classified if d.get("classify_status") != "classified"]
unmatched += [d for d in docs if d.get("classify_status") != "classified"]
if unmatched or len(contracts_list) == 0:
# Put unmatched into a separate group
@@ -92,7 +92,7 @@ def group_documents(batch_id):
"documents": unmatched,
})
return {"ok": True, "groups": groups, "total_docs": len(classified)}
return {"ok": True, "groups": groups, "total_docs": len(docs)}
def apply_groups(batch_id, groups_data):