koji commited on
Commit
8be58cc
·
1 Parent(s): e5de44a

modify the parse part to display run_log

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -23,9 +23,12 @@ def send_post_request(payload):
23
  if "error_message" in response_data:
24
  print("Error in response:", response_data["error_message"])
25
  return response_data["error_message"]
 
 
 
26
  else:
27
- print("Response received:", response_data)
28
- return response_data
29
 
30
  def send_message(text, chatbot):
31
  # Send POST request and get response
 
23
  if "error_message" in response_data:
24
  print("Error in response:", response_data["error_message"])
25
  return response_data["error_message"]
26
+ elif "protocol_name" in response_data:
27
+ print("Protocol executed successfully. Run log:", response_data["run_log"])
28
+ return response_data["run_log"]
29
  else:
30
+ print("Unexpected response:", response_data)
31
+ return "Unexpected response"
32
 
33
  def send_message(text, chatbot):
34
  # Send POST request and get response