Ben Burtenshaw commited on
Commit
cf42313
1 Parent(s): 3683e65

fix defaults being replaced

Browse files
Files changed (1) hide show
  1. defaults.py +6 -0
defaults.py CHANGED
@@ -19,8 +19,14 @@ with open(SEED_DATA_PATH) as f:
19
 
20
  DEFAULT_DOMAIN = DEFAULT_DATA["domain"]
21
  DEFAULT_PERSPECTIVES = DEFAULT_DATA["perspectives"]
 
 
22
  DEFAULT_TOPICS = DEFAULT_DATA["topics"]
 
 
23
  DEFAULT_EXAMPLES = DEFAULT_DATA["examples"]
 
 
24
  DEFAULT_SYSTEM_PROMPT = DEFAULT_DATA["domain_expert_prompt"]
25
 
26
  ################################################
 
19
 
20
  DEFAULT_DOMAIN = DEFAULT_DATA["domain"]
21
  DEFAULT_PERSPECTIVES = DEFAULT_DATA["perspectives"]
22
+ if DEFAULT_PERSPECTIVES is None or len(DEFAULT_PERSPECTIVES) == 0:
23
+ DEFAULT_PERSPECTIVES = [""]
24
  DEFAULT_TOPICS = DEFAULT_DATA["topics"]
25
+ if DEFAULT_TOPICS is None or len(DEFAULT_TOPICS) == 0:
26
+ DEFAULT_TOPICS = [""]
27
  DEFAULT_EXAMPLES = DEFAULT_DATA["examples"]
28
+ if DEFAULT_EXAMPLES is None or len(DEFAULT_EXAMPLES) == 0:
29
+ DEFAULT_EXAMPLES = [{"question": "", "answer": ""}]
30
  DEFAULT_SYSTEM_PROMPT = DEFAULT_DATA["domain_expert_prompt"]
31
 
32
  ################################################