Add exception logging
This commit is contained in:
parent
47e8d8b33a
commit
cdc43f75ac
1 changed files with 144 additions and 182 deletions
|
|
@ -0,0 +1,12 @@
|
|||
from typing import Any, Optional, Union
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ClassificationOutput(BaseModel):
|
||||
label: Union[str, int]
|
||||
confidence: float
|
||||
explanation: Optional[Any]
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash((type(self),) + tuple(self.__dict__.values()))
|
||||
Loading…
Reference in a new issue