Spaces:
Sleeping
Sleeping
removing starting tests
Browse files
app.py
CHANGED
@@ -50,24 +50,25 @@ async def start():
|
|
50 |
name="User",
|
51 |
url="https://media.architecturaldigest.com/photos/5f241de2c850b2a36b415024/master/w_1600%2Cc_limit/Luke-logo.png"
|
52 |
).send()
|
53 |
-
|
54 |
-
content = ""
|
55 |
-
if _semantic_rag_chain is not None:
|
56 |
-
try:
|
57 |
-
response1 = _semantic_rag_chain.invoke({"question": DEFAULT_QUESTION1})
|
58 |
-
response2 = _semantic_rag_chain.invoke({"question": DEFAULT_QUESTION2})
|
59 |
-
|
60 |
-
content = (
|
61 |
-
f"**Question**: {DEFAULT_QUESTION1}\n\n"
|
62 |
-
f"{response1['response'].content}\n\n"
|
63 |
-
f"**Question**: {DEFAULT_QUESTION2}\n\n"
|
64 |
-
f"{response2['response'].content}\n\n"
|
65 |
-
)
|
66 |
-
except Exception as e:
|
67 |
-
_logger.error(f"init error: {e}")
|
68 |
|
69 |
cl.user_session.set("message_history", [{"role": "system", "content": "You are a helpful assistant. "}])
|
70 |
await cl.Message(
|
71 |
-
content=
|
72 |
).send()
|
73 |
_logger.info(f"{20 * '*'}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
name="User",
|
51 |
url="https://media.architecturaldigest.com/photos/5f241de2c850b2a36b415024/master/w_1600%2Cc_limit/Luke-logo.png"
|
52 |
).send()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
cl.user_session.set("message_history", [{"role": "system", "content": "You are a helpful assistant. "}])
|
55 |
await cl.Message(
|
56 |
+
content="How can I help you with Meta's 2023 10K?"
|
57 |
).send()
|
58 |
_logger.info(f"{20 * '*'}")
|
59 |
+
|
60 |
+
|
61 |
+
# --------- For testing ---------
|
62 |
+
# content = ""
|
63 |
+
# if _semantic_rag_chain is not None:
|
64 |
+
# try:
|
65 |
+
# response1 = _semantic_rag_chain.invoke({"question": DEFAULT_QUESTION1})
|
66 |
+
# response2 = _semantic_rag_chain.invoke({"question": DEFAULT_QUESTION2})
|
67 |
+
# content = (
|
68 |
+
# f"**Question**: {DEFAULT_QUESTION1}\n\n"
|
69 |
+
# f"{response1['response'].content}\n\n"
|
70 |
+
# f"**Question**: {DEFAULT_QUESTION2}\n\n"
|
71 |
+
# f"{response2['response'].content}\n\n"
|
72 |
+
# )
|
73 |
+
# except Exception as e:
|
74 |
+
# _logger.error(f"init error: {e}")
|