()
| 46 | |
| 47 | |
| 48 | def _answer_max_tokens() -> int: |
| 49 | try: |
| 50 | value = int(str(os.environ.get("PAPERFLOW_WIKI_ANSWER_MAX_TOKENS", "1800")).strip()) |
| 51 | except (TypeError, ValueError): |
| 52 | value = 1800 |
| 53 | return max(512, min(4096, value)) |
| 54 | |
| 55 | |
| 56 | def _looks_incomplete_answer(text: str) -> bool: |
no test coverage detected