pydantic_ai.exceptions
模型重试
基类: Exception
当工具函数应该重试时引发的异常。
代理将把消息返回给模型,并要求它再次尝试调用该函数/工具。
Source code in pydantic_ai_slim/pydantic_ai/exceptions.py
8 9 10 11 12 13 14 15 16 17 18 19 | |
用户错误
基类: RuntimeError
错误由应用程序开发人员的使用错误引起 — 你!
Source code in pydantic_ai_slim/pydantic_ai/exceptions.py
22 23 24 25 26 27 28 29 30 | |
代理运行错误
基类: RuntimeError
代理运行期间发生错误的基类。
Source code in pydantic_ai_slim/pydantic_ai/exceptions.py
33 34 35 36 37 38 39 40 41 42 43 44 | |
使用限制已超出
基类: AgentRunError
当模型的使用超出指定限制时引发错误。
Source code in pydantic_ai_slim/pydantic_ai/exceptions.py
47 48 | |
意外模型行为
基础类: AgentRunError
由于意外的模型行为导致错误,例如意外的响应代码。
Source code in pydantic_ai_slim/pydantic_ai/exceptions.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |