MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _looks_incomplete_answer

Function _looks_incomplete_answer

agents/wiki-agent/retrieve/answer.py:56–67  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

54
55
56def _looks_incomplete_answer(text: str) -> bool:
57 content = str(text or "").strip()
58 if not content:
59 return True
60 terminal = "。!?!?.))]】」』》\"'"
61 if content[-1] in terminal:
62 return False
63 if content.count("[") > content.count("]") or content.count("**") % 2:
64 return True
65 if len(content) < 320:
66 return True
67 return False
68
69
70def _snippet(node: Dict[str, Any], max_chars: int = 700) -> str:

Callers 1

answer_question_streamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected