AISparking commited on
Commit
c3846ff
·
verified ·
1 Parent(s): 41d3f98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -18,12 +18,8 @@ client = OpenAI(
18
  print("Client initialized.")
19
 
20
  SYSTEM_PROMPTS = os.getenv("SYSTEM_PROMPTS")
21
- print("\n-----------------------------------\n")
22
- # Convert the JSON string (SYSTEM_PROMPTS) back to a Python dictionary
23
- if SYSTEM_PROMPTS:
24
- my_dict = json.loads(SYSTEM_PROMPTS)
25
- print(my_dict)
26
- print("\n-----------------------------------\n")
27
 
28
  def respond(
29
  message,
 
18
  print("Client initialized.")
19
 
20
  SYSTEM_PROMPTS = os.getenv("SYSTEM_PROMPTS")
21
+ import ast
22
+ text_dict = ast.literal_eval(text) # Convert string back to dictionary
 
 
 
 
23
 
24
  def respond(
25
  message,