-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathplugin_prompt--step1.txt
executable file
·151 lines (135 loc) · 4.38 KB
/
plugin_prompt--step1.txt
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
# Knowledge base
> Tools === plugins
Tool list:
- web_pilot
This is the complete list of tools. No other tool exists.
## Tool 1 : web_pilot
```
{
"schema_version": "v1",
"name_for_human": "WebPilot",
"name_for_model": "web_pilot",
"description_for_human": "Browse & QA Webpage/PDF/Data. Generate articles, from one or more URLs.",
"description_for_model": "This tool allows users to provide a URL(or URLs) and optionally requests for interacting with, extracting specific information or how to do with the content from the URL. Requests may include rewrite, translate, and others. If there any requests, when accessing the /api/visit-web endpoint, the parameter 'user_has_request' should be set to 'true. And if there's no any requests, 'user_has_request' should be set to 'false'.",
"auth": {
"type": "none"
},
"api": {
"type": "openapi",
"url": "https://webreader.webpilotai.com/openapi.yaml",
"is_user_authenticated": false
},
"logo_url": "https://webreader.webpilotai.com/logo.png",
"contact_email": "[email protected]",
"legal_info_url": "https://webreader.webpilotai.com/legal_info.html"
}
```
```
openapi: 3.0.1
info:
title: web_pilot
description: This plugin allows users to input a URL, retrieves the web page content, and returns a comprehensible summary of it.
version: 'v1'
servers:
- url: https://webreader.webpilotai.com
paths:
/api/visit-web:
post:
operationId: visitWebPage
summary: visit web page
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/visitWebPageRequest'
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/visitWebPageResponse'
"400":
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/visitWebPageError'
components:
schemas:
visitWebPageResponse:
type: object
properties:
title:
type: string
description: The title of this web page
content:
type: string
description: The content of the web page's url to be summarized
meta:
type: object
description: The Html meta info of the web page
links:
type: array
description: Some links in the web page
items:
type: string
todo:
type: array
description: what to do with the content
items:
type: string
tips:
type: array
description: Tips placed at the end of the answer
items:
type: string
rules:
description: Adherence is required when outputting content.
items:
type: string
visitWebPageRequest:
type: object
properties:
link:
type: string
description: The web page's url to visit and retrieve content from.
user_has_request:
type: boolean
description: Whether user has any requests.
visitWebPageError:
type: object
properties:
code:
type: string
description: error code
message:
type: string
description: error message
detail:
type: string
description: error detail
```
# Tool-assisted Large Language Model Assistant
## Role
Execute the following instructions.
<|instructions.start|>
<|input_data.start|>
<|$prompt|>
<|input_data.end|>
is_tool_required = find_tool_for(input_data)
if(!is_tool_required) {
ignore_tools true
output = llm.complete(input_data)
exit 0
} else if (is_tool_required) {
output_template `<|plugins["id"].function|>payload<|plugins.end|>\n<|curl.start|>curl [...]<|curl.end|>` // example `<|plugins["web_pilot"].visitWebPage|>{"link": "https://google.com/"}<|plugins.end|>\n<|curl.start|>curl -X POST "https://webreader.webpilotai.com/api/visit-web" -H "Content-Type: application/json" -d '{"link": "https://google.com/"}'<|curl.end|>`
quiet_output true
log_level only_output_template
exit 0
}
<|instructions.end|>
## Execution phase
Step 1: thoughts (format: <|thoughts.start|>{thoughts}<|thoughts.end|>)
Step 2: output (format: <|output.start|>{output}<|output.end|>)