后端添加cache;前端改动agents

This commit is contained in:
2024-12-30 19:45:48 +08:00
parent 34e25633ba
commit 99301d7b3d
19 changed files with 90 additions and 348 deletions

View File

@@ -283,14 +283,14 @@ def get_uv_latest_file():
import os
import glob
# UV数据缓存文件夹路径 (请将此路径修改为实际的文件夹路径)
current_folder = os.path.dirname(os.path.abspath(__file__))
current_folder = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
folder_path = os.path.join(current_folder, 'data/UV/')
# 查找文件夹中的所有 .wls 文件
uv_files = sorted(glob.glob(os.path.join(folder_path, '*.[Tt][Xx][Tt]')))
if not uv_files:
res = "ERROR: 缓存文件夹中没有找到任何UV文件"
res = f"ERROR: 缓存文件夹{current_folder}中没有找到任何UV文件"
return res
# 找到最新修改的文件
@@ -366,14 +366,14 @@ def get_pl_latest_file():
import glob
# PL数据缓存文件夹路径 (请将此路径修改为实际的文件夹路径)
current_folder = os.getcwd()
folder_path = os.path.join(current_folder, 'data/UV/')
current_folder = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
folder_path = os.path.join(current_folder, 'data/PL/')
# 查找文件夹中的所有 .txt 或 .TXT 文件
pl_files = sorted(glob.glob(os.path.join(folder_path, '*.[Tt][Xx][Tt]')))
if not pl_files:
res = "ERROR: 缓存文件夹中没有找到任何PL文件"
res = f"ERROR: 缓存文件夹{current_folder}中没有找到任何PL文件"
return res
# 找到最新修改的文件