Exceptions
conatus.actions.exceptions
¶
Exceptions related to Actions.
ActionFunctionNotFoundError
¶
ActionFunctionNotFoundError(class_name: str)
Bases: Exception
Error raised when no action function was found in a class.
| PARAMETER | DESCRIPTION |
|---|---|
class_name
|
Name of the class where no action function was found.
TYPE:
|
Source code in conatus/actions/exceptions.py
MultipleActionFunctionsError
¶
Bases: Exception
Error raised when multiple action functions were found in a class.
| PARAMETER | DESCRIPTION |
|---|---|
class_name
|
Name of the class where multiple action functions were found.
TYPE:
|
action_functions
|
List of action functions found in the class. |
Source code in conatus/actions/exceptions.py
ActionFunctionInferenceFoundMultipleFunctionsError
¶
ActionFunctionInferenceFoundMultipleFunctionsError(
class_name: str,
all_functions: list[Callable[..., ParamType]],
)
Bases: Exception
Error raised when too many functions are found in an Action class.
| PARAMETER | DESCRIPTION |
|---|---|
class_name
|
Name of the class where multiple action functions were found.
TYPE:
|
all_functions
|
List of all functions found in the class. |
Source code in conatus/actions/exceptions.py
FunctionExtractionError
¶
Bases: Exception
Error raised when extracting function information fails.
This error is meant to be raised when logical errors are found (e.g. there is a mismatch between what's written in the docstring and what's written in the signature.)
ActionWrongParamsError
¶
Bases: Exception
Error raised when the action is called with wrong parameters.
ActionParamValidationError
¶
Bases: Exception
Error raised when the action is called with wrong parameters.
This errors should be raised when Pydantic rejects the input arguments. For now, the program will crash. Eventually, we'll want to catch it and enable the LLM to try to fix the input arguments.