容忍tex文件的缺失
This commit is contained in:
parent
b88e577eb5
commit
a14ef78d52
@ -539,18 +539,18 @@ def get_crazy_functions():
|
||||
except:
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
from crazy_functions.多智能体 import 多智能体终端
|
||||
function_plugins.update({
|
||||
"多智能体终端(微软AutoGen)": {
|
||||
"Group": "智能体",
|
||||
"Color": "stop",
|
||||
"AsButton": True,
|
||||
"Function": HotReload(多智能体终端)
|
||||
}
|
||||
})
|
||||
except:
|
||||
print('Load function plugin failed')
|
||||
# try:
|
||||
# from crazy_functions.多智能体 import 多智能体终端
|
||||
# function_plugins.update({
|
||||
# "多智能体终端(微软AutoGen)": {
|
||||
# "Group": "智能体",
|
||||
# "Color": "stop",
|
||||
# "AsButton": True,
|
||||
# "Function": HotReload(多智能体终端)
|
||||
# }
|
||||
# })
|
||||
# except:
|
||||
# print('Load function plugin failed')
|
||||
|
||||
# try:
|
||||
# from crazy_functions.chatglm微调工具 import 微调数据集生成
|
||||
|
@ -308,7 +308,10 @@ def merge_tex_files_(project_foler, main_file, mode):
|
||||
fp = os.path.join(project_foler, f)
|
||||
fp_ = find_tex_file_ignore_case(fp)
|
||||
if fp_:
|
||||
with open(fp_, 'r', encoding='utf-8', errors='replace') as fx: c = fx.read()
|
||||
try:
|
||||
with open(fp_, 'r', encoding='utf-8', errors='replace') as fx: c = fx.read()
|
||||
except:
|
||||
c = f"\n\nWarning from GPT-Academic: LaTex source file is missing!\n\n"
|
||||
else:
|
||||
raise RuntimeError(f'找不到{fp},Tex源文件缺失!')
|
||||
c = merge_tex_files_(project_foler, c, mode)
|
||||
|
Loading…
x
Reference in New Issue
Block a user