philmui commited on
Commit
f8b0dc9
1 Parent(s): cfdb7b7

removing initial queries

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -51,21 +51,21 @@ async def start():
51
  ).send()
52
 
53
  content = ""
54
- if _semantic_rag_chain is not None:
55
- try:
56
- response1 = _semantic_rag_chain.invoke({"question": DEFAULT_QUESTION1})
57
- response2 = _semantic_rag_chain.invoke({"question": DEFAULT_QUESTION2})
58
 
59
- content = (
60
- f"**Question**: {DEFAULT_QUESTION1}\n\n"
61
- f"{response1['response'].content}\n\n"
62
- f"**Question**: {DEFAULT_QUESTION2}\n\n"
63
- f"{response2['response'].content}\n\n"
64
- )
65
- except Exception as e:
66
- _logger.error(f"init error: {e}")
67
 
68
- cl.user_session.set("message_history", [{"role": "system", "content": "Welcome to the chat!"}])
69
  await cl.Message(
70
  content=content + "\nHow can I help you with Meta's 2023 10K?"
71
  ).send()
 
51
  ).send()
52
 
53
  content = ""
54
+ # if _semantic_rag_chain is not None:
55
+ # try:
56
+ # response1 = _semantic_rag_chain.invoke({"question": DEFAULT_QUESTION1})
57
+ # response2 = _semantic_rag_chain.invoke({"question": DEFAULT_QUESTION2})
58
 
59
+ # content = (
60
+ # f"**Question**: {DEFAULT_QUESTION1}\n\n"
61
+ # f"{response1['response'].content}\n\n"
62
+ # f"**Question**: {DEFAULT_QUESTION2}\n\n"
63
+ # f"{response2['response'].content}\n\n"
64
+ # )
65
+ # except Exception as e:
66
+ # _logger.error(f"init error: {e}")
67
 
68
+ cl.user_session.set("message_history", [{"role": "system", "content": "You are a helpful assistant. "}])
69
  await cl.Message(
70
  content=content + "\nHow can I help you with Meta's 2023 10K?"
71
  ).send()