Skip to content

Commit 9d4064e

Browse files
committed
update workflow
1 parent c2db7f0 commit 9d4064e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

example/convex/workflows/chaining.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@ const workflow = new WorkflowManager(components.workflow);
5555

5656
export const weatherAgentWorkflow = workflow.define({
5757
args: { location: v.string(), threadId: v.string() },
58-
handler: async (step, { location, threadId }): Promise<void> => {
59-
const weatherQ = await saveMessage(step, components.agent, {
58+
handler: async (ctx, { location, threadId }): Promise<void> => {
59+
const weatherQ = await saveMessage(ctx, components.agent, {
6060
threadId,
6161
prompt: `What is the weather in ${location}?`,
6262
});
63-
const forecast = await step.runAction(
63+
const forecast = await ctx.runAction(
6464
internal.workflows.chaining.getForecast,
6565
{ promptMessageId: weatherQ.messageId, threadId },
6666
{ retry: true },
6767
);
68-
const fashionQ = await saveMessage(step, components.agent, {
68+
const fashionQ = await saveMessage(ctx, components.agent, {
6969
threadId,
7070
prompt: `What should I wear based on the weather?`,
7171
});
72-
const fashion = await step.runAction(
72+
const fashion = await ctx.runAction(
7373
internal.workflows.chaining.getFashionAdvice,
7474
{ promptMessageId: fashionQ.messageId, threadId },
7575
{

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"@ai-sdk/provider-utils": "3.0.14",
8888
"@convex-dev/rag": "0.6.0",
8989
"@convex-dev/rate-limiter": "0.3.0",
90-
"@convex-dev/workflow": "0.3.1",
90+
"@convex-dev/workflow": "0.3.2",
9191
"@edge-runtime/vm": "5.0.0",
9292
"@eslint/js": "9.38.0",
9393
"@hookform/resolvers": "5.2.2",

0 commit comments

Comments
 (0)