Spaces:
Runtime error
Runtime error
Update chain_app.py
Browse files- chain_app.py +57 -30
chain_app.py
CHANGED
|
@@ -91,44 +91,72 @@ async def chat_profile():
|
|
| 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 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
# # cl.ChatProfile(
|
| 101 |
# # name='Image-Generation',
|
| 102 |
# # markdown_description='Our image generation model, has a performance like midjourney',
|
| 103 |
# # ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
# cl.ChatProfile(
|
| 105 |
-
# name="
|
| 106 |
-
# markdown_description="
|
| 107 |
-
# ),
|
| 108 |
-
# cl.ChatProfile(
|
| 109 |
-
# name="GPT-4",
|
| 110 |
-
# markdown_description="OpenAI's GPT-4 model",
|
| 111 |
-
# ),
|
| 112 |
-
# cl.ChatProfile(
|
| 113 |
-
# name="gpt-3.5-turbo",
|
| 114 |
-
# markdown_description="OpenAI's GPT-3.5 Turbo model",
|
| 115 |
-
# ),
|
| 116 |
-
# # cl.ChatProfile(
|
| 117 |
-
# # name="GPT-3.5-turbo-0125",
|
| 118 |
-
# # markdown_description="OpenAI's GPT-3.5 Turbo 0125 model",
|
| 119 |
-
# # ),
|
| 120 |
-
# cl.ChatProfile(
|
| 121 |
-
# name="gpt-3.5-turbo-1106",
|
| 122 |
-
# markdown_description="OpenAI's GPT-3.5 Turbo 1106 model",
|
| 123 |
# ),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
# # cl.ChatProfile(
|
| 125 |
# # name="davinci-002",
|
| 126 |
# # markdown_description="OpenAI's Davinci-002 model",
|
| 127 |
-
# # ),
|
| 128 |
-
# cl.ChatProfile(
|
| 129 |
-
# name="TTS",
|
| 130 |
-
# markdown_description="OpenAI's Text-to-Speech model",
|
| 131 |
# ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
# cl.ChatProfile(
|
| 133 |
# name="Qwen2-57B",
|
| 134 |
# markdown_description="Qwen second generation model with 57B parameters",
|
|
@@ -255,7 +283,6 @@ async def chat_profile():
|
|
| 255 |
# # name="Toka-353M",
|
| 256 |
# # markdown_description="PartAI Open Source model Toka with 353M parameters",
|
| 257 |
# # )
|
| 258 |
-
]
|
| 259 |
|
| 260 |
# @cl.set_chat_profiles
|
| 261 |
# async def chat_profile(current_user: cl.User):
|
|
@@ -308,9 +335,9 @@ async def on_chat_start():
|
|
| 308 |
)
|
| 309 |
]
|
| 310 |
).send()
|
| 311 |
-
await cl.Message(
|
| 312 |
-
|
| 313 |
-
).send()
|
| 314 |
|
| 315 |
if chat_profile == 'Dorna-AI':
|
| 316 |
await cl.ChatSettings(
|
|
|
|
| 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 |
),
|
| 97 |
+
cl.ChatProfile(
|
| 98 |
+
name="Dorna-AI",
|
| 99 |
+
markdown_description="One of the open-sourced models that neural brain team fine-tuned",
|
| 100 |
+
starters=[
|
| 101 |
+
cl.Starter(
|
| 102 |
+
label="Morning routine ideation",
|
| 103 |
+
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.",
|
| 104 |
+
icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/idea.svg",
|
| 105 |
+
),
|
| 106 |
+
|
| 107 |
+
cl.Starter(
|
| 108 |
+
label="Explain superconductors",
|
| 109 |
+
message="Explain superconductors like I'm five years old.",
|
| 110 |
+
icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/learn.svg",
|
| 111 |
+
),
|
| 112 |
+
cl.Starter(
|
| 113 |
+
label="Python script for daily email reports",
|
| 114 |
+
message="Write a script to automate sending daily email reports in Python, and walk me through how I would set it up.",
|
| 115 |
+
icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/terminal.svg",
|
| 116 |
+
),
|
| 117 |
+
cl.Starter(
|
| 118 |
+
label="Text inviting friend to wedding",
|
| 119 |
+
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.",
|
| 120 |
+
icon="https://chainlit-rag-copilot-r2xd.onrender.com/public/write.svg",
|
| 121 |
+
)
|
| 122 |
+
|
| 123 |
+
]
|
| 124 |
+
),
|
| 125 |
+
]
|
| 126 |
# # cl.ChatProfile(
|
| 127 |
# # name='Image-Generation',
|
| 128 |
# # markdown_description='Our image generation model, has a performance like midjourney',
|
| 129 |
# # ),
|
| 130 |
+
return [
|
| 131 |
+
cl.ChatProfile(
|
| 132 |
+
name="gpt4-o-mini",
|
| 133 |
+
markdown_description="The best state of the art openai model",
|
| 134 |
+
),
|
| 135 |
+
cl.ChatProfile(
|
| 136 |
+
name="GPT-4",
|
| 137 |
+
markdown_description="OpenAI's GPT-4 model",
|
| 138 |
+
),
|
| 139 |
+
cl.ChatProfile(
|
| 140 |
+
name="gpt-3.5-turbo",
|
| 141 |
+
markdown_description="OpenAI's GPT-3.5 Turbo model",
|
| 142 |
+
),
|
| 143 |
# cl.ChatProfile(
|
| 144 |
+
# name="GPT-3.5-turbo-0125",
|
| 145 |
+
# markdown_description="OpenAI's GPT-3.5 Turbo 0125 model",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
# ),
|
| 147 |
+
cl.ChatProfile(
|
| 148 |
+
name="gpt-3.5-turbo-1106",
|
| 149 |
+
markdown_description="OpenAI's GPT-3.5 Turbo 1106 model",
|
| 150 |
+
),
|
| 151 |
# # cl.ChatProfile(
|
| 152 |
# # name="davinci-002",
|
| 153 |
# # markdown_description="OpenAI's Davinci-002 model",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
# ),
|
| 155 |
+
cl.ChatProfile(
|
| 156 |
+
name="TTS",
|
| 157 |
+
markdown_description="OpenAI's Text-to-Speech model",
|
| 158 |
+
),
|
| 159 |
+
]
|
| 160 |
# cl.ChatProfile(
|
| 161 |
# name="Qwen2-57B",
|
| 162 |
# markdown_description="Qwen second generation model with 57B parameters",
|
|
|
|
| 283 |
# # name="Toka-353M",
|
| 284 |
# # markdown_description="PartAI Open Source model Toka with 353M parameters",
|
| 285 |
# # )
|
|
|
|
| 286 |
|
| 287 |
# @cl.set_chat_profiles
|
| 288 |
# async def chat_profile(current_user: cl.User):
|
|
|
|
| 335 |
)
|
| 336 |
]
|
| 337 |
).send()
|
| 338 |
+
# await cl.Message(
|
| 339 |
+
# 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"
|
| 340 |
+
# ).send()
|
| 341 |
|
| 342 |
if chat_profile == 'Dorna-AI':
|
| 343 |
await cl.ChatSettings(
|