-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.foundry.json
More file actions
203 lines (203 loc) · 6.42 KB
/
openapi.foundry.json
File metadata and controls
203 lines (203 loc) · 6.42 KB
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
{
"openapi": "3.0.3",
"info": {
"title": "DSPy Complaint Classifier API",
"version": "0.3.0",
"description": "Multi-stage complaint classification API for Ozempic-related issues. Supports three classification types:\n\n1. **AE vs PC**: Classify as Adverse Event or Product Complaint\n2. **AE Category**: Classify adverse events into specific medical categories\n3. **PC Category**: Classify product complaints into specific quality/defect categories\n\n**GitHub Repository**: [anand-testcompare/dspy-reference-examples](https://github.com/anand-testcompare/dspy-reference-examples)\n**Learn More**: [shpit.dev/learn](https://shpit.dev/learn)"
},
"servers": [
{
"url": "http://localhost:5000"
}
],
"paths": {
"/classify/ae-pc": {
"post": {
"operationId": "classifyAePc",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplaintResponse"
}
}
}
}
},
"summary": "Classify as Adverse Event or Product Complaint",
"description": "First-stage classification that determines whether a complaint is an Adverse Event (medical/health issue) or a Product Complaint (quality/defect issue).",
"tags": [
"classification"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AEPCRequest"
},
"example": {
"complaint": "I experienced severe nausea and vomiting after taking Ozempic."
}
}
},
"required": true
}
}
},
"/classify/ae-category": {
"post": {
"operationId": "classifyAeCategory",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplaintResponse"
}
}
}
}
},
"summary": "Classify Adverse Event into medical category",
"description": "Second-stage classification for Adverse Events. Classifies into specific medical categories such as Gastrointestinal disorders, Pancreatitis, Hypoglycemia, etc.",
"tags": [
"classification"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AECategoryRequest"
},
"example": {
"complaint": "I developed pancreatitis after using Ozempic for 3 months."
}
}
},
"required": true
}
}
},
"/classify/pc-category": {
"post": {
"operationId": "classifyPcCategory",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplaintResponse"
}
}
}
}
},
"summary": "Classify Product Complaint into quality/defect category",
"description": "Second-stage classification for Product Complaints. Classifies into specific categories such as Device malfunction, Storage/Temperature excursion, Packaging defect, etc.",
"tags": [
"classification"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PCCategoryRequest"
},
"example": {
"complaint": "The medication arrived warm, temperature control was not maintained during shipping."
}
}
},
"required": true
}
}
}
},
"components": {
"schemas": {
"AECategoryRequest": {
"properties": {
"complaint": {
"type": "string",
"title": "Complaint",
"description": "Raw complaint text"
}
},
"type": "object",
"required": [
"complaint"
],
"title": "AECategoryRequest",
"description": "Request for classifying Adverse Event into a specific category.",
"example": {
"complaint": "I developed pancreatitis after using Ozempic for 3 months."
}
},
"AEPCRequest": {
"properties": {
"complaint": {
"type": "string",
"title": "Complaint",
"description": "Raw complaint text"
}
},
"type": "object",
"required": [
"complaint"
],
"title": "AEPCRequest",
"description": "Request for classifying as Adverse Event or Product Complaint.",
"example": {
"complaint": "I experienced severe nausea and vomiting after taking Ozempic."
}
},
"ComplaintResponse": {
"properties": {
"classification": {
"type": "string",
"title": "Classification"
},
"justification": {
"type": "string",
"title": "Justification"
},
"classification_type": {
"type": "string",
"title": "Classification Type",
"description": "The type of classification performed"
}
},
"type": "object",
"required": [
"classification",
"justification",
"classification_type"
],
"title": "ComplaintResponse",
"description": "Structured prediction response."
},
"PCCategoryRequest": {
"properties": {
"complaint": {
"type": "string",
"title": "Complaint",
"description": "Raw complaint text"
}
},
"type": "object",
"required": [
"complaint"
],
"title": "PCCategoryRequest",
"description": "Request for classifying Product Complaint into a specific category.",
"example": {
"complaint": "The medication arrived warm, temperature control was not maintained during shipping."
}
}
}
}
}