File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export const assistant: CreateAssistantDTO | any = {
15
15
functions : [
16
16
{
17
17
name : "suggestShows" ,
18
+ async : true ,
18
19
description : "Suggests a list of broadway shows to the user." ,
19
20
parameters : {
20
21
type : "object" ,
Original file line number Diff line number Diff line change 1
1
import { shows } from "@/data/shows" ;
2
+ import { vapi } from "../../lib/vapi.sdk" ;
3
+ import { MessageTypeEnum } from "../../lib/types/conversation.type" ;
2
4
3
5
interface TicketProps {
4
6
type : "confirm" | "ticket" ;
@@ -11,6 +13,15 @@ function Ticket({
11
13
show = shows [ 0 ] ,
12
14
params = { } ,
13
15
} : TicketProps ) {
16
+ const confirmDetails = ( ) => {
17
+ vapi . send ( {
18
+ type : MessageTypeEnum . ADD_MESSAGE ,
19
+ message : {
20
+ role : "user" ,
21
+ content : `Looks good to me. Lets go ahead.` ,
22
+ } ,
23
+ } ) ;
24
+ } ;
14
25
return (
15
26
< div className = { `bg-slate-100 rounded-xl` } >
16
27
< div className = "container mx-auto px-4 py-8" >
@@ -49,6 +60,7 @@ function Ticket({
49
60
</ div >
50
61
{ type == "confirm" ? (
51
62
< button
63
+ onClick = { confirmDetails }
52
64
className = "bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline"
53
65
type = "button"
54
66
>
You can’t perform that action at this time.
0 commit comments