From 1075a1c0e43175c3e474eac34e29e23184a00b25 Mon Sep 17 00:00:00 2001 From: Stefan Krawczyk Date: Thu, 5 Dec 2024 11:14:56 -0800 Subject: [PATCH] Fixes parallelism action() typos The signature was not correct. --- docs/concepts/parallelism.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/concepts/parallelism.rst b/docs/concepts/parallelism.rst index 9253f068..a24ca3ca 100644 --- a/docs/concepts/parallelism.rst +++ b/docs/concepts/parallelism.rst @@ -372,7 +372,7 @@ This looks as follows: class TestMultiplePromptsWithSubgraph(MapStates): - def action(self) -> Action | Callable | RunnableGraph: + def action(self, state: State, inputs: Dict[str, Any]) -> Action | Callable | RunnableGraph: return runnable_graph @property @@ -478,7 +478,7 @@ Specifying it as part of the action -- will override the global executor (note t class TestMultiplePrompts(MapStates): - def action(self) -> Action | Callable | RunnableGraph: + def action(self, state: State, inputs: Dict[str, Any]) -> Action | Callable | RunnableGraph: return runnable_graph def executor(self) -> Executor: @@ -533,7 +533,7 @@ You can also disable it globally using the application builder: class TestMultiplePrompts(MapStates): - def action(self) -> Action | Callable | RunnableGraph: + def action(self, state: State, inputs: Dict[str, Any]) -> Action | Callable | RunnableGraph: return runnable_graph def tracker(self, context) -> TrackingBehavior | None: