mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
refactor, date context
This commit is contained in:
14
workflows/parent_workflow.py
Normal file
14
workflows/parent_workflow.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user