MCPcopy Create free account
hub / github.com/Open-Quant/openquant / summarize_hit

Function summarize_hit

scripts/afml_docs_loop.py:100–109  ·  view source on GitHub ↗
(hit: dict[str, Any])

Source from the content-addressed store, hash-verified

98
99
100def summarize_hit(hit: dict[str, Any]) -> dict[str, Any]:
101 return {
102 "chunk_id": hit.get("chunk_id", ""),
103 "chapter": hit.get("chapter", ""),
104 "section": hit.get("section", ""),
105 "page_start": hit.get("page_start", -1),
106 "page_end": hit.get("page_end", -1),
107 "heading_path": hit.get("heading_path", ""),
108 "score": round(float(hit.get("score", 0.0)), 6),
109 }
110
111
112def chapter_eq(left: str, right: str) -> bool:

Callers 2

build_stateFunction · 0.85
cmd_evidenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected