浏览代码

Merge pull request #1734 from darlanalves/env-docs-dir

feat: allow a docs directory coming from env
Timothy Jaeryang Baek 1 年之前
父节点
当前提交
ddf06329a5
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      backend/config.py

+ 2 - 2
backend/config.py

@@ -220,7 +220,7 @@ Path(CACHE_DIR).mkdir(parents=True, exist_ok=True)
 # Docs DIR
 ####################################
 
-DOCS_DIR = f"{DATA_DIR}/docs"
+DOCS_DIR = os.getenv("DOCS_DIR", f"{DATA_DIR}/docs")
 Path(DOCS_DIR).mkdir(parents=True, exist_ok=True)
 
 
@@ -476,7 +476,7 @@ When answer to user:
 - If you don't know when you are not sure, ask for clarification.
 Avoid mentioning that you obtained the information from the context.
 And answer according to the language of the user's question.
-        
+
 Given the context information, answer the query.
 Query: [query]"""