Update app.py
Browse files
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 = {
|
124 |
-
|
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(
|