Update app.py
Browse files
app.py
CHANGED
@@ -155,27 +155,18 @@ async def handle_message(message: cl.Message):
|
|
155 |
|
156 |
if match:
|
157 |
bestillingskode = match.group()
|
158 |
-
|
159 |
post_data = {
|
160 |
-
"
|
161 |
"body": {
|
162 |
"booking_id": bestillingskode
|
163 |
}
|
164 |
}
|
165 |
-
|
166 |
-
response = await post_tool.
|
167 |
json.dumps(post_data),
|
168 |
-
|
169 |
-
|
170 |
)
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
await cl.Message(content=str(response)).send()
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
else:
|
180 |
response = await llm_chain.ainvoke(user_message, callbacks=[cl.AsyncLangchainCallbackHandler()])
|
181 |
|
|
|
155 |
|
156 |
if match:
|
157 |
bestillingskode = match.group()
|
|
|
158 |
post_data = {
|
159 |
+
"url": endpoint_url,
|
160 |
"body": {
|
161 |
"booking_id": bestillingskode
|
162 |
}
|
163 |
}
|
164 |
+
|
165 |
+
response = await post_tool.acall(
|
166 |
json.dumps(post_data),
|
167 |
+
callbacks=[cl.AsyncLangchainCallbackHandler()]
|
|
|
168 |
)
|
169 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
else:
|
171 |
response = await llm_chain.ainvoke(user_message, callbacks=[cl.AsyncLangchainCallbackHandler()])
|
172 |
|