Skip to content

Commit

Permalink
chat history fixed
Browse files Browse the repository at this point in the history
cool!
  • Loading branch information
chinesewebman committed May 19, 2023
1 parent 4152290 commit 107d555
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, model_name, temperature, vectors):
#Follow-up entry: {question}
#Standalone question:"""

cq_template_with_keywords = """"===Given the following chat history and follow-up questions, if the follow-up question is a complete sentence,
cq_template_with_keywords = """"===Given the following chat history and follow-up question, if the follow-up question is a complete sentence,
copy the follow-up question as a standalone question, and if the follow-up question is not a complete sentence or a complete question,
complete it as a standalone question about the given keywords with reference to the chat history in Chinese or user-specified language.
===
Expand All @@ -58,7 +58,7 @@ def __init__(self, model_name, temperature, vectors):
keywords:{keywords}
standalone question:"""

cq_template = """"===Given the following chat history and follow-up questions, if the follow-up question is a complete sentence,
cq_template = """"===Given the following chat history and follow-up question, if the follow-up question is a complete sentence,
copy the follow-up question as a standalone question as-is, and if the follow-up question is not a complete sentence
or a complete question, complete it as a standalone question with reference to the chat history in Chinese or user-specified language.
===
Expand Down
1 change: 1 addition & 0 deletions src/modules/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def show_file_selecotr(self, data_directory, history):
def reset_history():
history.reset(st.session_state["selected_file"])
history.initialize_assistant_history(st.session_state["selected_file"])
st.success("聊天已重置!")
filelist=[]
for root, dirs, files in os.walk(data_directory):
for file in files:
Expand Down

0 comments on commit 107d555

Please sign in to comment.