Spaces:
Sleeping
Sleeping
Commit
·
177f0a1
1
Parent(s):
e43e145
appending output information
Browse files
app.py
CHANGED
@@ -214,9 +214,14 @@ def send_message_call(message: str, history, knowledge_bases) -> Any:
|
|
214 |
data = response.json()
|
215 |
structure_run_id = data["structure_run_id"]
|
216 |
output = poll_structure(structure_run_id, headers)
|
217 |
-
|
|
|
|
|
218 |
else:
|
219 |
-
|
|
|
|
|
|
|
220 |
|
221 |
|
222 |
def poll_for_events(offset: int, structure_run_id: str, headers: dict):
|
|
|
214 |
data = response.json()
|
215 |
structure_run_id = data["structure_run_id"]
|
216 |
output = poll_structure(structure_run_id, headers)
|
217 |
+
output = output["output_task_output"]["value"]
|
218 |
+
output += f" \n UTC Timestamp: {data['created_at']}\n Structure ID: {structure_id} \n Run ID: {structure_run_id}"
|
219 |
+
return output
|
220 |
else:
|
221 |
+
data = response.json()
|
222 |
+
return (
|
223 |
+
f"Assistant Call Failed due to these errors: \n {','.join(data['errors'])} "
|
224 |
+
)
|
225 |
|
226 |
|
227 |
def poll_for_events(offset: int, structure_run_id: str, headers: dict):
|