Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -153,25 +153,6 @@ async def handle_message(message: cl.Message):
|
|
153 |
},
|
154 |
callbacks=[cl.AsyncLangchainCallbackHandler()])
|
155 |
|
156 |
-
booking_info = response.get("output", {}) # json.loads(response.get("output", "{}"))
|
157 |
-
|
158 |
-
formatted_response = f"""
|
159 |
-
Her er informasjon for bestillingskode: {bestillingskode}
|
160 |
-
|
161 |
-
| Felt | Detaljer |
|
162 |
-
|-------------|----------------------------------------|
|
163 |
-
| Navn: | {booking_info.get('Navn', 'N/A')} |
|
164 |
-
| Belรธp: | {booking_info.get('Belรธp', 'N/A')} NOK |
|
165 |
-
| Check-In: | {booking_info.get('Checkin', 'N/A')} |
|
166 |
-
| Check-Out: | {booking_info.get('Checkout', 'N/A')} |
|
167 |
-
| Addresse: | {booking_info.get('Addresse', 'N/A')} |
|
168 |
-
| Bruker ID: | {booking_info.get('Bruker ID', 'N/A')} |
|
169 |
-
| Viktig informasjon: | {booking_info.get('Viktig informasjon', 'N/A')} |
|
170 |
-
| Message: | {booking_info.get('Message', 'N/A')} |
|
171 |
-
"""
|
172 |
-
|
173 |
-
await cl.Message(content=formatted_response).send()
|
174 |
-
|
175 |
else:
|
176 |
response = await llm_chain.acall(user_message, callbacks=[cl.AsyncLangchainCallbackHandler()])
|
177 |
|
|
|
153 |
},
|
154 |
callbacks=[cl.AsyncLangchainCallbackHandler()])
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
else:
|
157 |
response = await llm_chain.acall(user_message, callbacks=[cl.AsyncLangchainCallbackHandler()])
|
158 |
|