(text: str)
| 54 | |
| 55 | |
| 56 | def _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 | |
| 70 | def _snippet(node: Dict[str, Any], max_chars: int = 700) -> str: |
no outgoing calls
no test coverage detected