-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtool.gpt
141 lines (111 loc) · 6.48 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
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
export: browse, getPageContents, getPageImages, click, fill, check, select, enter, scroll, close, screenshot, back, forward, filter
share context: github.com/gptscript-ai/credentials/model-provider
description: A toolset that can be used to browse and navigate websites.
---
name: browse
description: Navigates to a website, but does not return the content.
args: website: The URL of the website to visit. Must be an HTTPS URL.
args: tabID: (optional) The ID of the tab. If unspecified, a new tab will be created, and its ID will be returned.
tools: service
#!http://service.daemon.gptscript.local/browse
---
name: getPageContents
description: Returns the content of a website in Markdown format.
args: website: (optional) The HTTPS URL of the website to visit. If unspecified, the current tab will be used.
args: tabID: (optional) The ID of the tab. If unspecified, a new tab will be created.
tools: service
#!http://service.daemon.gptscript.local/getPageContents
---
name: getPageImages
description: Navigates to a website and returns all the img tags in raw HTML, including their source URLs.
args: website: The URL of the website to visit. Must be an HTTPS URL.
args: tabID: (optional) The ID of the tab. If unspecified, a new tab will be created, and its ID will be returned.
tools: service
#!http://service.daemon.gptscript.local/getPageImages
---
name: click
description: Clicks elements on the web page. Useful for clicking buttons, links, etc.
args: userInput: (required) Description of the element to click on. This will be used by the AI to determine which element to pick from the results. Be as detailed as possible.
args: keywords: (required) Comma-separated list of keywords related to the element. These will be used to search for the element on the page. ALWAYS include at least one keyword.
args: allElements: (optional, default false) Clicks on all matching elements, instead of only clicking on the first matched element.
args: matchTextOnly: (optional, default false) Matches elements based on their text content and ignores their attributes. Useful for cases where the user has provided an exact piece of text that they want to interact with on the page.
args: tabID: (required) The ID of the tab.
tools: service
#!http://service.daemon.gptscript.local/click
---
name: filter
description: filter the page to get elements based on specific id, html tag, or class.
args: filter: (required) the class (eg. '.foo') or id (eg. '#foo') of an object.
args: tabID: (required) The ID of the tab to filter contents of.
tools: service
#!http://service.daemon.gptscript.local/getFilteredContent
---
name: fill
description: Fills text into an element on the web page. Useful for filling out forms and other input fields.
args: userInput: (required) Description of the element to fill. This will be used by the AI to determine which element to pick from the results. Be as detailed as possible.
args: keywords: (required) Comma-separated list of keywords related to the element. These will be used to search for the element on the page. ALWAYS include at least one keyword.
args: matchTextOnly: (optional, default false) Matches elements based on their text content and ignores their attributes. Useful for cases where the user has provided an exact piece of text that they want to interact with on the page.
args: content: The text to fill into the element.
args: tabID: (required) The ID of the tab.
tools: service
#!http://service.daemon.gptscript.local/fill
---
name: enter
description: Presses the enter key. Useful after filling out a form or other input.
args: tabID: (required) The ID of the tab.
tools: service
#!http://service.daemon.gptscript.local/enter
---
name: scroll
description: Scrolls to the bottom of the page, possibly loading more content. Useful for sites like Reddit which support infinite scroll.
args: tabID: (required) The ID of the tab.
tools: service
#!http://service.daemon.gptscript.local/scrollToBottom
---
name: check
description: Checks a radio button on the web page.
args: userInput: (required) Description of the element to check. This will be used by the AI to determine which element to pick from the results. Be as detailed as possible.
args: keywords: (required) Comma-separated list of keywords related to the element. These will be used to search for the element on the page. ALWAYS include at least one keyword.
args: matchTextOnly: (optional, default false) Matches elements based on their text content and ignores their attributes. Useful for cases where the user has provided an exact piece of text that they want to interact with on the page.
args: tabID: (optional) The ID of the tab. If unspecified, a new tab will be created.
tools: service
#!http://service.daemon.gptscript.local/check
---
name: select
description: Selects an option from a select element.
args: userInput: (required) Description of the element to select from.
args: option: The option to choose in the dropdown.
args: tabID: (required) The ID of the tab.
tools: service
#!http://service.daemon.gptscript.local/select
---
name: close
description: Closes a page.
args: tabID: (required) The ID of the tab to close.
tools: service
#!http://service.daemon.gptscript.local/close
---
name: screenshot
description: Takes a screenshot of an element. Saves it as a PNG file in the workspace.
args: userInput: (required) Description of the element to screenshot. This will be used by the AI to determine which element to pick from the results. Be as detailed as possible.
args: keywords: (required) Comma-separated list of keywords related to the element. These will be used to search for the element on the page. ALWAYS include at least one keyword.
args: matchTextOnly: (optional, default false) Matches elements based on their text content and ignores their attributes. Useful for cases where the user has provided an exact piece of text that they want to interact with on the page.
args: tabID: (optional) The ID of the tab. If unspecified, a new tab will be created.
args: filename: (optional) The name of the file to create. Defaults to screenshot.png
tools: service
#!http://service.daemon.gptscript.local/screenshot
---
name: back
description: Navigates to back to the previous site in history.
args: tabID: (required) The ID of the tab.
tools: service
#!http://service.daemon.gptscript.local/back
---
name: forward
description: Navigates to forward to the next site in history.
args: tabID: (required) The ID of the tab.
tools: service
#!http://service.daemon.gptscript.local/forward
---
name: service
#!sys.daemon /usr/bin/env npm --prefix ${GPTSCRIPT_TOOL_DIR} run server