[Vignesh Nachu] commited on
Commit
0da436b
·
1 Parent(s): 694942a

Add static directory with OpenAPI spec

Browse files
Files changed (1) hide show
  1. static/openapi.yaml +68 -0
static/openapi.yaml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ openapi: 3.1.0
2
+ info:
3
+ title: PDF RAG API
4
+ version: 1.0.0
5
+ description: API to query a Weaviate vector DB using SentenceTransformer embeddings
6
+
7
+ servers:
8
+ - url: https://vignesh45--pdf-rag-api.hf.space
9
+
10
+ paths:
11
+ /:
12
+ get:
13
+ summary: Health check
14
+ operationId: root
15
+ responses:
16
+ '200':
17
+ description: OK
18
+ content:
19
+ application/json:
20
+ schema:
21
+ type: object
22
+ properties:
23
+ message:
24
+ type: string
25
+
26
+ post:
27
+ summary: Query the vector DB with a text prompt
28
+ operationId: queryWeaviate
29
+ requestBody:
30
+ required: true
31
+ content:
32
+ application/json:
33
+ schema:
34
+ type: object
35
+ properties:
36
+ text:
37
+ type: string
38
+ minLength: 1
39
+ top_k:
40
+ type: integer
41
+ default: 7
42
+ minimum: 1
43
+ maximum: 100
44
+ required:
45
+ - text
46
+ responses:
47
+ '200':
48
+ description: Query results
49
+ content:
50
+ application/json:
51
+ schema:
52
+ type: object
53
+ properties:
54
+ query:
55
+ type: string
56
+ results:
57
+ type: array
58
+ items:
59
+ type: object
60
+ properties:
61
+ text:
62
+ type: string
63
+ source:
64
+ type: string
65
+ '400':
66
+ description: Bad request
67
+ '500':
68
+ description: Internal server error