-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtool.gpt
105 lines (82 loc) · 3.58 KB
/
tool.gpt
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
Name: Create Workspace
Tools: Server
Description: Create a new workspace
Parameter: provider: The workspace provider to use, default to 'directory'
Parameter: workspace_ids: The IDs of the workspaces from which to copy data in a comma-separated list
#!http://Server.daemon.gptscript.local/create
---
Name: Delete Workspace
Tools: Server
Description: Delete a workspace
Parameter: workspace_id: The ID of the workspaces to delete
#!http://Server.daemon.gptscript.local/rm/${WORKSPACE_ID}
---
Name: List Workspace Contents
Tools: Server
Description: List the files in a workspace
Parameter: workspace_id: The ID of the workspaces to list
Parameter: ls_prefix: Only list files with this prefix
#!http://Server.daemon.gptscript.local/ls/${WORKSPACE_ID}/${LS_PREFIX}
---
Name: Remove All With Prefix In Workspace
Tools: Server
Description: Remove all files with a given prefix
Parameter: workspace_id: The ID of the workspaces to remove
Parameter: prefix: The prefix to remove files with
#!http://Server.daemon.gptscript.local/rm-with-prefix/${WORKSPACE_ID}/${PREFIX}
---
Name: Write File in Workspace
Tools: Server
Description: Write a file in a workspace
Parameter: workspace_id: The ID of the workspaces to write the file in
Parameter: file_path: The name of the file to write
Parameter: body: The base64 encoded contents of the file to write
#!http://Server.daemon.gptscript.local/write-file/${WORKSPACE_ID}/${FILE_PATH}
---
Name: Read File in Workspace
Tools: Server
Description: Read a file in a workspace, returned the base64 encoded content
Parameter: workspace_id: The ID of the workspaces to read the file from
Parameter: file_path: The name of the file to read
#!http://Server.daemon.gptscript.local/read-file/${WORKSPACE_ID}/${FILE_PATH}
---
Name: Remove File in Workspace
Tools: Server
Description: Remove a file in a workspace
Parameter: workspace_id: The ID of the workspaces to remove the file from
Parameter: file_path: The name of the file to remove
#!http://Server.daemon.gptscript.local/rm-file/${WORKSPACE_ID}/${FILE_PATH}
---
Name: Stat File in Workspace
Tools: Server
Description: Get information about a file in a workspace
Parameter: workspace_id: The ID of the workspaces to stat the file from
Parameter: file_path: The name of the file to stat
#!http://Server.daemon.gptscript.local/stat-file/${WORKSPACE_ID}/${FILE_PATH}
---
Name: List Revisions for File in Workspace
Tools: Server
Description: Get the revision information for a file in a workspace
Parameter: workspace_id: The ID of the workspaces to stat the file from
Parameter: file_path: The name of the file to stat
#!http://Server.daemon.gptscript.local/list-revisions/${WORKSPACE_ID}/${FILE_PATH}
---
Name: Get a Revision for File in Workspace
Tools: Server
Description: Read the given revision for a file in a workspace
Parameter: workspace_id: The ID of the workspaces to stat the file from
Parameter: file_path: The name of the file to stat
Parameter: revision_id: The id of the revision to return
#!http://Server.daemon.gptscript.local/get-revision/${WORKSPACE_ID}/${FILE_PATH}/${REVISION_ID}
---
Name: Delete a Revision for File in Workspace
Tools: Server
Description: Delete the given revision for a file in a workspace
Parameter: workspace_id: The ID of the workspaces to stat the file from
Parameter: file_path: The name of the file to stat
Parameter: revision_id: The id of the revision to return
#!http://Server.daemon.gptscript.local/delete-revision/${WORKSPACE_ID}/${FILE_PATH}/${REVISION_ID}
---
Name: Server
Description: Start the workspace-provider server
#!sys.daemon (path=/healthz) ${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool server --port ${PORT}