镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-07 06:56:48 +00:00
修复插件导入时的pytorch加载问题
这个提交包含在:
@@ -1,4 +1,5 @@
|
||||
from toolbox import HotReload # HotReload 的意思是热更新,修改函数插件后,不需要重启程序,代码直接生效
|
||||
from toolbox import trimmed_format_exc
|
||||
|
||||
|
||||
def get_crazy_functions():
|
||||
@@ -292,6 +293,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -316,6 +318,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -331,6 +334,7 @@ def get_crazy_functions():
|
||||
},
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -346,23 +350,24 @@ def get_crazy_functions():
|
||||
},
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
from crazy_functions.图片生成 import 图片生成, 图片生成_DALLE3
|
||||
from crazy_functions.图片生成 import 图片生成_DALLE2, 图片生成_DALLE3
|
||||
function_plugins.update({
|
||||
"图片生成(先切换模型到openai或api2d)": {
|
||||
"图片生成_DALLE2 (先切换模型到openai或api2d)": {
|
||||
"Group": "对话",
|
||||
"Color": "stop",
|
||||
"AsButton": False,
|
||||
"AdvancedArgs": True, # 调用时,唤起高级参数输入区(默认False)
|
||||
"ArgsReminder": "在这里输入分辨率, 如1024x1024(默认),支持 256x256, 512x512, 1024x1024", # 高级参数输入区的显示提示
|
||||
"Info": "使用DALLE2生成图片 | 输入参数字符串,提供图像的内容",
|
||||
"Function": HotReload(图片生成)
|
||||
"Function": HotReload(图片生成_DALLE2)
|
||||
},
|
||||
})
|
||||
function_plugins.update({
|
||||
"图片生成_DALLE3(先切换模型到openai或api2d)": {
|
||||
"图片生成_DALLE3 (先切换模型到openai或api2d)": {
|
||||
"Group": "对话",
|
||||
"Color": "stop",
|
||||
"AsButton": False,
|
||||
@@ -373,6 +378,7 @@ def get_crazy_functions():
|
||||
},
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -389,6 +395,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -403,6 +410,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -418,6 +426,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -433,6 +442,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -448,6 +458,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -461,6 +472,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -505,6 +517,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -522,6 +535,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -535,6 +549,7 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
try:
|
||||
@@ -548,17 +563,22 @@ def get_crazy_functions():
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
from crazy_functions.多智能体 import 多智能体终端
|
||||
function_plugins.update({
|
||||
"AutoGen多智能体终端(仅供测试)": {
|
||||
"Group": "智能体",
|
||||
"Color": "stop",
|
||||
"AsButton": False,
|
||||
"Function": HotReload(多智能体终端)
|
||||
}
|
||||
})
|
||||
try:
|
||||
from crazy_functions.多智能体 import 多智能体终端
|
||||
function_plugins.update({
|
||||
"AutoGen多智能体终端(仅供测试)": {
|
||||
"Group": "智能体",
|
||||
"Color": "stop",
|
||||
"AsButton": False,
|
||||
"Function": HotReload(多智能体终端)
|
||||
}
|
||||
})
|
||||
except:
|
||||
print(trimmed_format_exc())
|
||||
print('Load function plugin failed')
|
||||
|
||||
# try:
|
||||
# from crazy_functions.chatglm微调工具 import 微调数据集生成
|
||||
|
||||
在新工单中引用
屏蔽一个用户