Exceptions
AgentsException
Bases: Exception
Base class for all exceptions in the CAI Agents.
Source code in src/cai/sdk/agents/exceptions.py
7 8 |
|
MaxTurnsExceeded
Bases: AgentsException
Exception raised when the maximum number of turns is exceeded.
Source code in src/cai/sdk/agents/exceptions.py
11 12 13 14 15 16 17 |
|
ModelBehaviorError
Bases: AgentsException
Exception raised when the model does something unexpected, e.g. calling a tool that doesn't exist, or providing malformed JSON.
Source code in src/cai/sdk/agents/exceptions.py
20 21 22 23 24 25 26 27 28 |
|
UserError
Bases: AgentsException
Exception raised when the user makes an error using CAI.
Source code in src/cai/sdk/agents/exceptions.py
31 32 33 34 35 36 37 |
|
InputGuardrailTripwireTriggered
Bases: AgentsException
Exception raised when a guardrail tripwire is triggered.
Source code in src/cai/sdk/agents/exceptions.py
40 41 42 43 44 45 46 47 48 49 50 |
|
guardrail_result
instance-attribute
guardrail_result: InputGuardrailResult = guardrail_result
The result data of the guardrail that was triggered.
OutputGuardrailTripwireTriggered
Bases: AgentsException
Exception raised when a guardrail tripwire is triggered.
Source code in src/cai/sdk/agents/exceptions.py
53 54 55 56 57 58 59 60 61 62 63 |
|
guardrail_result
instance-attribute
guardrail_result: OutputGuardrailResult = guardrail_result
The result data of the guardrail that was triggered.
PriceLimitExceeded
Bases: AgentsException
Raised when the maximum price limit is exceeded.
Source code in src/cai/sdk/agents/exceptions.py
66 67 68 69 |
|