Download memory_agent/errors.py from mistral-hackaton-2026/universal-memory-agent: direct link, hf CLI and curl.
- Browser
- Download file 394 Bytes
-
https://huggingface.co/spaces/mistral-hackaton-2026/universal-memory-agent/resolve/main/memory_agent/errors.py
- Command line
-
hf download hf://spaces/mistral-hackaton-2026/universal-memory-agent/memory_agent/errors.py
-
curl -L -o errors.py https://huggingface.co/spaces/mistral-hackaton-2026/universal-memory-agent/resolve/main/memory_agent/errors.py
394 Bytes
| from __future__ import annotations | |
| RATE_LIMIT_MESSAGE = "Mistral API rate limit exceeded. Please wait a few seconds and try again." | |
| def is_rate_limit_error(error: Exception) -> bool: | |
| text = str(error).lower() | |
| return ( | |
| "429" in text | |
| or "rate limit" in text | |
| or "rate_limited" in text | |
| or '"code":"1300"' in text | |
| or "'code': '1300'" in text | |
| ) | |