Append a single-layer Q/A block in papers.cool style.
(lines: List[str], label: str, question: str, body: Any)
| 1091 | |
| 1092 | def _append_qa_block(lines: List[str], label: str, question: str, body: Any) -> None: |
| 1093 | """Append a single-layer Q/A block in papers.cool style.""" |
| 1094 | lines.append(f"### {label} {question}") |
| 1095 | lines.append("") |
| 1096 | if isinstance(body, (list, tuple)): |
| 1097 | any_item = False |
| 1098 | for item in body: |
| 1099 | text = _clean_text(item) |
| 1100 | if text: |
| 1101 | lines.append(f"- {text}") |
| 1102 | any_item = True |
| 1103 | if not any_item: |
| 1104 | lines.append("当前信息不足,建议回到原文核对。") |
| 1105 | else: |
| 1106 | text = _clean_text(body) |
| 1107 | lines.append(text or "当前信息不足,建议回到原文核对。") |
| 1108 | lines.append("") |
| 1109 | |
| 1110 | |
| 1111 | def _build_recommendation_reason(payload: Dict[str, Any], response_language: str = "zh") -> str: |
| 1112 | language = _normalize_response_language(response_language) |
nothing calls this directly
no test coverage detected