瀏覽代碼

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

yulongyan_citu 7 月之前
父節點
當前提交
d4c6731840
共有 1 個文件被更改,包括 4 次插入1 次删除
  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():