MCPcopy Create free account
hub / github.com/KnowledgeXLab/LeanRAG / create_if_not_exist

Function create_if_not_exist

tools/utils.py:22–24  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

20 truncated_text = tokenizer.decode(tokens)
21 return truncated_text
22def create_if_not_exist(path):
23 if not os.path.exists(path): # 如果目录不存在,递归创建该目录
24 os.makedirs(path, exist_ok=True)
25
26def dicts_almost_equal(dict1, dict2, tolerance=1e-6):
27 # 比较字典时允许浮动误差

Callers 2

process_tripleFunction · 0.90
process_tripleFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected