mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
15 lines
474 B
Python
15 lines
474 B
Python
from temporalio import workflow
|
|
from .tool_workflow import ToolWorkflow, CombinedInput, ToolWorkflowParams
|
|
|
|
|
|
@workflow.defn
|
|
class ParentWorkflow:
|
|
@workflow.run
|
|
async def run(self, some_input: dict) -> dict:
|
|
combined_input = CombinedInput(
|
|
tool_params=ToolWorkflowParams(None, None), tools_data=some_input
|
|
)
|
|
child = workflow.start_child_workflow(ToolWorkflow.run, combined_input)
|
|
result = await child
|
|
return result
|