Update main.py
Browse files
main.py
CHANGED
@@ -90,13 +90,7 @@ async def chat_profile():
|
|
90 |
|
91 |
@cl.on_chat_start
|
92 |
async def on_chat_start():
|
93 |
-
|
94 |
-
await cl.Message(f"Lien : {message.content}").send()
|
95 |
-
await cl.Message(f"Type : {message.type}").send()
|
96 |
-
if message.type == "system_message":
|
97 |
-
# do something with the message
|
98 |
-
await cl.Message(f"Lien : ").send()
|
99 |
-
return
|
100 |
|
101 |
#@cl.set_starters
|
102 |
#async def set_starters():
|
@@ -136,8 +130,13 @@ async def on_chat_start():
|
|
136 |
|
137 |
@cl.on_message
|
138 |
async def on_message(message: cl.Message):
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
141 |
model = await LLMistral()
|
142 |
retriever = await Retriever("videosTC")
|
143 |
########## Chain with streaming ##########
|
|
|
90 |
|
91 |
@cl.on_chat_start
|
92 |
async def on_chat_start():
|
93 |
+
await cl.Message(f"Bonjour").send()
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
#@cl.set_starters
|
96 |
#async def set_starters():
|
|
|
130 |
|
131 |
@cl.on_message
|
132 |
async def on_message(message: cl.Message):
|
133 |
+
if cl.context.session.client_type == "copilot":
|
134 |
+
await cl.Message(f"Type : {message.type}").send()
|
135 |
+
if message.type == "system_message":
|
136 |
+
# do something with the message
|
137 |
+
await cl.Message(f"Lien : ").send()
|
138 |
+
return
|
139 |
+
|
140 |
model = await LLMistral()
|
141 |
retriever = await Retriever("videosTC")
|
142 |
########## Chain with streaming ##########
|