Update app.py
Browse files
app.py
CHANGED
@@ -123,14 +123,18 @@ async def handle_message(message: cl.Message):
|
|
123 |
headers = {"Authorization": f"Bearer {auth_token}", "Content-Type": "application/json"}
|
124 |
|
125 |
# --------------------------------AD VAL.III--------------------------------
|
126 |
-
response = await api_chain.
|
127 |
-
|
128 |
"url": endpoint_url,
|
129 |
"method": "POST",
|
130 |
"headers": headers,
|
131 |
-
"body": {
|
132 |
-
|
133 |
-
|
|
|
|
|
|
|
|
|
134 |
# ----------------------------------------------------------------------
|
135 |
|
136 |
else:
|
|
|
123 |
headers = {"Authorization": f"Bearer {auth_token}", "Content-Type": "application/json"}
|
124 |
|
125 |
# --------------------------------AD VAL.III--------------------------------
|
126 |
+
response = await api_chain.ainvoke(
|
127 |
+
{
|
128 |
"url": endpoint_url,
|
129 |
"method": "POST",
|
130 |
"headers": headers,
|
131 |
+
"body": {
|
132 |
+
"booking_id": booking_id
|
133 |
+
}
|
134 |
+
},
|
135 |
+
callbacks=[cl.AsyncLangchainCallbackHandler()]
|
136 |
+
)
|
137 |
+
|
138 |
# ----------------------------------------------------------------------
|
139 |
|
140 |
else:
|