camparchimedes commited on
Commit
2b8e181
ยท
verified ยท
1 Parent(s): af33f81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -174,8 +174,8 @@ async def handle_message(message: cl.Message):
174
  bestillingskode = match.group()
175
  post_data = {
176
  "url": endpoint_url,
177
- "data": {
178
- "booking_id": bestillingskode
179
  }
180
  }
181
 
@@ -187,7 +187,7 @@ async def handle_message(message: cl.Message):
187
  if response:
188
 
189
  booking_data = json.loads(response)
190
- postman_response = f"""
191
  | Field | Value |
192
  |-------|--------|
193
  | Booking ID | {booking_data['booking_id']} |
@@ -200,7 +200,7 @@ async def handle_message(message: cl.Message):
200
  | Info | {booking_data['infotext']} |
201
  | Included | {booking_data['included']} |
202
  """
203
- await cl.Message(postman_response).send()
204
 
205
  else:
206
  response = await llm_chain.ainvoke(
 
174
  bestillingskode = match.group()
175
  post_data = {
176
  "url": endpoint_url,
177
+ "body": {
178
+ "booking_id": bestillingskode
179
  }
180
  }
181
 
 
187
  if response:
188
 
189
  booking_data = json.loads(response)
190
+ booking_data = f"""
191
  | Field | Value |
192
  |-------|--------|
193
  | Booking ID | {booking_data['booking_id']} |
 
200
  | Info | {booking_data['infotext']} |
201
  | Included | {booking_data['included']} |
202
  """
203
+ await cl.Message(booking_data).send()
204
 
205
  else:
206
  response = await llm_chain.ainvoke(