camparchimedes commited on
Commit
584f31b
·
verified ·
1 Parent(s): c9644a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
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.acall(
127
- ({
128
  "url": endpoint_url,
129
  "method": "POST",
130
  "headers": headers,
131
- "body": {"booking_id": booking_id
132
- }),
133
- callbacks=[cl.AsyncLangchainCallbackHandler()])
 
 
 
 
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: