diff --git a/lmdeploy/messages.py b/lmdeploy/messages.py index 54441ebe8b..473d307bb6 100644 --- a/lmdeploy/messages.py +++ b/lmdeploy/messages.py @@ -308,6 +308,31 @@ def __lt__(self, other): return self.value < other.value return NotImplemented + def __le__(self, other): + if self.__class__ is other.__class__: + return self.value <= other.value + return NotImplemented + + def __eq__(self, other): + if self.__class__ is other.__class__: + return self.value == other.value + return NotImplemented + + def __ne__(self, other): + if self.__class__ is other.__class__: + return self.value != other.value + return NotImplemented + + def __gt__(self, other): + if self.__class__ is other.__class__: + return self.value > other.value + return NotImplemented + + def __ge__(self, other): + if self.__class__ is other.__class__: + return self.value >= other.value + return NotImplemented + @dataclass class Response: