koji
commited on
Commit
·
8be58cc
1
Parent(s):
e5de44a
modify the parse part to display run_log
Browse files
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("
|
28 |
-
return
|
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
|