Parcourir la source

提交修改默认报错返回内容

yulongyan_citu il y a 7 mois
Parent
commit
d4c6731840
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      app.py

+ 4 - 1
app.py

@@ -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():