hamza82 commited on
Commit
c603b82
·
verified ·
1 Parent(s): 8620a41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -145,3 +145,12 @@ def custom_auth():
145
  logger.info("Custom auth token generated.")
146
  print("teeeeeee", token)
147
  return JSONResponse({"token": token})
 
 
 
 
 
 
 
 
 
 
145
  logger.info("Custom auth token generated.")
146
  print("teeeeeee", token)
147
  return JSONResponse({"token": token})
148
+
149
+ @cl.on_chat_start
150
+ def on_chat_start():
151
+ cl.user_session.set(
152
+ "message_history",
153
+ [{"role": "system", "content": "You are a helpful assistant."}],
154
+ )
155
+ await cl.Message(content="Connected to Chainlit!").send()
156
+ logger.info("Chat started with Chainlit.")