-
Notifications
You must be signed in to change notification settings - Fork 16
/
chatgpt-plugin.prod.golden.dev.yaml
374 lines (374 loc) · 11.2 KB
/
chatgpt-plugin.prod.golden.dev.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
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
openapi: 3.0.2
info:
title: FastAPI
version: 0.1.0
servers:
- url: https://chatgpt-plugin.prod.golden.dev
paths:
/api/semantic_disambiguate:
post:
summary: First step - Find the subject and id of a sentence. Name (required) should be specific, context (required) should be the full sentence provided. Always pass in n_results:3 when calling. Optional constraints can be 6:company or 36:person.
operationId: semantic_disambiguate_api_semantic_disambiguate_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SemanticDisambiguateRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SemanticDisambiguateResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/web2/opensearch_entity_triples/{golden_slug}:
get:
summary: Second and final step - Find all entity details by passing id or pk into golden_slug. Return result after this call. Include a link to the entity from golden_website_link. If no relevant data is found user can request data from get_missing_data_url. Information is current to listed date.
operationId: opensearch_list_entity_triples_web2_opensearch_entity_triples__golden_slug__get
parameters:
- required: true
schema:
title: Golden Slug
type: string
name: golden_slug
in: path
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Web2EntityModel'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/web2/disambiguate_triples:
post:
summary: Only use if the first step fails! - Find the id of an entity. Pass in predicate="name" and object equal to the entity in question.
operationId: typesense_disambiguate_triples_web2_disambiguate_triples_post
parameters:
- required: false
schema:
title: Show Diff
type: boolean
default: true
name: show_diff
in: query
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Web2DisambiguateTriplesModel'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
title: >-
Response Typesense Disambiguate Triples Web2 Disambiguate
Triples Post
type: array
items:
$ref: '#/components/schemas/Web2EntityDisambiguationModel'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/gpt/query_filters/{prompt}:
get:
summary: Find groups of entities (people and companies). Examples- 'nanotech companies', 'CEOs in Austin'. Use query_results to table of name and description. Do not show any URLs in results. After all results have been listed refer user to learn more at query_result_link (required once).
operationId: query_filters_api_v1_gpt_query_filters__prompt__get
parameters:
- description: A natural language text string
in: path
name: prompt
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
properties:
permalink:
type: string
query:
type: string
type: object
description: Successful operation
default:
content:
application/json:
schema:
properties:
message:
type: string
type: object
description: Unexpected error
/data-request/{golden_slug}:
get:
summary: Optional third step - Allows the user to make a data request on an entity if no results were found. Takes in a golden slug (required), for example 'SpaceX-99V', and provides back a URL that the user can visit to request additional data on that entity.
operationId: data_request__golden_slug__get
parameters:
- description: A natural language text string identifier
in: path
name: golden_slug
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
properties:
permalink:
type: string
query:
type: string
type: object
description: Successful operation
default:
content:
application/json:
schema:
properties:
message:
type: string
type: object
description: Unexpected error
components:
schemas:
EntityResult:
title: EntityResult
required:
- name
- id
- description
- thumbnail
- score
type: object
properties:
name:
title: Name
type: string
id:
title: Id
type: integer
description:
title: Description
type: string
thumbnail:
title: Thumbnail
type: string
score:
title: Score
type: number
HTTPValidationError:
title: HTTPValidationError
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: '#/components/schemas/ValidationError'
SemanticDisambiguateRequest:
title: SemanticDisambiguateRequest
required:
- name
type: object
properties:
name:
title: Name
type: string
context:
title: Context
type: string
default: ''
constraints:
title: Constraints
type: array
items:
type: integer
default: []
n_results:
title: N Results
type: integer
default: 3
maximum: 5
allow_null_is_a:
title: Allow Null Is A
type: boolean
default: false
SemanticDisambiguateResponse:
title: SemanticDisambiguateResponse
required:
- ranked_results
type: object
properties:
ranked_results:
title: Ranked Results
type: array
items:
$ref: '#/components/schemas/EntityResult'
ValidationError:
title: ValidationError
required:
- loc
- msg
- type
type: object
properties:
loc:
title: Location
type: array
items:
type: string
msg:
title: Message
type: string
type:
title: Error Type
type: string
VectorRequest:
title: VectorRequest
required:
- sentences
type: object
properties:
sentences:
title: Sentences
type: array
items:
type: string
VectorResponse:
title: VectorResponse
required:
- vectors
type: object
properties:
vectors:
title: Vectors
type: array
items:
type: array
items:
type: number
Web2EntityModel:
title: Web2EntityModel
required:
- id
- date_created
- triples
- pk
type: object
properties:
id:
title: Id
type: string
description: entity slug, as displayed in golden.com
name:
title: Name
type: string
description: entity name, as registered in web3
date_created:
title: Date Created
type: string
description: entity submission date onto the protocol
format: date-time
reputation:
title: Reputation
type: number
description: >-
Reputation score of the given entity. Entities with more effort and
contributions will have a higher number.
default: 0
triples:
title: Triples
type: array
items:
$ref: '#/components/schemas/Web2TripleModel'
pk:
title: Pk
type: integer
description: Actual int PK for web2 entity
Web2DisambiguateTriplesModel:
title: Web2DisambiguateTriplesModel
required:
- triples
type: object
properties:
triples:
title: Triples
type: array
items:
$ref: '#/components/schemas/BaseTripleModel'
description: List of triples used to disambiguate entitities in the datasource
predicate_weights:
title: Predicate Weights
type: object
additionalProperties:
type: number
description: Weights to be used when calculating the overall distance score for any given candidate.
default: { }
use_web3_predicates:
title: Use Web3 Predicates
type: boolean
description: Use web3 predicates for input and output
default: false
Web2EntityDisambiguationModel:
title: Web2EntityDisambiguationModel
required:
- id
- date_created
- distance
- reputation
- pk
type: object
properties:
id:
title: Id
type: string
description: entity slug on the web2 database
name:
title: Name
type: string
description: entity name on the web2 database
date_created:
title: Date Created
type: string
description: entity creation date on the web2 database
format: date-time
distance:
title: Distance
type: number
description: Similarity distance between triple payload and entity. 0 is a perfect match, while 1 would be the contrary
reputation:
title: Reputation
type: number
description: Reputation score of the given entity. Entities with more effort and contributions will have a higher number.
diff:
title: Diff
allOf:
- $ref: '#/components/schemas/EntityComparatorModel'
description: Comparison between existing triples and submitted triples for the given entity
pk:
title: Pk
type: integer
description: entity PK on the web2 database