ww commited on
Commit
d10e90d
·
1 Parent(s): 8bcebd6
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -26,14 +26,14 @@ def generate_response(
26
  ):
27
  print('=====================')
28
  print(type(history))
29
- jsonObject = ""
30
  try:
31
- jsonObject = json.loads(system_prompt)
32
  except ValueError:
33
- print("system_prompt not a json")
34
 
35
- if isinstance(jsonObject,list):
36
- history = jsonObject
37
  print("system_prompt as history")
38
  else:
39
  print(type(system_prompt))
 
26
  ):
27
  print('=====================')
28
  print(type(history))
29
+ listObject = ""
30
  try:
31
+ listObject = list(system_prompt)
32
  except ValueError:
33
+ print("system_prompt not a list")
34
 
35
+ if isinstance(listObject,list):
36
+ history = listObject
37
  print("system_prompt as history")
38
  else:
39
  print(type(system_prompt))