Artin2009 commited on
Commit
39bf971
1 Parent(s): 37a5bb4

Update chain_app.py

Browse files
Files changed (1) hide show
  1. chain_app.py +24 -19
chain_app.py CHANGED
@@ -66,25 +66,6 @@ async def chat_profile():
66
  cl.ChatProfile(
67
  name="neural-brain-AI",
68
  markdown_description="The main model of neural brain",
69
- starters = [
70
- cl.Starter(
71
- label="Morning routine ideation",
72
- 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.",
73
- ),
74
-
75
- cl.Starter(
76
- label="Explain superconductors",
77
- message="Explain superconductors like I'm five years old.",
78
- ),
79
- cl.Starter(
80
- label="Python script for daily email reports",
81
- message="Write a script to automate sending daily email reports in Python, and walk me through how I would set it up.",
82
- ),
83
- cl.Starter(
84
- label="Text inviting friend to wedding",
85
- 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.",
86
- )
87
- ]
88
  ),
89
  cl.ChatProfile(
90
  name="Dorna-AI",
@@ -250,6 +231,30 @@ async def chat_profile():
250
  # )
251
  ]
252
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  @cl.on_chat_start
254
  async def on_chat_start():
255
  chat_profile = cl.user_session.get("chat_profile")
 
66
  cl.ChatProfile(
67
  name="neural-brain-AI",
68
  markdown_description="The main model of neural brain",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  ),
70
  cl.ChatProfile(
71
  name="Dorna-AI",
 
231
  # )
232
  ]
233
 
234
+ @cl.set_chat_profiles
235
+ async def chat_profile(current_user: cl.User):
236
+ chat_profile = cl.user_session.get("chat_profile")
237
+ if chat_profile is not None:
238
+ return [
239
+ cl.ChatProfile(
240
+ name="My Chat Profile",
241
+ icon="https://picsum.photos/250",
242
+ markdown_description="The underlying LLM model is **GPT-3.5**, a *175B parameter model* trained on 410GB of text data.",
243
+ starters=[
244
+ cl.Starter(
245
+ label="Morning routine ideation",
246
+ 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.",
247
+ icon="/public/idea.svg",
248
+ ),
249
+ cl.Starter(
250
+ label="Explain superconductors",
251
+ message="Explain superconductors like I'm five years old.",
252
+ icon="/public/learn.svg",
253
+ ),
254
+ ],
255
+ )
256
+ ]
257
+
258
  @cl.on_chat_start
259
  async def on_chat_start():
260
  chat_profile = cl.user_session.get("chat_profile")