Spaces:
Runtime error
Runtime error
Update chain_app.py
Browse files- chain_app.py +56 -33
chain_app.py
CHANGED
|
@@ -69,6 +69,29 @@ async def chat_profile():
|
|
| 69 |
cl.ChatProfile(
|
| 70 |
name="neural-brain-AI",
|
| 71 |
markdown_description="The main model of neural brain",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
),
|
| 73 |
# cl.ChatProfile(
|
| 74 |
# name="Dorna-AI",
|
|
@@ -234,40 +257,40 @@ async def chat_profile():
|
|
| 234 |
# # )
|
| 235 |
]
|
| 236 |
|
| 237 |
-
@cl.set_chat_profiles
|
| 238 |
-
async def chat_profile(current_user: cl.User):
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
|
| 272 |
@cl.on_chat_start
|
| 273 |
async def on_chat_start():
|
|
|
|
| 69 |
cl.ChatProfile(
|
| 70 |
name="neural-brain-AI",
|
| 71 |
markdown_description="The main model of neural brain",
|
| 72 |
+
starters=[
|
| 73 |
+
cl.Starter(
|
| 74 |
+
label="Morning routine ideation",
|
| 75 |
+
message="Can you help me create a personalized morning routine that would help increase my productivity throughout the day? Start by asking me about my current habits and what activities energize me in the morning.",
|
| 76 |
+
icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/idea.svg",
|
| 77 |
+
),
|
| 78 |
+
|
| 79 |
+
cl.Starter(
|
| 80 |
+
label="Explain superconductors",
|
| 81 |
+
message="Explain superconductors like I'm five years old.",
|
| 82 |
+
icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/learn.svg",
|
| 83 |
+
),
|
| 84 |
+
cl.Starter(
|
| 85 |
+
label="Python script for daily email reports",
|
| 86 |
+
message="Write a script to automate sending daily email reports in Python, and walk me through how I would set it up.",
|
| 87 |
+
icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/terminal.svg",
|
| 88 |
+
),
|
| 89 |
+
cl.Starter(
|
| 90 |
+
label="Text inviting friend to wedding",
|
| 91 |
+
message="Write a text asking a friend to be my plus-one at a wedding next month. I want to keep it super short and casual, and offer an out.",
|
| 92 |
+
icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/write.svg",
|
| 93 |
+
)
|
| 94 |
+
]
|
| 95 |
),
|
| 96 |
# cl.ChatProfile(
|
| 97 |
# name="Dorna-AI",
|
|
|
|
| 257 |
# # )
|
| 258 |
]
|
| 259 |
|
| 260 |
+
# @cl.set_chat_profiles
|
| 261 |
+
# async def chat_profile(current_user: cl.User):
|
| 262 |
+
# chat_profile = cl.user_session.get("chat_profile")
|
| 263 |
+
# if chat_profile is not None:
|
| 264 |
+
# return [
|
| 265 |
+
# cl.ChatProfile(
|
| 266 |
+
# name="My Chat Profile",
|
| 267 |
+
# icon="https://picsum.photos/250",
|
| 268 |
+
# markdown_description="The underlying LLM model is **GPT-3.5**, a *175B parameter model* trained on 410GB of text data.",
|
| 269 |
+
# starters=[
|
| 270 |
+
# cl.Starter(
|
| 271 |
+
# label="Morning routine ideation",
|
| 272 |
+
# message="Can you help me create a personalized morning routine that would help increase my productivity throughout the day? Start by asking me about my current habits and what activities energize me in the morning.",
|
| 273 |
+
# icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/idea.svg",
|
| 274 |
+
# ),
|
| 275 |
|
| 276 |
+
# cl.Starter(
|
| 277 |
+
# label="Explain superconductors",
|
| 278 |
+
# message="Explain superconductors like I'm five years old.",
|
| 279 |
+
# icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/learn.svg",
|
| 280 |
+
# ),
|
| 281 |
+
# cl.Starter(
|
| 282 |
+
# label="Python script for daily email reports",
|
| 283 |
+
# message="Write a script to automate sending daily email reports in Python, and walk me through how I would set it up.",
|
| 284 |
+
# icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/terminal.svg",
|
| 285 |
+
# ),
|
| 286 |
+
# cl.Starter(
|
| 287 |
+
# label="Text inviting friend to wedding",
|
| 288 |
+
# message="Write a text asking a friend to be my plus-one at a wedding next month. I want to keep it super short and casual, and offer an out.",
|
| 289 |
+
# icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/write.svg",
|
| 290 |
+
# )
|
| 291 |
+
# ]
|
| 292 |
+
# )
|
| 293 |
+
# ]
|
| 294 |
|
| 295 |
@cl.on_chat_start
|
| 296 |
async def on_chat_start():
|