-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
142 lines (142 loc) · 4.02 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
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
openapi: 3.0.1
info:
title: biorxiv Plugin
description: A chatGPT plugin for browsing bioRxiv
version: 'v1'
servers:
- url: http://localhost:5003
paths:
/search_biorxiv:
get:
operationId: searchBiorxiv
summary: Search biorxiv for papers
parameters:
- name: query
in: query
description: Search query
required: true
schema:
type: string
responses:
'200':
description: A list of papers that match the query
content:
application/json:
schema:
type: object
properties:
total:
type: integer
format: int32
results:
type: array
items:
type: object
properties:
title:
type: string
authors:
type: array
items:
type: string
pdf:
type: string
link:
type: string
'400':
description: Bad request. The query parameter is missing or invalid.
'500':
description: Internal server error
/download_pdf:
get:
operationId: downloadPdf
summary: Download a paper in PDF format
parameters:
- name: pdf
in: query
description: URL of the PDF to download
required: true
schema:
type: string
responses:
'200':
description: PDF download was successful
content:
application/json:
schema:
type: object
properties:
content:
type: string
enum:
- success
'400':
description: Bad request. The PDF parameter is missing or invalid.
'500':
description: Internal server error
/extract_text:
get:
operationId: extractText
summary: Extract the text from a PDF
parameters:
- name: pdf
in: query
description: URL of the PDF
required: true
schema:
type: string
- name: page
in: query
description: Page number to extract text from
required: false
schema:
type: integer
format: int32
responses:
'200':
description: Extracted text
content:
application/json:
schema:
type: object
properties:
content:
type: string
token_count:
type: integer
format: int32
'400':
description: Bad request. The PDF parameter is missing or invalid.
'500':
description: Internal server error
/ask_corpus:
get:
operationId: askCorpus
summary: Ask a question based on the content of a paper
parameters:
- name: query
in: query
description: The question you want to ask over the entire paper text corpus
required: true
schema:
type: string
- name: pdf
in: query
description: The URL of the PDF document you want to search
required: true
schema:
type: string
responses:
'200':
description: The answer to the question based on the content of the provided PDF document
content:
application/json:
schema:
type: object
properties:
answer:
type: string
'400':
description: Bad request. The query or pdf parameter is missing or invalid.
'500':
description: Internal server error