Use prompt history for online mining records

This commit is contained in:
wuyang6
2026-05-14 17:42:08 +08:00
parent f1dc7e4b91
commit 87dd67c76a
10 changed files with 219 additions and 97 deletions
@@ -38,6 +38,10 @@ def main() -> int:
payload = load_json_payload()
source = str(payload.get("source") or "pre_processing")
date = payload.get("date")
date_from = payload.get("date_from")
date_to = payload.get("date_to")
lookback_days = payload.get("lookback_days")
lookback_days = int(lookback_days) if lookback_days not in (None, "") else None
size = int(payload.get("size") or 50)
scan_size = int(payload.get("scan_size") or max(size * 5, size))
filters = payload.get("filters") or {}
@@ -48,6 +52,9 @@ def main() -> int:
date=date,
size=scan_size,
query_filters=build_index_filters(source, filters),
date_from=date_from,
date_to=date_to,
lookback_days=lookback_days,
)
cases = []
for doc in docs:
@@ -61,7 +68,7 @@ def main() -> int:
emit_success(
{
"source": source,
"date": date or "past-48h",
"date": date or (f"{date_from}..{date_to}" if date_from and date_to else f"past-{lookback_days}d" if lookback_days else "past-48h"),
"scanned": len(docs),
"matched": len(cases),
"output_path": output_path,
@@ -83,4 +90,3 @@ def main() -> int:
if __name__ == "__main__":
raise SystemExit(main())