File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed
Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 4545from api .db import FileType
4646
4747PROJECT_BASE = os .getenv ("RAG_PROJECT_BASE" ) or os .getenv ("RAG_DEPLOY_BASE" )
48- RAG_BASE = os .getenv ("RAG_BASE" )
4948
5049LOCK_KEY_pdfplumber = "global_shared_lock_pdfplumber"
5150if LOCK_KEY_pdfplumber not in sys .modules :
@@ -67,36 +66,6 @@ def get_project_base_directory(*args):
6766 return os .path .join (PROJECT_BASE , * args )
6867 return PROJECT_BASE
6968
70-
71- def get_rag_directory (* args ):
72- global RAG_BASE
73- if RAG_BASE is None :
74- RAG_BASE = os .path .abspath (
75- os .path .join (
76- os .path .dirname (os .path .realpath (__file__ )),
77- os .pardir ,
78- os .pardir ,
79- os .pardir ,
80- )
81- )
82- if args :
83- return os .path .join (RAG_BASE , * args )
84- return RAG_BASE
85-
86-
87- def get_rag_python_directory (* args ):
88- return get_rag_directory ("python" , * args )
89-
90-
91- def get_home_cache_dir ():
92- dir = os .path .join (os .path .expanduser ("~" ), ".ragflow" )
93- try :
94- os .mkdir (dir )
95- except OSError :
96- pass
97- return dir
98-
99-
10069@cached (cache = LRUCache (maxsize = 10 ))
10170def load_json_conf (conf_path ):
10271 if os .path .isabs (conf_path ):
You can’t perform that action at this time.
0 commit comments