Download src/polyhedra/agents/quant/llm_errors.py from polyHedra/PolyHedra: direct link, hf CLI and curl.
- Browser
- Download file 365 Bytes
-
https://huggingface.co/spaces/polyHedra/PolyHedra/resolve/main/src/polyhedra/agents/quant/llm_errors.py
- Command line
-
hf download hf://spaces/polyHedra/PolyHedra/src/polyhedra/agents/quant/llm_errors.py
-
curl -L -o llm_errors.py https://huggingface.co/spaces/polyHedra/PolyHedra/resolve/main/src/polyhedra/agents/quant/llm_errors.py
365 Bytes
| """Helpers for safe LLM failure messages in quant agent output.""" | |
| from __future__ import annotations | |
| from polyhedra.services.error_sanitizer import sanitize_exception | |
| def format_llm_failure(exc: Exception, *, limit: int = 240) -> str: | |
| """Return a concise, redacted exception detail safe for artifacts/UI.""" | |
| return sanitize_exception(exc, limit=limit) | |