Роутер работает нормально в process v2
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from tests.pipeline_setup_v4.executors.process_v2_router_executor import ProcessV2IntentRouterExecutor
|
||||
|
||||
|
||||
class ExecutorRegistry:
|
||||
def __init__(self) -> None:
|
||||
self._router_executor: ProcessV2IntentRouterExecutor | None = None
|
||||
|
||||
def execute(self, component: str, case) -> object:
|
||||
if component == "process_v2_intent_router":
|
||||
return self._router().execute(case)
|
||||
raise ValueError(f"Unsupported component: {component}")
|
||||
|
||||
def _router(self) -> ProcessV2IntentRouterExecutor:
|
||||
if self._router_executor is None:
|
||||
self._router_executor = ProcessV2IntentRouterExecutor()
|
||||
return self._router_executor
|
||||
Reference in New Issue
Block a user