|
@@ -29,8 +29,11 @@ app.add_middleware(
|
|
|
# max_age=1000
|
|
|
)
|
|
|
|
|
|
+DEFAULT_DB_PATH = os.path.join("knowledge_db")
|
|
|
+DEFAULT_PERSIST_PATH = os.path.join("vector_db", "chroma")
|
|
|
# 初始化你的Chat_QA_chain_self实例
|
|
|
-chat_qa_chain = Chat_QA_chain_self(file_path="./knowledge_db", persist_path="./vector_db/chroma")
|
|
|
+# chat_qa_chain = Chat_QA_chain_self(file_path="./knowledge_db", persist_path="./vector_db/chroma")
|
|
|
+chat_qa_chain = Chat_QA_chain_self(file_path=DEFAULT_DB_PATH, persist_path=DEFAULT_PERSIST_PATH)
|
|
|
|
|
|
@app.post('/clear/history')
|
|
|
async def clear_history():
|