update function name and requirements.txt

This commit is contained in:
littlepanda0716 2023-04-03 19:13:05 +08:00
parent f0250eef38
commit ca902e1a7b
1 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ def init_knowledge_vector_store(filepath):
return vector_store
def get_wiki_agent_answer(query, vector_store, chat_history=[]):
def get_knowledge_based_answer(query, vector_store, chat_history=[]):
system_template = """基于以下内容,简洁和专业的来回答用户的问题。
如果无法从中得到答案请说 "不知道" "没有足够的相关信息"不要试图编造答案答案请使用中文
----------------
@ -64,7 +64,7 @@ if __name__ == "__main__":
history = []
while True:
query = input("Input your question 请输入问题:")
resp, history = get_wiki_agent_answer(query=query,
vector_store=vector_store,
chat_history=history)
resp, history = get_knowledge_based_answer(query=query,
vector_store=vector_store,
chat_history=history)
print(resp)