camparchimedes
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -191,7 +191,7 @@ async def handle_message(message: cl.Message):
|
|
191 |
try:
|
192 |
booking_data = json.loads(response)
|
193 |
|
194 |
-
|
195 |
| Field | Value |
|
196 |
|-------|--------|
|
197 |
| Booking ID | {booking_data.get('booking_id', 'N/A')} |
|
@@ -204,7 +204,7 @@ async def handle_message(message: cl.Message):
|
|
204 |
| Info | {booking_data.get('infotext', 'N/A')} |
|
205 |
| Included | {booking_data.get('included', 'N/A')} |
|
206 |
"""
|
207 |
-
await cl.Message(
|
208 |
|
209 |
except json.JSONDecodeError:
|
210 |
await cl.Message(f"Error: Non-JSON response received. Raw response: {response}").send()
|
|
|
191 |
try:
|
192 |
booking_data = json.loads(response)
|
193 |
|
194 |
+
table = f"""
|
195 |
| Field | Value |
|
196 |
|-------|--------|
|
197 |
| Booking ID | {booking_data.get('booking_id', 'N/A')} |
|
|
|
204 |
| Info | {booking_data.get('infotext', 'N/A')} |
|
205 |
| Included | {booking_data.get('included', 'N/A')} |
|
206 |
"""
|
207 |
+
await cl.Message(table).send()
|
208 |
|
209 |
except json.JSONDecodeError:
|
210 |
await cl.Message(f"Error: Non-JSON response received. Raw response: {response}").send()
|