I notice that the python versions and typescript versions are pretty different. Python is sort of class based, with python magic decorators
class MyWorkflow(Workflow):
@step
async def start(self, ctx: Context, ev: StartEvent) -> MyEvent:
num_runs = await ctx.get("num_runs", default=0)
whereas TS is sort of builder/function based import { createWorkflow } from "@llamaindex/workflow-core";
const convertEvent = workflowEvent();
const workflow = createWorkflow();
workflow.handle([startEvent], (start) => {
return convertEvent.with(Number.parseInt(start.data, 10));
Is there reason for this?
});
Edit: whoops, it is Friday! Gave myself a long weekend, and was just default thinking it is Saturday.