-
Notifications
You must be signed in to change notification settings - Fork 52
[flight-booking-agent] Add multi-turn chat, cancel action, sleep & approval tools #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updated instructions for cloning the repository.
* feat: add nuxt example * lockfile
Update nextJS to patched versions and update workflows to beta-27
* basic express + workflow * proper express w/nitro * add workflow to transcode audio * remove fluent-static in place of system ffmpeg * use sandbox to run ffmpeg * use streams over buffers * Update readme + wav handling * rename output * update readme * update typo + upgrade workflow * convert to multi-steps * separate sandbox impl into streams * update tsconfig + imports * remove middleware * update readme and fix * update readme * update readme * update readme * tweaks --------- Co-authored-by: Adrian Lam <[email protected]>
Signed-off-by: Peter Wielander <[email protected]>
Signed-off-by: Peter Wielander <[email protected]>
Signed-off-by: Peter Wielander <[email protected]>
Signed-off-by: Peter Wielander <[email protected]>
Signed-off-by: Peter Wielander <[email protected]>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
|
||
| // If we have output, the approval has been processed | ||
| if (output) { | ||
| try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
|
|
||
| const handleSubmit = async (approved: boolean) => { | ||
| setIsSubmitting(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| async function executeBookingApproval( | ||
| { | ||
| flightNumber, | ||
| passengerName, | ||
| }: { flightNumber: string; passengerName: string; price: number }, | ||
| { toolCallId }: { toolCallId: string } | ||
| ) { | ||
| // Note: No "use step" here - hooks are workflow-level primitives | ||
| // Use the toolCallId as the hook token so the UI can reference it | ||
| const hook = bookingApprovalHook.create({ token: toolCallId }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| async function executeBookingApproval( | |
| { | |
| flightNumber, | |
| passengerName, | |
| }: { flightNumber: string; passengerName: string; price: number }, | |
| { toolCallId }: { toolCallId: string } | |
| ) { | |
| // Note: No "use step" here - hooks are workflow-level primitives | |
| // Use the toolCallId as the hook token so the UI can reference it | |
| const hook = bookingApprovalHook.create({ token: toolCallId }); | |
| async function executeBookingApproval({ | |
| flightNumber, | |
| passengerName, | |
| }: { | |
| flightNumber: string; | |
| passengerName: string; | |
| price: number; | |
| }) { | |
| // Note: No "use step" here - hooks are workflow-level primitives | |
| // The Workflow framework automatically manages the hook token and associates it with the tool call | |
| const hook = bookingApprovalHook.create(); |
The executeBookingApproval function signature expects a second parameter { toolCallId }, but the Vercel AI SDK framework only passes a single parameter (the input object) to tool execute functions.
|
Superseeded by #23 |
Superseeded by #23