Spaces:
Sleeping
Sleeping
File size: 27,292 Bytes
e5cb446 c75e8fe e5cb446 2e71fb2 a2d28f6 2e71fb2 a2d28f6 2e71fb2 a2d28f6 fe603db 2e71fb2 184c7a0 859226d 184c7a0 859226d 184c7a0 859226d 184c7a0 859226d 184c7a0 859226d 184c7a0 859226d 184c7a0 e5cb446 583e493 e5cb446 fa447df e5cb446 583e493 e5cb446 583e493 e5cb446 67db719 e5cb446 425e3a2 e5cb446 c7ddc58 90bf5ac e2db59c c7ddc58 e2db59c 103db8b c7ddc58 425e3a2 d00eed5 43a83a3 f8071d0 a2d28f6 16d8e2c 9aaf0fc 16d8e2c fe603db 16d8e2c 9aaf0fc fe603db 9aaf0fc 9f5fd59 43a83a3 9aaf0fc 9f5fd59 fe603db 9f5fd59 fe603db 9f5fd59 fe603db 9f5fd59 fe603db 9f5fd59 43a83a3 f8071d0 184c7a0 859226d 184c7a0 9f5fd59 184c7a0 9f5fd59 184c7a0 9f5fd59 184c7a0 9f5fd59 184c7a0 9f5fd59 184c7a0 9f5fd59 f51c8df 184c7a0 9f5fd59 184c7a0 859226d 184c7a0 859226d 184c7a0 43a83a3 9f5fd59 9b34d5d d00eed5 e2db59c 5c4867c d00eed5 e5cb446 c346357 d00eed5 2dc165b fe603db 2dc165b 2e71fb2 c346357 2e71fb2 fe603db 74970b2 fe603db 74970b2 fe603db 2e71fb2 fe603db 74970b2 fe603db 74970b2 fe603db 2e71fb2 fe603db 74970b2 fe603db 74970b2 fe603db 2e71fb2 74970b2 fe603db 74970b2 2e71fb2 74970b2 2e71fb2 74970b2 e5cb446 2e71fb2 d00eed5 e5cb446 d00eed5 c346357 d00eed5 e5cb446 9f5fd59 e5cb446 2e71fb2 |
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
# annotation_questions.py
from dataclasses import dataclass, field
from typing import List, Optional, Dict
# ========== Dataclass shared with app.py ==========
@dataclass
class Field:
type: str
title: str
name: str = None
mandatory: bool = True
following_mandatory_values: list = False
skip_mandatory: bool = False
help: Optional[str] = None
children: Optional[List['Field']] = None
other_params: Optional[Dict[str, object]] = field(default_factory=lambda: {})
# ========== Constants one can edit ==========
COLS_TO_SAVE = ['dialogue_id','dialogue_name','generatedPatient']
agreement_labels = ['strongly disagree', 'disagree', 'neither agree no disagree', 'agree', 'strongly agree']
mentioned_y_n = ['yes, explicitly', 'yes, implicitly', 'no', 'not sure', 'other']
degree_labels = ['not at all', 'slightly', 'moderately', 'very much', 'extremely']
quality_labels = ['very poor', 'poor', 'acceptable', 'good', 'very good']
priority_labels = ['not a priority', 'low priority', 'neutral', 'moderate priority', 'high priority']
yes_no_labels = ['no','yes', 'other']
yes_no_other_labels = ['no','yes','other']
default_labels = agreement_labels
accuracy_contributor_labels = [
"",
# From "Psychological State"
"Explicit mental illness mentioned (e.g., depression)",
"Specific symptoms described (e.g., insomnia, low mood)",
"Clear psychological stressors discussed",
"Specific triggering event described (e.g., job loss, argument)",
# From "Conversational Style"
"Concise communication",
"Use of colloquial speech",
"Detailed storytelling (specific examples provided)",
"High self-awareness and organized thinking",
# From "Engagement"
"Openness about personal state or concerns",
"Willingness to engage in therapy",
"Responsive to therapist’s questions/interventions",
"Appears distracted",
"Shows mistrust toward therapist or process",
"Appears solution-focused",
# From Tone Behavior
"Appears accusatory",
"Appears aggressive",
"Appears anxious",
"Appears ashamed",
"Appears controlling",
"Appears defensive",
"Appears defiant",
"Appears depressive",
"Appears disappointed",
"Appears empathetic",
"Appears excited",
"Appears expressive",
"Appears guilty",
"Appears hesitant",
"Appears humorous/comedic",
"Appears hurt",
"Appears insightful",
"Appears jealous",
"Appears sarcastic",
"Appears self-critical",
"Appears sensitive",
"Appears suspicious",
"Other (please specify)"
]
tone_behavior_labels = [
"",
"Accusatory",
"Aggressive",
"Anxious",
"Ashamed",
"Controlling",
"Defensive",
"Defiant",
"Depressive",
"Disappointed",
"Empathetic",
"Excited",
"Expressive",
"Guilty",
"Hesitant",
"Humorous/Comedic",
"Hurt",
"Insightful",
"Jealous",
"Sarcastic",
"Self-critical",
"Sensitive",
"Suspicious",
"Other (please specify)"
]
consent_text = '''
## Consent Form
You will be asked to take part in a research study. Before you decide to take part in this study, it is important that you understand why the study is being done and what it involves. Please read the following information carefully.
________________________________________________________________________________________
Project title: Therapy in Simulation: Computational Experiments on Interpersonal Dynamics in Psychotherapy\\
Researchers: Varvara Gumirova, Eva Maria Vecchi, Philipp Graffe, Jonas Kuhn\\
Institute: Institute for Machine Speech Processing (IMS)\\
University: University of Stuttgart\\
Contact: eva-maria.vecchi@ims.uni-stuttgart.de
_________________________________________________________________________________________
### Description of the research study
In this study, we investigate how simulated patients -- by either human actors or AI models -- behave and communicate in psychotherapeutic interactions. Specifically, we aim to understand how realistically simulated patients present psychological states, conversational styles, and behavioral or pragmatic characteristics during therapy sessions, and how closely they adhere to predefined role descriptions.
The intended use of the results of this study includes improving the design, evaluation, and deployment of simulated patients for the training and assessment of psychotherapists. Insights from this research will contribute to the development of more realistic and reliable training tools in psychotherapy and mental health education, as well as to broader research on human–AI interaction in sensitive, clinical-like settings.
**Time required:** Your participation will take up to an estimated 2 hours. The time required may vary on an individual basis.
**Risks and benefits:** The risks to your participation in this online survey are those associated with basic computer tasks, including boredom, fatigue, mild stress, or breach of confidentiality. Some of the topics discussed in the online posts to be annotated may include violence, suicide or rape. The only benefit to you is the learning experience from participating in a research study. The benefit to society is the contribution to scientific knowledge
**Compensation:** You will be compensated for participating in this study. If you are interested, we will also be more than happy to share more information about our research with you.
**Voluntary participation:** Your participation in this study is voluntary. It is your decision whether or not to participate in this study. If you decide to participate in this study, you will be asked to confirm this consent form ("I agree."). Even after signing the consent form, you can withdraw from participation at any time and without giving any reason. Partial data will not be analysed.
**Confidentiality:** Your responses to this experiment will be anonymous. Please do not share any information that can be used to identify you. The researcher(s) will make every effort to maintain your confidentiality.
**Contact:** If at any time you have questions about this study or would like to report any adverse effects due to this study, please contact the researcher(s).
### Consent:
Please indicate, in the box below, that you are at least 18 years old, have read and understood this consent form, are comfortable using the English and German languages to complete the survey, and you agree to participate in this online research survey.
- *I am age 18 or older.*
- *I have read this consent form or had it read to me.*
- *I am comfortable using the English language to participate in this survey.*
- *I agree to participate in this research and I want to continue with the survey.*
'''
fields0: List[Field] = [
Field(type="markdown", title="", mandatory=False, other_params={
"instruction_content": True,
"content": "### 1. Annotation of Therapy Session\n ##### Instructions: Please read the transcript of the therapy session carefully, then answer the questions below.\n "
},),
Field(type="expander", title="**Annotation Guidelines** *(expand)*", children=[
Field(type="markdown", title="", mandatory=False, other_params={"use_guidelines": True}),
]),
Field(name="patient", type="input_col", title=" "),
Field(type="markdown", title="", mandatory=False, other_params={"use_dialogue_name": True}),
####--- EDIT MARKER: Session-specific properties
Field(type="markdown", title="", mandatory=False, other_params={
"instruction_content": True,
"content": "### Overview of Patient in Therapy Session"
},),
Field(type="container", title="##### Presentation of Patient's Psychological State", children=[
Field(name="diagnosis", type="y_n_radio",
title="Does the patient explicitly mention a specific **mental illness** (e.g., depression)?", other_params={'labels': yes_no_other_labels}, mandatory=True),
Field(name="diagnosis_desc", type="text", title="If so, which illness?", mandatory=False),
Field(name="symptom", type="y_n_radio",
title="Does the patient explicitly mention **symptoms** related to their psychological state?", other_params={'labels': yes_no_other_labels}, mandatory=True),
Field(name="symptom_desc", type="text", title="If so, which symptoms?", mandatory=False),
Field(name="stressor", type="y_n_radio",
title="Does the patient talk about specific things that are adding **psychological pressure** or making their mental state worse?",
other_params={'labels': yes_no_other_labels}, mandatory=True),
Field(name="stressor_desc", type="text", title="If so, list stressors:", mandatory=False),
Field(name="trigger", type="y_n_radio",
title="Does the patient describe a particular **event or circumstance** (e.g., an argument, job loss, injury, crisis) that led them to come to this appointment?",
other_params={'labels': yes_no_other_labels}, mandatory=True),
Field(name="trigger_desc", type="text", title="If so, describe:", mandatory=False),
]),
Field(type="container", title="##### Conversational Style", children=[
Field(name="conciseness", type="likert_radio",
title="Are the patient's responses **concise**?", other_params={"labels": degree_labels}, mandatory=True),
# Field(name="symptom_desc1", type="text", title="If so, which symptoms?", mandatory=False),
Field(name="colloquial", type="likert_radio",
title="Does the patient use the **colloquial** speach?",
other_params={"labels": degree_labels}, mandatory=True),
Field(name="detailedness", type="likert_radio",
title="Does the patient describe **specific details** to help the therapist understand the situation better?",
other_params={"labels": degree_labels}, mandatory=True),
Field(name="self-awareness", type="likert_radio",
title="Does the patient show **self-awareness** and expresses thoughts in an organized manner?",
other_params={"labels": degree_labels}, mandatory=True),
]),
Field(type="container", title="##### Behavioral & Pragmatic Properties", children=[
Field(type="markdown", title="", mandatory=False, other_params={"instruction_content": True,
"content": "**1. Level of Engagement**"
},),
Field(name="openness", type="likert_radio",
title="Is the patient **open** with the therapist with respect to their state or concerns?",
other_params={"labels": degree_labels}, mandatory=True),
Field(name="engaged", type="likert_radio",
title="Does the patient appear **willing to engage** in the therapeutic process and work on their concerns?",
other_params={"labels": degree_labels}, mandatory=True),
Field(name="responsive", type="likert_radio",
title="Does the patient **directly address** the therapist’s questions, comments, or interventions in a relevant way?",
other_params={"labels": degree_labels}, mandatory=True),
#Field(name="aviodant", type="likert_radio",
# title="Does the patient avoid discussing certain topics, emotions, or questions?",
# other_params={"labels": degree_labels}, mandatory=True),
Field(name="distracted", type="likert_radio",
title="Does the patient seem **distracted**, lose track of the conversation, or struggle to stay focused?",
other_params={"labels": degree_labels}, mandatory=True),
Field(name="trust", type="likert_radio",
title="Does the patient show any signs of **mistrust** towards the therapist or seeking help?",
other_params={"labels": degree_labels}, mandatory=True),
Field(name="solution-oriented", type="likert_radio",
title="Is the patient more focused on **seeking out solutions** rather than just sharing thoughts and feelings?",
other_params={"labels": degree_labels}, mandatory=True),
Field(type="markdown", title="", mandatory=False, other_params={"instruction_content": True,
"content": "\n \n **2. Patient's Tone in the Interaction**"
},),
Field(name="tone_properties", type="multiselect",
title="How would you characterize the **patient's tone** throughout the interaction? *(Multiple selection possible)*",
other_params={'choices': tone_behavior_labels}, mandatory=True, following_mandatory_values=['Other (please specify)']),
Field(name="tone_properties_other", type="text", title="*If Other, please specify:*", mandatory=False),
#Field(name="sarcasm", type="likert_radio",
# title="Does the patient use sarcasm in their responses to the therapist?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="agression", type="likert_radio",
# title="Does the patient express verbal aggression (e.g., hostile tone, blaming, threatening language)?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="humor", type="likert_radio",
# title="Does the patient use humor, jokes, or lighthearted comments (not sarcasm) to communicate or cope?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="empathetic", type="likert_radio",
# title="Does the patient show understanding, concern, or emotional attunement—either toward the therapist or others mentioned in the session?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="controlling", type="likert_radio",
# title="Does the patient attempt to control the direction, pace, or content of the session (e.g., interrupting, redirecting, dismissing the therapist’s input)?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="defiant", type="likert_radio",
# title="Does the patient openly resist, challenge, or reject the therapist’s suggestions, interpretations, or authority?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="defensive", type="likert_radio",
# title="Does the patient react protectively or justify themselves when faced with feedback, interpretations, or questions about their behavior?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="self-critical", type="likert_radio",
# title="Does the patient make negative or harsh judgments about themselves (e.g., “I’m worthless,” “It’s all my fault”)?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="blaming", type="likert_radio",
# title="Does the patient attribute their problems or emotions to other people or external circumstances?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="insightful", type="likert_radio",
# title="Does the patient demonstrate awareness of their own patterns, motivations, or emotions?",
# other_params={"labels": degree_labels}, mandatory=True),
#Field(name="expressive", type="likert_radio",
# title="Does the patient openly convey emotions?",
# other_params={"labels": degree_labels}, mandatory=True),
]),
####--- END EDIT MARKER
]
fields1: List[Field] = [
#Field(name="patient", type="input_col", title=" "),
Field(type="markdown", title="", mandatory=False, other_params={
"instruction_content": True,
"content": "### 2. Annotation of True-to-Patient Properties\n ##### Instructions: Please read the patient's role description carefully, then answer the questions below.\n "
},),
Field(type="expander", title="**Annotation Guidelines** *(expand)*", children=[
Field(type="markdown", title="", mandatory=False, other_params={"use_guidelines": True}),
]),
Field(type="markdown", title="", mandatory=False, other_params={"use_roledesc_name": True}),
Field(type="expander", title="**Session Transcription:** *(expand)*", children=[
Field(name="dialogue_name", type="input_col", title=""),
]),
####--- EDIT MARKER: True-To-Patient Properties
# Field(type="container", title="##### Overlap with role description", children=[
# Field(name="emotion", type="likert_radio",
# title="To what extent did the simulated patient’s emotional expressions (e.g., frustration, sadness, guardedness) align with those expected for this role?",
# other_params={"labels": degree_labels}, mandatory=True),
# Field(name="conversationalStyle", type="likert_radio",
# title="How well did the patient consistently exhibit the conversational style they were assigned, and did this feel realistic compared to actual patients with this style?",
# other_params={"labels": degree_labels}, mandatory=True),
# Field(name="maladaptive", type="likert_radio",
# title="How accurately did the patient’s statements reflect distorted thoughts consistent with the underlying cognitive model?",
# other_params={"labels": degree_labels}, mandatory=True),
# Field(name="fidelity", type="likert_radio",
# title="Overall, how closely did the patient reflect real patients in terms of realism, variability, and challenge during the session?",
# other_params={"labels": degree_labels}, mandatory=True),
# ]),
# FIDELITY:
Field(type="container", title="##### Resemblance to real patients/Realism of patient portrayal", children=[
Field(name="resemblence", type="likert_radio",
title="The simulated patient resembles a **real patient**", other_params={"labels": degree_labels}, mandatory=True),
Field(name="reaction", type="likert_radio",
title="The simulated patient **reacts naturally** during the consultation", other_params={"labels": degree_labels}, mandatory=True),
Field(name="authenticity", type="likert_radio",
title="The simulated patient appears **authentic**.", other_params={"labels": degree_labels}, mandatory=True),
#Field(name="questions", type="likert_radio",
# title="The simulated patient answers questions in a **natural manner**.", other_params={"labels": degree_labels}, mandatory=True),
Field(name="physical_complaints", type="likert_radio",
title="The simulated patient portrays **physical complaints** realistically.", other_params={"labels": degree_labels}, mandatory=True),
Field(name="emotional_complaints", type="likert_radio",
title="The simulated patient portrays **psychological/emotional complaints** realistically", other_params={"labels": degree_labels}, mandatory=True),
]),
# ACCURACY
Field(type="container", title="##### Overlap with role description", children=[
# 1. Played well
Field(name="played_well", type="likert_radio",
title="**1. The simulated patient portrayed the role as expected based on the role description.**", other_params={"labels": degree_labels}, mandatory=True),
Field(name="played_well_properties", type="multiselect",
title="Select properties from the session that that contribute to your rating *(Multiple selection possible)*",
other_params={'choices': accuracy_contributor_labels}, mandatory=True, following_mandatory_values=['Other (please specify)']),
Field(name="played_well_properties_other", type="text", title="*If Other, please specify:*", mandatory=False),
# 2. Knew well
Field(name="knew_well", type="likert_radio",
title="**2. The simulated patient understood their role well.**", other_params={"labels": degree_labels}, mandatory=True),
Field(name="knew_well_properties", type="multiselect",
title="Select properties from the session that that contribute to your rating *(Multiple selection possible)*",
other_params={'choices': accuracy_contributor_labels}, mandatory=True, following_mandatory_values=['Other (please specify)']),
Field(name="knew_well_properties_other", type="text", title="*If Other, please specify:*", mandatory=False),
# 3. Withhold
Field(name="withhold", type="likert_radio",
title="**3. The simulated patient seemed to withhold information unnecessarily.**", other_params={"labels": degree_labels}, mandatory=True),
Field(name="withhold_properties", type="multiselect",
title="Select properties from the session that that contribute to your rating *(Multiple selection possible)*",
other_params={'choices': accuracy_contributor_labels}, mandatory=True, following_mandatory_values=['Other (please specify)']),
Field(name="withhold_properties_other", type="text", title="*If Other, please specify:*", mandatory=False),
# 4. Stayed in role well
Field(name="stayed_in_role", type="likert_radio",
title="**4. The simulated patient did not diverge from their role throughout the session.**", other_params={"labels": degree_labels}, mandatory=True),
Field(name="stayed_in_role_properties", type="multiselect",
title="Select properties from the session that contribute to your rating *(Multiple selection possible)*",
other_params={'choices': accuracy_contributor_labels}, mandatory=True, following_mandatory_values=['Other (please specify)']),
Field(name="stayed_in_role_other", type="text", title="*If Other, please specify:*", mandatory=False),
## Too much like 1. and 4.
# 5. Stayed in role always
#Field(name="stayed_in_role_always", type="likert_radio",
# title="**5. The simulated patient *maintained* in his/her role all the time", other_params={"labels": degree_labels}, mandatory=True),
#Field(name="stayed_in_role_always_properties", type="multiselect",
# title="Select traits that support your rating *(Multiple selection possible)*",
# other_params={'choices': accuracy_contributor_labels}, mandatory=True, following_mandatory_values=['Other (please specify)']),
#Field(name="stayed_in_role_always_other", type="text", title="*If Other, please specify:*", mandatory=False),
]),
####--- END EDIT MARKER
####--- EDIT MARKER: Interpersonal therapeutic competence
# Field(type="container", title="#### Interpersonal therapeutic competence", children=[
# Field(name="v_expressiveness", type="likert_radio",
# title="**Verbal expressiveness.** How fluent, clear, and confident is the person’s verbal communication (regardless of content)?",
# other_params={'labels': ['Very unclear','Unclear','Average','Clear','Very Clear']},
# mandatory=True, following_mandatory_values=[1]),
# Field(name="hope", type="likert_radio",
# title="**Hope and positive expectation.** To what extent does the person convey optimism, confidence, and positive expectations for the patient’s future or therapy?",
# other_params={'labels': ['Hopeless','Discouraging','Neutral','Hopeful','Very hopeful']},
# mandatory=True, following_mandatory_values=[1]),
# Field(name="credible", type="likert_radio",
# title="**Ability to be credible and convincing.** How credible and convincing is the person when presenting a new perspective or interpretation to the patient?",
# other_params={'labels': ['Unconvincing','Weak','Neutral','Convincing','Very convincing']},
# mandatory=True, following_mandatory_values=[1]),
# Field(name="e_expressiveness", type="likert_radio",
# title="**Emotional expressiveness.** How well does the person’s voice and manner convey emotional engagement and intensity (without being hostile)?",
# other_params={'labels': ['Flat','Low','Moderate','Expressive','Very expressive']},
# mandatory=True, following_mandatory_values=[1]),
# Field(name="acceptance", type="likert_radio",
# title="**Acceptance, understanding, and warmth.** To what extent does the person show care, acceptance, and warmth toward the patient (without judgment)?",
# other_params={'labels': ['Cold','Limited','Neutral','Warm','Very warm']},
# mandatory=True, following_mandatory_values=[1]),
# Field(name="empathy", type="likert_radio",
# title="**Empathy.** How well does the person demonstrate an accurate, deeper understanding of the patient’s subjective experience?",
# other_params={'labels': ['Distorted','Superficial','Partial','Accurate','Deep']},
# mandatory=True, following_mandatory_values=[1]),
# Field(name="alliance", type="likert_radio",
# title="**Ability to form alliances.** How effectively does the person create a collaborative “working together” atmosphere with the patient?",
# other_params={'labels': ['Blocking','Weak','Moderate','Cooperative','Strong']},
# mandatory=True, following_mandatory_values=[1]),
# Field(name="tensions", type="likert_radio",
# title="**Addressing tensions and crises.** How effectively does the person acknowledge and work through interpersonal tensions or crises in the interaction?",
# other_params={'labels': ['Avoiding','Poor','Partial','Productive','Resolving']},
# mandatory=True, following_mandatory_values=[1]),
# ]),
####--- END EDIT MARKER
Field(type="container", title="##### Additional Comments *(optional)*", children=[
Field(name="other_comments", type="text", title="Please provide any additional details or information:", mandatory=False),
]),
]
STEPS: List[List[Field]] = [fields0, fields1]
INPUT_FIELD_DEFAULT_VALUES = {
'slider': 0,
'text': '',
'textarea': '',
'checkbox': False,
'radio': None,
'select_slider': 0,
'multiselect': [],
'likert_radio': None,
'y_n_radio': None
}
SHOW_HELP_ICON = False
SHOW_VALIDATION_ERROR_MESSAGE = True
# Optional convenience functions, if you really want to "call" them:
def get_steps() -> List[List[Field]]:
"""Return the list of pages to show."""
return STEPS
def get_input_defaults() -> dict:
return INPUT_FIELD_DEFAULT_VALUES |