MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / load_plugins

Function load_plugins

trinity/utils/plugin_loader.py:14–23  ·  view source on GitHub ↗

Load plugin modules from the default plugin directory or directories specified in the environment variable. If the environment variable `PLUGIN_DIRS_ENV_VAR` is not set, it defaults to `trinity/plugins`.

()

Source from the content-addressed store, hash-verified

12
13
14def load_plugins() -> None:
15 """
16 Load plugin modules from the default plugin directory or directories specified in the environment variable.
17 If the environment variable `PLUGIN_DIRS_ENV_VAR` is not set, it defaults to `trinity/plugins`.
18 """
19 plugin_dirs = os.environ.get(PLUGIN_DIRS_ENV_VAR, "").split(os.pathsep)
20 if not plugin_dirs or plugin_dirs == [""]:
21 plugin_dirs = [str(Path(__file__).parent.parent / "plugins")]
22
23 load_plugin_from_dirs(plugin_dirs)
24
25
26def load_plugin_from_dirs(plugin_dirs: Union[str, List[str]]) -> None:

Callers 11

__init__Method · 0.90
debugFunction · 0.90
runFunction · 0.90
run_explorer_perfFunction · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90

Calls 2

load_plugin_from_dirsFunction · 0.85
getMethod · 0.45

Tested by 4

__init__Method · 0.72