diff --git a/1_chain.ts b/1_chain.ts index 357bca0..cea1468 100644 --- a/1_chain.ts +++ b/1_chain.ts @@ -1,5 +1,4 @@ -import { createWorkflow } from "@llama-flow/core"; -import { workflowEvent } from "@llama-flow/core"; +import { createWorkflow, workflowEvent } from "@llama-flow/core"; import { pipeline } from "node:stream/promises"; ////////// define the workflow @@ -32,7 +31,7 @@ sendEvent(startEvent.with("I am some data")); // Process the stream to get the result const result = await pipeline(stream, async function (source) { for await (const event of source) { - console.log(`Event: ${event.data}`); + console.log(`Event: ${event} ${event.data}`); if (stopEvent.include(event)) { return `Result: ${event.data}`; } diff --git a/2_route.ts b/2_route.ts index e7b6449..79d9197 100644 --- a/2_route.ts +++ b/2_route.ts @@ -1,5 +1,4 @@ -import { createWorkflow } from "@llama-flow/core"; -import { workflowEvent } from "@llama-flow/core"; +import { createWorkflow, workflowEvent } from "@llama-flow/core"; import { pipeline } from "node:stream/promises"; ////////// define the workflow