File size: 1,883 Bytes
161d75f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from pydantic import BaseModel, Field
from typing import Literal, List, Union


class Behavior(BaseModel):
    type: str
    description: str

# --- Specific Behavior classes ---
class AbnormalBreathing(Behavior):
    type: Literal['abnormal breathing']
    description: Literal["Problems breathing, breathing sounds"]

class CrashFalling(Behavior):
    type: Literal['crash, falling from the sky']
    description: Literal["Suddenly falling from the sky"]

class Diarrhea(Behavior):
    type: Literal['diarrhea']
    description: Literal["Observed diarrhea"]

class Lameness(Behavior):
    type: Literal['lameness']
    description: Literal["Apparent limping or not able to walk properly"]

class Neurological(Behavior):
    type: Literal['neurological']
    description: Literal["Circling, incoordination, tremors, convulsions, fast eye movements"]

class OtherAbnormalBehavior(Behavior):
    type: Literal['other abnormal behavior']
    description: Literal["Other than weakness, other than neurologic"]

class UnableToFly(Behavior):
    type: Literal['unable to fly']
    description: Literal["Animal alert and tries to fly but can not take off"]

class Vomiting(Behavior):
    type: Literal['vomiting']
    description: Literal["Throwing up undigested food, regurgitating"]

class Weakness(Behavior):
    type: Literal['weakness']
    description: Literal["Non responsive, does not fly away when approached, lethargy"]

class NoChanges(Behavior):
    type: Literal['no changes']
    description: Literal["Animal is acting normally"]

# Union of all possible behaviors
BehaviorType = Union[
    AbnormalBreathing,
    CrashFalling,
    Diarrhea,
    Lameness,
    Neurological,
    OtherAbnormalBehavior,
    UnableToFly,
    Vomiting,
    Weakness,
    NoChanges
]

# Main class that logs multiple behaviors
class Behaviors(BaseModel):
    observed_behaviors: List[BehaviorType]