src/anthropic/lib/_extras/_common.py
raw| 1 | from ..._exceptions import AnthropicError |
| 2 | |
| 3 | INSTRUCTIONS = """ |
| 4 | |
| 5 | Anthropic error: missing required dependency `{library}`. |
| 6 | |
| 7 | $ pip install anthropic[{extra}] |
| 8 | """ |
| 9 | |
| 10 | |
| 11 | class MissingDependencyError(AnthropicError): |
| 12 | def __init__(self, *, library: str, extra: str) -> None: |
| 13 | super().__init__(INSTRUCTIONS.format(library=library, extra=extra)) |