MCPcopy
hub / github.com/OpenBMB/UltraRAG / run

Function run

src/ultrarag/client.py:2089–2116  ·  view source on GitHub ↗

Run UltraRAG pipeline with given configuration. Args: config_path: Path to pipeline configuration file param_path: Optional path to parameter file return_all: Whether to return all intermediate results is_demo: Whether to run in demo mode Returns: Pi

(
    config_path: str,
    param_path: Optional[Union[str, Path]] = None,
    return_all: bool = False,
    is_demo: bool = False,
)

Source from the content-addressed store, hash-verified

2087
2088
2089async def run(
2090 config_path: str,
2091 param_path: Optional[Union[str, Path]] = None,
2092 return_all: bool = False,
2093 is_demo: bool = False,
2094) -> Any:
2095 """Run UltraRAG pipeline with given configuration.
2096
2097 Args:
2098 config_path: Path to pipeline configuration file
2099 param_path: Optional path to parameter file
2100 return_all: Whether to return all intermediate results
2101 is_demo: Whether to run in demo mode
2102
2103 Returns:
2104 Pipeline execution results
2105 """
2106
2107 log_server_banner(Path(config_path).stem)
2108
2109 context = load_pipeline_context(config_path, param_path)
2110
2111 client = create_mcp_client(context["mcp_cfg"])
2112
2113 async with client:
2114 result = await execute_pipeline(client, context, is_demo, return_all)
2115
2116 return result
2117
2118
2119logging.getLogger("mcp").setLevel(logging.WARNING)

Callers 1

mainFunction · 0.85

Calls 4

log_server_bannerFunction · 0.90
load_pipeline_contextFunction · 0.85
create_mcp_clientFunction · 0.85
execute_pipelineFunction · 0.85

Tested by

no test coverage detected