Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.")
|