Samarth991 commited on
Commit
bb281da
·
verified ·
1 Parent(s): 037c2d9

Update QA_Bot.py

Browse files
Files changed (1) hide show
  1. QA_Bot.py +2 -2
QA_Bot.py CHANGED
@@ -3,7 +3,7 @@ from QnA import Q_A
3
  import re,time
4
 
5
 
6
- def QA_Bot(vectorstore):
7
  st.title("Q&A Bot")
8
  # Initialize chat history
9
  if "messages" not in st.session_state:
@@ -21,7 +21,7 @@ def QA_Bot(vectorstore):
21
  # Add user message to chat history
22
  st.session_state.messages.append({"role": "user", "content": prompt})
23
 
24
- ai_response = Q_A(vectorstore,prompt)
25
  response = f"Echo: {ai_response}"
26
  # Display assistant response in chat message container
27
  with st.chat_message("assistant"):
 
3
  import re,time
4
 
5
 
6
+ def QA_Bot(vectorstore,API_KEY=None):
7
  st.title("Q&A Bot")
8
  # Initialize chat history
9
  if "messages" not in st.session_state:
 
21
  # Add user message to chat history
22
  st.session_state.messages.append({"role": "user", "content": prompt})
23
 
24
+ ai_response = Q_A(vectorstore,prompt,API_KEY)
25
  response = f"Echo: {ai_response}"
26
  # Display assistant response in chat message container
27
  with st.chat_message("assistant"):