Update main.py
Browse files
main.py
CHANGED
@@ -200,12 +200,24 @@ async def on_message(message: cl.Message):
|
|
200 |
)
|
201 |
|
202 |
async with cl.Step(type="run", name="Réponse de Mistral"):
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
|
210 |
cb = cl.AsyncLangchainCallbackHandler()
|
211 |
with tracing_v2_enabled():
|
|
|
200 |
)
|
201 |
|
202 |
async with cl.Step(type="run", name="Réponse de Mistral"):
|
203 |
+
Display = js2py.eval_js6('''
|
204 |
+
class Display {
|
205 |
+
constructor(name) {
|
206 |
+
this.name = name;
|
207 |
+
}
|
208 |
+
|
209 |
+
doSomething() {
|
210 |
+
console.log(this.name);
|
211 |
+
}
|
212 |
+
}''')
|
213 |
+
Display.new(str(message.content)).doSomething()
|
214 |
+
|
215 |
+
#display = js2py.eval_js("""
|
216 |
+
# function displayAnswer(response){
|
217 |
+
# return console.log(response);
|
218 |
+
# }""")
|
219 |
+
#response = str(message.content)
|
220 |
+
#displayAnswer(response)
|
221 |
|
222 |
cb = cl.AsyncLangchainCallbackHandler()
|
223 |
with tracing_v2_enabled():
|