Spaces:
Build error
Build error
Update api_data.py
Browse files- api_data.py +13 -14
api_data.py
CHANGED
@@ -121,22 +121,21 @@ async def booking_agent_system(message: cl.Message, msg: cl.Message) -> bool:
|
|
121 |
#for token in combined_message.split():
|
122 |
#await msg.stream_token(token + " ")
|
123 |
|
124 |
-
|
125 |
-
"
|
126 |
-
|
127 |
-
f"
|
128 |
-
f"
|
129 |
-
f"
|
130 |
-
f"
|
131 |
-
f"
|
132 |
-
f"
|
133 |
-
f"
|
134 |
-
f"
|
|
|
135 |
)
|
136 |
#combined_message = f"### Informasjon for bestilling:\n\n{table}"
|
137 |
-
|
138 |
-
combined_message = f"### Informasjon for bestilling:\n\n{table}"
|
139 |
-
for token in combined_message.split():
|
140 |
await msg.stream_token(token + " ")
|
141 |
|
142 |
except (APIConnectionError, APIResponseError, BookingNotFoundError) as e:
|
|
|
121 |
#for token in combined_message.split():
|
122 |
#await msg.stream_token(token + " ")
|
123 |
|
124 |
+
markdown_table = (
|
125 |
+
"| ๐ญ๐๐๐๐
| ๐๐ป๐ณ๐ผ |\n"
|
126 |
+
"|:-----------|:---------------------|\n"
|
127 |
+
f"| ๐ฑ๐๐๐๐๐๐๐๐๐๐๐๐๐๐ | {booking_data.get('booking_id', 'N/A')} |\n"
|
128 |
+
f"| ๐๐ช๐ก๐ก ๐๐๐ข๐ | {booking_data.get('full_name', 'N/A')} |\n"
|
129 |
+
f"| ๐ผ๐ข๐ค๐ช๐ฃ๐ฉ | {booking_data.get('amount', 0)} kr |\n"
|
130 |
+
f"| ๐พ๐๐๐๐ -๐๐ฃ | {booking_data.get('checkin', 'N/A')} |\n"
|
131 |
+
f"| ๐พ๐๐๐๐ -๐ค๐ช๐ฉ | {booking_data.get('checkout', 'N/A')} |\n"
|
132 |
+
f"| ๐ผ๐๐๐ง๐๐จ๐จ | {booking_data.get('address', 'N/A')} |\n"
|
133 |
+
f"| ๐๐จ๐๐ง ๐๐ฟ | {booking_data.get('user_id', 0)} |\n"
|
134 |
+
f"| ๐๐ฃ๐๐ค ๐๐๐ญ๐ฉ | {booking_data.get('infotext', 'N/A')} |\n"
|
135 |
+
f"| ๐๐ฃ๐๐ก๐ช๐๐๐ | {booking_data.get('included', 'N/A')} |"
|
136 |
)
|
137 |
#combined_message = f"### Informasjon for bestilling:\n\n{table}"
|
138 |
+
for token in markdown_table.split():
|
|
|
|
|
139 |
await msg.stream_token(token + " ")
|
140 |
|
141 |
except (APIConnectionError, APIResponseError, BookingNotFoundError) as e:
|