Create Api_schema.yaml

#3
by vish123qwq - opened
Files changed (1) hide show
  1. Api_schema.yaml +59 -0
Api_schema.yaml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ openapi: 3.0.0
2
+ info:
3
+ title: LexPilot API
4
+ description: REST API for Question Answering & Summarization
5
+ version: 1.0.0
6
+
7
+ servers:
8
+ - url: https://huggingface.co/spaces/<your-space>/lexpilot
9
+
10
+ paths:
11
+ /api/ask:
12
+ post:
13
+ summary: Ask a question about uploaded/pasted content
14
+ requestBody:
15
+ required: true
16
+ content:
17
+ application/json:
18
+ schema:
19
+ type: object
20
+ properties:
21
+ question:
22
+ type: string
23
+ context:
24
+ type: string
25
+ responses:
26
+ '200':
27
+ description: Answer with confidence
28
+ content:
29
+ application/json:
30
+ schema:
31
+ type: object
32
+ properties:
33
+ answer:
34
+ type: string
35
+ confidence:
36
+ type: number
37
+
38
+ /api/summarize:
39
+ post:
40
+ summary: Summarize content
41
+ requestBody:
42
+ required: true
43
+ content:
44
+ application/json:
45
+ schema:
46
+ type: object
47
+ properties:
48
+ context:
49
+ type: string
50
+ responses:
51
+ '200':
52
+ description: Summary output
53
+ content:
54
+ application/json:
55
+ schema:
56
+ type: object
57
+ properties:
58
+ summary:
59
+ type: string