Artin2009 commited on
Commit
22fbfd8
1 Parent(s): de1e889

Update chain_app.py

Browse files
Files changed (1) hide show
  1. chain_app.py +7 -2
chain_app.py CHANGED
@@ -95,6 +95,11 @@ async def chat_profile():
95
  @cl.on_chat_start
96
  async def on_chat_start():
97
  chat_profile = cl.user_session.get("chat_profile")
 
 
 
 
 
98
  if chat_profile == 'neural-brain-AI':
99
  await cl.ChatSettings(
100
  [
@@ -103,9 +108,9 @@ async def on_chat_start():
103
  label="NeuralBrain - Models",
104
  values=["Neural Brain AI"],
105
  initial_index=0,
106
- )
107
  ]
108
- ).send()
109
  await cl.Message(
110
  content="Hello, I am the main model of neural brain team, i am an instance of ChatGPT-4, This team finetuned me and i am ready to help you"
111
  ).send()
 
95
  @cl.on_chat_start
96
  async def on_chat_start():
97
  chat_profile = cl.user_session.get("chat_profile")
98
+ if not chat_profile:
99
+ await cl.Message(
100
+ content='please choose a model to start'
101
+ ).send()
102
+
103
  if chat_profile == 'neural-brain-AI':
104
  await cl.ChatSettings(
105
  [
 
108
  label="NeuralBrain - Models",
109
  values=["Neural Brain AI"],
110
  initial_index=0,
111
+ )
112
  ]
113
+ ).send()
114
  await cl.Message(
115
  content="Hello, I am the main model of neural brain team, i am an instance of ChatGPT-4, This team finetuned me and i am ready to help you"
116
  ).send()