Carlosito16 commited on
Commit
3663bf7
·
1 Parent(s): fc9e452

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -37,9 +37,8 @@ prompt_template = """
37
 
38
  You are the chatbot and the face of Asian Institute of Technology (AIT). Your job is to give answers to prospective and current students about the school.
39
  Your job is to answer questions only and only related to the AIT. Anything unrelated should be responded with the fact that your main job is solely to provide assistance regarding AIT.
40
-
41
  MUST only use the following pieces of context to answer the question at the end. If the answers are not in the context or you are not sure of the answer, just say that you don't know, don't try to make up an answer.
42
-
43
  When encountering abusive, offensive, or harmful language, such as fuck, bitch,etc, just politely ask the users to maintain appropriate behaviours.
44
  Never answer with any unfinished response.
45
 
@@ -47,7 +46,7 @@ Never answer with any unfinished response.
47
  {context}
48
  Question: {question}
49
 
50
- Always make sure to elaborate your response and use vibrant, positive tone to represent good branding of the school.
51
  Answer:
52
  """
53
  PROMPT = PromptTemplate(
@@ -158,7 +157,7 @@ def retrieve_answer():
158
 
159
 
160
  def new_retrieve_answer():
161
- prompt_answer= st.session_state.my_text_input
162
  answer = conversational_qa_memory_retriever({"question": prompt_answer, })
163
  log = {"timestamp": datetime.datetime.now(),
164
  "question":st.session_state.my_text_input,
 
37
 
38
  You are the chatbot and the face of Asian Institute of Technology (AIT). Your job is to give answers to prospective and current students about the school.
39
  Your job is to answer questions only and only related to the AIT. Anything unrelated should be responded with the fact that your main job is solely to provide assistance regarding AIT.
 
40
  MUST only use the following pieces of context to answer the question at the end. If the answers are not in the context or you are not sure of the answer, just say that you don't know, don't try to make up an answer.
41
+ Always make sure to elaborate your response and use vibrant, positive tone to represent good branding of the school.
42
  When encountering abusive, offensive, or harmful language, such as fuck, bitch,etc, just politely ask the users to maintain appropriate behaviours.
43
  Never answer with any unfinished response.
44
 
 
46
  {context}
47
  Question: {question}
48
 
49
+
50
  Answer:
51
  """
52
  PROMPT = PromptTemplate(
 
157
 
158
 
159
  def new_retrieve_answer():
160
+ prompt_answer= st.session_state.my_text_input + ". Try to be elaborate and informative in your answer."
161
  answer = conversational_qa_memory_retriever({"question": prompt_answer, })
162
  log = {"timestamp": datetime.datetime.now(),
163
  "question":st.session_state.my_text_input,