forked from lucastononro/llm-food-delivery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignatures.json
168 lines (168 loc) · 8.87 KB
/
signatures.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[
{
"name": "get_restaurant_pages",
"description": "This function finds a restaurant that has similar food or name to what the user is asking for. Not all the restaurants found are necessarily the best option for the user, use the description of the restaurant as a proxy to suggest it to them.",
"parameters": {
"type": "object",
"properties": {
"name_of_restaurant": {
"type": "string",
"description": "Not mandatory. The name of the restaurant. In case the user didn't specify it in the request, it should be set to null."
},
"type_of_restaurant": {
"type": "string",
"description": "The type of food or restaurant that the user requested. E.g. Italian, Pizza, Sushi, Indian, Vegan, etc..."
},
"food_requested": {
"type": "array",
"description": "Not mandatory. The array of foods that the user requested. E.g. Pizza, Pasta, etc... . In case the user didn't specify it in the request, it should be set to [null].",
"items": {
"type": "string"
}
},
"quantity": {
"type": "integer",
"description": "Not mandatory. The amount of restaurants you judge its preferable to search in order to serve the user. It should be default to 1, however if the user request is broad you should set 2,3,4 or even 5"
},
"other_information": {
"type": "string",
"description": "All other information that the user provided that could potentially help finding the best matching restaurant for them. In case there aren't any information, set it to null"
}
}
},
"required": [
"name_of_restaurant",
"type_of_restaurant",
"food_requested",
"other_information",
"quantity"
]
},
{
"name": "open_restaurant_page",
"description": "This function opens the page of a given restaurant, it can only open one restaurant at a time. Always confirm with the user that you are going to search and open a restaurant page with the information provided before calling the function. This function can only be called after the function get_restaurant_pages.",
"parameters": {
"type": "object",
"properties": {
"restaurant_uuid": {
"type": "string",
"description": "The number of the restaurant page that comes in the function get_restaurant_pages previously called"
}
}
},
"required": [
"restaurant_uuid"
]
},
{
"name": "close_restaurant_page",
"description": "This function closes the page of a given restaurant and goes back to the main page (menu with all the restaurants) x. This function can be called if a restaurant page is already open, you can check the recent actions with get_user_actions to verify it, before calling the function",
"parameters": {
"type": "object",
"properties": {}
}
},
{
"name": "get_user_actions",
"description": "This function returns the list of the latest 10 user actions. This function should be called when you need to collect more information about what were the latest actions the user of the chatbot interface, like what is the current opened restaurant, what is the current state of the shopping cart, etc... Very often it is best to call this function before calling some other functions",
"parameters": {
"type": "object",
"properties": {}
}
},
{
"name": "get_menu_of_restaurant",
"description": "This function returns the list of the menu of a given restaurant. This function should be called when you need to collect more information about what is the menu of a given restaurant. Very often it is best to get the recent actions before calling this function, so you can know what is the restaurant uuid that you need to pass to this function. Always after calling this function create a short-list of suggestions based on the chat history with the user, displaying name, description and price of the given food",
"parameters": {
"type": "object",
"properties": {
"restaurant_uuid": {
"type": "string",
"description": "The id of the restaurant page that comes in the function get_restaurant_pages previously called, or in the get_user_actions function if the user opened a restaurant page"
}
}
},
"required": [
"restaurant_uuid"
]
},
{
"name": "add_food_to_cart",
"description": "This function adds food to the user's shopping cart. It should only be called if you have the information of the restaurant_id, food_id and amount (quantity) of the food the user is referring to. You can get more information of the restaurant_id opened in the users interface by calling the get_user_actions and you can get the food_id by calling the get_menu_of_restaurant function. You can call this function multiple times in a row if there are several food items to be added",
"parameters": {
"type": "object",
"properties": {
"restaurant_uuid": {
"type": "string",
"description": "The id of the restaurant page that comes in the function get_restaurant_pages previously called, or in the get_user_actions function if the user opened a restaurant page"
},
"food_id": {
"type": "string",
"description": "The id of the food that comes in the function get_menu_of_restaurant previously called"
},
"quantity": {
"type": "integer",
"description": "The quantity of the food that the user wants to add to the cart"
}
}
},
"required": [
"restaurant_uuid",
"food_id",
"quantity"
]
},
{
"name": "remove_food_from_cart",
"description": "This function removes food from the user's shopping cart. It should only be called if you have the information of the restaurant_id and food_id of the food the user is referring to. You can get more information of the restaurant_id opened in the users interface by calling the get_user_actions and you can get the food_id by calling the get_menu_of_restaurant function. You can call this function multiple times in a row if there are several food items to be removed",
"parameters": {
"type": "object",
"properties": {
"restaurant_uuid": {
"type": "string",
"description": "The id of the restaurant page that comes in the function get_restaurant_pages previously called, or in the get_user_actions function if the user opened a restaurant page. Make sure you know all the parameters before calling this function. Call auxiliary functions before calling it, if necessary."
},
"food_id": {
"type": "string",
"description": "The id of the food that comes in the function get_menu_of_restaurant previously called"
}
}
},
"required": [
"restaurant_uuid",
"food_id"
]
},
{
"name": "open_shopping_cart",
"description": "This function opens the shopping cart of the user. It should be called if the user wants it, or if you need more information about the items in the shopping cart",
"parameters": {
"type": "object",
"properties": {}
}
},
{
"name": "close_shopping_cart",
"description": "This function closes the shopping cart of the user. It should be called if the user wants it, or after placing an order",
"parameters": {
"type": "object",
"properties": {}
}
},
{
"name": "place_order",
"description": "This function places an order with the food items that the user has in the shopping cart. It should be called if the user specifies or confirms that they want to place an order",
"parameters": {
"type": "object",
"properties": {}
}
},
{
"name": "activate_handsfree",
"description": "This function activates a handsfree chat experience where you are always answering by voice to the user interface",
"parameters": {
"type": "object",
"properties": {}
}
}
]