Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Oct 8, 2024
1 parent 78f4067 commit deade59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/tutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const machine = setup({
input: 'Say something in Spanish:',
onDone: {
actions: assign({
conversation: ({ context }) =>
context.conversation.concat(`User: ` + x.event.output),
conversation: ({ context, event }) =>
context.conversation.concat(`User: ` + event.output),
}),
target: 'ai',
},
Expand Down Expand Up @@ -81,8 +81,8 @@ const machine = setup({
respond: {
actions: [
assign({
conversation: ({ context }) =>
context.conversation.concat(`Agent: ` + x.event.response),
conversation: ({ context, event }) =>
context.conversation.concat(`Agent: ` + event.response),
}),
log(({ event }) => event.response),
],
Expand Down

0 comments on commit deade59

Please sign in to comment.