Spaces:
Paused
Paused
Carlosito16
commited on
Commit
•
9944d30
1
Parent(s):
3663bf7
Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,11 @@ prompt_template = """
|
|
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 |
-
|
|
|
|
|
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 |
|
45 |
|
@@ -139,7 +142,7 @@ def retrieve_document(query_input):
|
|
139 |
|
140 |
|
141 |
def retrieve_answer():
|
142 |
-
prompt_answer= st.session_state.my_text_input
|
143 |
answer = qa_retriever.run(prompt_answer)
|
144 |
log = {"timestamp": datetime.datetime.now(),
|
145 |
"question":st.session_state.my_text_input,
|
|
|
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 |
+
|
42 |
+
|
43 |
+
|
44 |
When encountering abusive, offensive, or harmful language, such as fuck, bitch,etc, just politely ask the users to maintain appropriate behaviours.
|
45 |
+
Always make sure to elaborate your response and use vibrant, positive tone to represent good branding of the school.
|
46 |
Never answer with any unfinished response.
|
47 |
|
48 |
|
|
|
142 |
|
143 |
|
144 |
def retrieve_answer():
|
145 |
+
prompt_answer= st.session_state.my_text_input
|
146 |
answer = qa_retriever.run(prompt_answer)
|
147 |
log = {"timestamp": datetime.datetime.now(),
|
148 |
"question":st.session_state.my_text_input,
|