diff --git a/main/xiaozhi-server/core/providers/tools/server_plugins/plugin_executor.py b/main/xiaozhi-server/core/providers/tools/server_plugins/plugin_executor.py index e9194e5a..728493ec 100644 --- a/main/xiaozhi-server/core/providers/tools/server_plugins/plugin_executor.py +++ b/main/xiaozhi-server/core/providers/tools/server_plugins/plugin_executor.py @@ -57,6 +57,13 @@ class ServerPluginExecutor(ToolExecutor): config_functions = self.config["Intent"][ self.config["selected_module"]["Intent"] ].get("functions", []) + + # 转换为列表 + if not isinstance(config_functions, list): + try: + config_functions = list(config_functions) + except TypeError: + config_functions = [] # 合并所有需要的函数 all_required_functions = list(set(necessary_functions + config_functions))