File size: 5,897 Bytes
879cd2c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
169
170
171
172
173
174
175
176
177
178
179
[
    {
        "type": "function",
        "function": {
            "name": "click",
            "description": "Click on a specific location on the screen",
            "parameters": {
                "type": "object",
                "properties": {
                    "x": {
                        "type": "integer",
                        "description": "Coordinate on the x axis to click."
                    },
                    "y": {
                        "type": "integer",
                        "description": "Coordinate on the y axis to click."
                    }
                },
                "required": [
                    "x",
                    "y"
                ]
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "long_press",
            "description": "Long press on a specific location on the screen.",
            "parameters": {
                "type": "object",
                "properties": {
                    "x": {
                        "type": "integer",
                        "description": "Coordinate on the x axis to long press."
                    },
                    "y": {
                        "type": "integer",
                        "description": "Coordinate on the y axis to long press."
                    }
                },
                "required": [
                    "x",
                    "y"
                ]
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "input_text",
            "description": "Write text inside of an already selected text field, typically this is preceeded by a 'click' action that selects a field on the screen to type into.",
            "parameters": {
                "type": "object",
                "properties": {
                    "text": {
                        "type": "string",
                        "description": "The text to input in the field."
                    }
                },
                "required": [
                    "text"
                ]
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "swipe",
            "description": "Apply a swipe gesture to the screen, based on the provided touch and lift coordinates.",
            "parameters": {
                "type": "object",
                "properties": {
                    "touch_x": {
                        "type": "integer",
                        "description": "The x-coordinate where the swipe gesture starts."
                    },
                    "touch_y": {
                        "type": "integer",
                        "description": "The y-coordinate where the swipe gesture starts."
                    },
                    "lift_x": {
                        "type": "integer",
                        "description": "The x-coordinate where the swipe gesture ends."
                    },
                    "lift_y": {
                        "type": "integer",
                        "description": "The y-coordinate where the swipe gesture ends."
                    }
                },
                "required": [
                    "touch_x",
                    "touch_y",
                    "lift_x",
                    "lift_y"
                ]
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "navigate_home",
            "description": "Navigate to the home screen from the current screen you are on.",
            "parameters": {
                "type": "object",
                "properties": {}
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "navigate_back",
            "description": "Navigate back to the previous page.",
            "parameters": {
                "type": "object",
                "properties": {}
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "open_app",
            "description": "Open an application.",
            "parameters": {
                "type": "object",
                "properties": {
                    "app_name": {
                        "type": "string",
                        "description": "The name of the application to open."
                    }
                },
                "required": [
                    "app_name"
                ]
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "wait",
            "description": "Wait for a fixed amount of time. This is useful when you need to 'await' the results of a page that is still loading.",
            "parameters": {
                "type": "object",
                "properties": {}
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "status",
            "description": "Once you have completed the work required to fulfill an instruction, report your status by calling this function with 'successful'. If you find that a task is impossible to complete,  call this with 'infeasible' after finding that information.",
            "parameters": {
                "type": "object",
                "properties": {
                    "goal_status": {
                        "type": "string",
                        "enum": [
                            "successful",
                            "infeasible"
                        ],
                        "description": "The status of the completion of a instruction, either 'successful' or 'infeasible', called to conclude an episode."
                    }
                },
                "required": [
                    "goal_status"
                ]
            }
        }
    }
]