camparchimedes commited on
Commit
06c9b55
·
verified ·
1 Parent(s): fece0d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -116,13 +116,15 @@ async def handle_message(message: cl.Message):
116
  api_chain = cl.user_session.get("api_chain")
117
 
118
  booking_pattern = r'\b[A-Z]{6}\d{6}\b'
119
- endpoint_url = "https://aivisions.no/data/daysoff/api/v1/booking/"
120
 
121
  if re.search(booking_pattern, user_message):
122
  booking_id = re.search(booking_pattern, user_message).group(0)
123
- headers = {"Authorization": f"{auth_token}"
124
- #question = f"Retrieve information for booking ID {booking_id}"
125
-
 
 
126
  # --------------------------------AD VAL.III--------------------------------
127
 
128
  response = await api_chain.acall(
 
116
  api_chain = cl.user_session.get("api_chain")
117
 
118
  booking_pattern = r'\b[A-Z]{6}\d{6}\b'
119
+ #endpoint_url = "https://aivisions.no/data/daysoff/api/v1/booking/"
120
 
121
  if re.search(booking_pattern, user_message):
122
  booking_id = re.search(booking_pattern, user_message).group(0)
123
+ headers = {
124
+ "Authorization": auth_token,
125
+ "Content-Type": "application/json"
126
+ }
127
+
128
  # --------------------------------AD VAL.III--------------------------------
129
 
130
  response = await api_chain.acall(