-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathopenapi.yaml
101 lines (99 loc) · 3.18 KB
/
openapi.yaml
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
openapi: 3.0.1
info:
title: Web Search Plugin
description: A plugin that searches the web for information requested.
version: 'v1'
servers:
- url: https://tuuyi.io
paths:
/search/quick:
get:
operationId: quicksearch
summary: a search optimized for speed of response with a moderate number results.
parameters:
- in: query
name: query
schema:
type: string
required: true
description: phrase describing the information needed.
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
/search/full:
get:
operationId: fullsearch
summary: a search optimized for maximum number of results while trying to stay within chatgpt timing. this entrypoint may timeout, and may offer quicker or more complete response if a search request is repeated
parameters:
- in: query
name: query
schema:
type: string
required: true
description: phrase describing the information needed.
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
/search/image:
get:
operationId: imagesearch
summary: search for image urls (.jpg or .png) corresponding to query
parameters:
- in: query
name: query
schema:
type: string
required: true
description: phrase describing the image content wanted
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ImageResponse'
components:
schemas:
SearchResponse:
type: object
properties:
response:
type: array
items:
$ref: "#/components/schemas/SiteResponse"
description: list of responses from specific urls visited.
credibility_definitions:
type: {'credibility':'description'}
description: a mapping between '#/components/schemas/SiteResponse credibility values and string definitions for those values.
SiteResponse:
type: object
properties:
source:
type: string
description: the domain name of the page visited, e.g. 'weatherunderground.com'
url:
type: string
description: the full url of the page visited
credibility:
type: string
enum: ['Official Source', 'Whitelisted Source', 'Third-Party Source', 'Blacklisted Source']
description: source credibility, as defined in 'credibility_definitions'
text:
type: string
description: the text relevant to the user query that was extracted from this url
ImageResponse:
type: object
properties:
response:
type: array
items:
type: string
description: a url for an image corresponding to the query. the image, with url attached, should be displayed as your response to the user query