langchain-chatchat / copy_config_example.py
Zulelee's picture
Upload 16 files
8d50bff verified
raw
history blame
371 Bytes
# 用于批量将configs下的.example文件复制并命名为.py文件
import os
import shutil
if __name__ == "__main__":
files = os.listdir("configs")
src_files = [os.path.join("configs", file) for file in files if ".example" in file]
for src_file in src_files:
tar_file = src_file.replace(".example", "")
shutil.copy(src_file, tar_file)