reab5555 commited on
Commit
d6bc41f
·
verified ·
1 Parent(s): 514bca2

Update output_parser.py

Browse files
Files changed (1) hide show
  1. output_parser.py +16 -16
output_parser.py CHANGED
@@ -4,9 +4,9 @@ import json
4
 
5
  class AttachmentStyle(BaseModel):
6
  secured: float = 0.0
7
- anxious_preoccupied: float = Field(0.0, alias="Anxious-Preoccupied")
8
- dismissive_avoidant: float = Field(0.0, alias="Dismissive-Avoidant")
9
- fearful_avoidant: float = Field(0.0, alias="Fearful-Avoidant")
10
  self_model: int = Field(0, alias="Self")
11
  others_model: int = Field(0, alias="Others")
12
  anxiety: int = 0
@@ -24,12 +24,12 @@ class BigFiveTraits(BaseModel):
24
  class PersonalityDisorder(BaseModel):
25
  depressed: int = 0
26
  paranoid: int = 0
27
- schizoid_schizotypal: int = Field(0, alias="Schizoid-Schizotypal")
28
- antisocial_psychopathic: int = Field(0, alias="Antisocial-Psychopathic")
29
- borderline_dysregulated: int = Field(0, alias="Borderline-Dysregulated")
30
  narcissistic: int = 0
31
- anxious_avoidant: int = Field(0, alias="Anxious-Avoidant")
32
- dependent_victimized: int = Field(0, alias="Dependent-Victimized")
33
  obsessional: int = 0
34
  explanation: str = "No explanation provided"
35
 
@@ -71,9 +71,9 @@ class OutputParser:
71
  general_impression=general_impression_str,
72
  attachment_style=AttachmentStyle(
73
  secured=attachment_styles.get("Secured", 0.0),
74
- anxious_preoccupied=attachment_styles.get("Anxious-Preoccupied", 0.0),
75
- dismissive_avoidant=attachment_styles.get("Dismissive-Avoidant", 0.0),
76
- fearful_avoidant=attachment_styles.get("Fearful-Avoidant", 0.0),
77
  self_model=attachment_styles.get("Self", 0),
78
  others_model=attachment_styles.get("Others", 0),
79
  anxiety=attachment_styles.get("Anxiety", 0),
@@ -91,12 +91,12 @@ class OutputParser:
91
  personality_disorder=PersonalityDisorder(
92
  depressed=personality_disorders.get("Depressed", 0),
93
  paranoid=personality_disorders.get("Paranoid", 0),
94
- schizoid_schizotypal=personality_disorders.get("Schizoid-Schizotypal", 0),
95
- antisocial_psychopathic=personality_disorders.get("Antisocial-Psychopathic", 0),
96
- borderline_dysregulated=personality_disorders.get("Borderline-Dysregulated", 0),
97
  narcissistic=personality_disorders.get("Narcissistic", 0),
98
- anxious_avoidant=personality_disorders.get("Anxious-Avoidant", 0),
99
- dependent_victimized=personality_disorders.get("Dependent-Victimized", 0),
100
  obsessional=personality_disorders.get("Obsessional", 0),
101
  explanation=personality_disorders.get("Explanation", "No explanation provided")
102
  )
 
4
 
5
  class AttachmentStyle(BaseModel):
6
  secured: float = 0.0
7
+ anxious_preoccupied: float = Field(0.0, alias="AnxiousPreoccupied")
8
+ dismissive_avoidant: float = Field(0.0, alias="DismissiveAvoidant")
9
+ fearful_avoidant: float = Field(0.0, alias="FearfulAvoidant")
10
  self_model: int = Field(0, alias="Self")
11
  others_model: int = Field(0, alias="Others")
12
  anxiety: int = 0
 
24
  class PersonalityDisorder(BaseModel):
25
  depressed: int = 0
26
  paranoid: int = 0
27
+ schizoid_schizotypal: int = Field(0, alias="SchizoidSchizotypal")
28
+ antisocial_psychopathic: int = Field(0, alias="AntisocialPsychopathic")
29
+ borderline_dysregulated: int = Field(0, alias="BorderlineDysregulated")
30
  narcissistic: int = 0
31
+ anxious_avoidant: int = Field(0, alias="AnxiousAvoidant")
32
+ dependent_victimized: int = Field(0, alias="DependentVictimized")
33
  obsessional: int = 0
34
  explanation: str = "No explanation provided"
35
 
 
71
  general_impression=general_impression_str,
72
  attachment_style=AttachmentStyle(
73
  secured=attachment_styles.get("Secured", 0.0),
74
+ anxious_preoccupied=attachment_styles.get("AnxiousPreoccupied", 0.0),
75
+ dismissive_avoidant=attachment_styles.get("DismissiveAvoidant", 0.0),
76
+ fearful_avoidant=attachment_styles.get("FearfulAvoidant", 0.0),
77
  self_model=attachment_styles.get("Self", 0),
78
  others_model=attachment_styles.get("Others", 0),
79
  anxiety=attachment_styles.get("Anxiety", 0),
 
91
  personality_disorder=PersonalityDisorder(
92
  depressed=personality_disorders.get("Depressed", 0),
93
  paranoid=personality_disorders.get("Paranoid", 0),
94
+ schizoid_schizotypal=personality_disorders.get("SchizoidSchizotypal", 0),
95
+ antisocial_psychopathic=personality_disorders.get("AntisocialPsychopathic", 0),
96
+ borderline_dysregulated=personality_disorders.get("BorderlineDysregulated", 0),
97
  narcissistic=personality_disorders.get("Narcissistic", 0),
98
+ anxious_avoidant=personality_disorders.get("AnxiousAvoidant", 0),
99
+ dependent_victimized=personality_disorders.get("DependentVictimized", 0),
100
  obsessional=personality_disorders.get("Obsessional", 0),
101
  explanation=personality_disorders.get("Explanation", "No explanation provided")
102
  )