pydantic_ai.exceptions
ModelRetry
Bases: Exception
Exception raised when a tool function should be retried.
The agent will return the message to the model and ask it to try calling the function/tool again.
Source code in pydantic_ai_slim/pydantic_ai/exceptions.py
8 9 10 11 12 13 14 15 16 17 18 19 |
|
UserError
Bases: RuntimeError
Error caused by a usage mistake by the application developer — You!
Source code in pydantic_ai_slim/pydantic_ai/exceptions.py
22 23 24 25 26 27 28 29 30 |
|
UnexpectedModelBehavior
Bases: RuntimeError
Error caused by unexpected Model behavior, e.g. an unexpected response code.
Source code in pydantic_ai_slim/pydantic_ai/exceptions.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|