File size: 19,717 Bytes
0c07a0e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
{
    "task_description": "You are an intelligent AI assistant that helps users navigate and manage files in the Gorilla file system. Given a command or request from the user, call the appropriate file system function to complete the request. You can perform operations such as navigating directories, creating and deleting files and folders, reading and writing file contents, searching for files, comparing files, and other basic file operations.",
    "tools": [
        {
            "type": "function",
            "function": {
                "name": "cat",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Display the contents of a file of any extension from currrent directory.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "file_name": {
                            "type": "string",
                            "description": "The name of the file from current directory to display. No path is allowed. "
                        }
                    },
                    "required": [
                        "file_name"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "cd",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Change the current working directory to the specified folder.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "folder": {
                            "type": "string",
                            "description": "The folder of the directory to change to. You can only change one folder level at a time. "
                        }
                    },
                    "required": [
                        "folder"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "cp",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Copy a file or directory from one location to another.  If the destination is a directory, the source file or directory will be copied into the destination directory.  Both source and destination must be local to the current directory.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "source": {
                            "type": "string",
                            "description": "The name of the file or directory to copy."
                        },
                        "destination": {
                            "type": "string",
                            "description": "The destination name to copy the file or directory to. If the destination is a directory, the source will be copied into this directory. No file paths allowed. "
                        }
                    },
                    "required": [
                        "source",
                        "destination"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "diff",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Compare two files of any extension line by line at the current directory.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "file_name1": {
                            "type": "string",
                            "description": "The name of the first file in current directory."
                        },
                        "file_name2": {
                            "type": "string",
                            "description": "The name of the second file in current directory. "
                        }
                    },
                    "required": [
                        "file_name1",
                        "file_name2"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "du",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Estimate the disk usage of a directory and its contents.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "human_readable": {
                            "type": "boolean",
                            "description": "If True, returns the size in human-readable format (e.g., KB, MB). ",
                            "default": false
                        }
                    },
                    "required": []
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "echo",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Write content to a file at current directory or display it in the terminal.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "content": {
                            "type": "string",
                            "description": "The content to write or display."
                        },
                        "file_name": {
                            "type": "string",
                            "description": "The name of the file at current directory to write the content to. Defaults to None. ",
                            "default": "None"
                        }
                    },
                    "required": [
                        "content"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "find",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Find any file or directories under specific path that contain name in its file name.  This method searches for files of any extension and directories within a specified path that match the given name. If no name is provided, it returns all files and directories in the specified path and its subdirectories. Note: This method performs a recursive search through all subdirectories of the given path.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "path": {
                            "type": "string",
                            "description": "The directory path to start the search. Defaults to the current directory (\".\").",
                            "default": "."
                        },
                        "name": {
                            "type": "string",
                            "description": "The name of the file or directory to search for. If None, all items are returned. ",
                            "default": "None"
                        }
                    },
                    "required": []
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "grep",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Search for lines in a file of any extension at current directory that contain the specified pattern.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "file_name": {
                            "type": "string",
                            "description": "The name of the file to search. No path is allowed and you can only perform on file at local directory."
                        },
                        "pattern": {
                            "type": "string",
                            "description": "The pattern to search for. "
                        }
                    },
                    "required": [
                        "file_name",
                        "pattern"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "ls",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: List the contents of the current directory.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "a": {
                            "type": "boolean",
                            "description": "Show hidden files and directories. Defaults to False. ",
                            "default": false
                        }
                    },
                    "required": []
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "mkdir",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Create a new directory in the current directory.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "dir_name": {
                            "type": "string",
                            "description": "The name of the new directory at current directory. You can only create directory at current directory."
                        }
                    },
                    "required": [
                        "dir_name"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "mv",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Move a file or directory from one location to another.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "source": {
                            "type": "string",
                            "description": "Source name of the file or directory to move. Source must be local to the current directory."
                        },
                        "destination": {
                            "type": "string",
                            "description": "The destination name to move the file or directory to. Destination must be local to the current directory and cannot be a path. If destination is not an existing directory like when renaming something, destination is the new file name. "
                        }
                    },
                    "required": [
                        "source",
                        "destination"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "pwd",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Return the current working directory path.",
                "parameters": {
                    "type": "object",
                    "properties": {},
                    "required": []
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "rm",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Remove a file or directory.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "file_name": {
                            "type": "string",
                            "description": "The name of the file or directory to remove. "
                        }
                    },
                    "required": [
                        "file_name"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "rmdir",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Remove a directory at current directory.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "dir_name": {
                            "type": "string",
                            "description": "The name of the directory to remove. Directory must be local to the current directory. "
                        }
                    },
                    "required": [
                        "dir_name"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "sort",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Sort the contents of a file line by line.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "file_name": {
                            "type": "string",
                            "description": "The name of the file appeared at current directory to sort. "
                        }
                    },
                    "required": [
                        "file_name"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "tail",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Display the last part of a file of any extension.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "file_name": {
                            "type": "string",
                            "description": "The name of the file to display. No path is allowed and you can only perform on file at local directory."
                        },
                        "lines": {
                            "type": "integer",
                            "description": "The number of lines to display from the end of the file. Defaults to 10. ",
                            "default": 10
                        }
                    },
                    "required": [
                        "file_name"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "touch",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Create a new file of any extension in the current directory.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "file_name": {
                            "type": "string",
                            "description": "The name of the new file in the current directory. file_name is local to the current directory and does not allow path."
                        }
                    },
                    "required": [
                        "file_name"
                    ]
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "wc",
                "description": "This tool belongs to the Gorilla file system. It is a simple file system that allows users to perform basic file operations such as navigating directories, creating files and directories, reading and writing to files, etc. Tool description: Count the number of lines, words, and characters in a file of any extension from current directory.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "file_name": {
                            "type": "string",
                            "description": "Name of the file of current directory to perform wc operation on."
                        },
                        "mode": {
                            "type": "string",
                            "description": "Mode of operation ('l' for lines, 'w' for words, 'c' for characters). ",
                            "default": "l"
                        }
                    },
                    "required": [
                        "file_name"
                    ]
                }
            }
        }
    ]
}