Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -303,13 +303,17 @@ async def chat_profile():
|
|
303 |
]
|
304 |
),
|
305 |
]
|
306 |
-
|
|
|
|
|
|
|
|
|
|
|
307 |
@cl.on_message
|
308 |
async def main(message: cl.Message):
|
309 |
data = Chargement_des_datas(cl.user_session.get("chat_profile"))
|
310 |
-
client = Connexion_Mistral()
|
311 |
cl.user_session.set("data", data)
|
312 |
-
cl.user_session.
|
313 |
|
314 |
response = Generation_reponse(client, data, message.content)
|
315 |
|
|
|
303 |
]
|
304 |
),
|
305 |
]
|
306 |
+
|
307 |
+
@cl.on_chat_start
|
308 |
+
async def on_chat_start():
|
309 |
+
client = Connexion_Mistral()
|
310 |
+
cl.user_session.set("client", client)
|
311 |
+
|
312 |
@cl.on_message
|
313 |
async def main(message: cl.Message):
|
314 |
data = Chargement_des_datas(cl.user_session.get("chat_profile"))
|
|
|
315 |
cl.user_session.set("data", data)
|
316 |
+
cl.user_session.get("client")
|
317 |
|
318 |
response = Generation_reponse(client, data, message.content)
|
319 |
|