MCPcopy Create free account
hub / github.com/google/adk-python / model_post_init

Method model_post_init

src/google/adk/workflow/_node.py:161–174  ·  view source on GitHub ↗
(self, __context: Any)

Source from the content-addressed store, hash-verified

159 _inner_node: base_node.BaseNode | None = PrivateAttr(default=None)
160
161 def model_post_init(self, __context: Any) -> None:
162 super().model_post_init(__context)
163 if self.parallel_worker:
164 # If parallel_worker is True, we wrap a clone of the current node
165 # in a _ParallelWorker. We disable parallel_worker on the clone
166 # to avoid infinite recursion when its run() method is called.
167 # The cloned node preserves the class identity and behavior of the
168 # original (essential for LlmAgent and Workflow subclasses).
169 worker_node = self.model_copy(update={"parallel_worker": False})
170
171 inner = parallel_worker_lib._ParallelWorker(node=worker_node)
172 self._inner_node = inner
173 # Synchronize rerun_on_resume with the inner node.
174 self.rerun_on_resume = inner.rerun_on_resume
175
176 @override
177 def model_copy(

Callers

nothing calls this directly

Calls 1

model_copyMethod · 0.95

Tested by

no test coverage detected