diff --git a/autogen/exception_utils.py b/autogen/exception_utils.py index 5ef3a3ff35..1ff685e35f 100644 --- a/autogen/exception_utils.py +++ b/autogen/exception_utils.py @@ -46,12 +46,14 @@ def __init__(self, message: str = "The provided agents list does not overlap wit super().__init__(self.message) -class O1ModelToolNotSupportedError(Exception): - """Exception raised when tools are used with o1 models.""" +class ModelToolNotSupportedError(Exception): + """ + Exception raised when attempting to use tools with models that do not support them. + """ def __init__( self, - message: str = "Tools are not supported with O1 models. Refer to the documentation at https://platform.openai.com/docs/guides/reasoning#limitations", + model: str, ): - self.message = message + self.message = f"Tools are not supported with {model} models. Refer to the documentation at https://platform.openai.com/docs/guides/reasoning#limitations" super().__init__(self.message)