forked from Akiaka-T2/RecycleChatBot_backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.json
More file actions
190 lines (189 loc) · 5.4 KB
/
swagger.json
File metadata and controls
190 lines (189 loc) · 5.4 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
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "SeoulRechat API",
"description": "
OpenAI API를 사용한 AI 챗봇입니다. 사용자가 재활용 지원 정책 정보를 조회하고, 대형 폐기물을 분리수거 할 수 있습니다."
},
"basePath": "/",
"schemes": [
"http"
],
"paths": {
"/chat": {
"post": {
"summary": "사용자 입력 처리",
"description": "사용자의 입력을 처리하여 랭체인으로 학습된 OpenAI API를 통해 응답을 생성합니다.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "사용자 입력",
"required": true,
"schema": {
"type": "object",
"properties": {
"user_input": {
"type": "string",
"example": "강남구 지원정책에 대해 알려줘"
}
}
}
}
],
"responses": {
"200": {
"description": "성공",
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "대형 폐기물 분리수거 하는 방법."
},
"district_message": {
"type": "string",
"example": "지원정책."
}
}
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/policy": {
"post": {
"summary": "재활용 지원 정책 정보 조회",
"description": "해당 지역구의 정책 정보를 조회합니다.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "지역구",
"required": true,
"schema": {
"type": "object",
"properties": {
"district_name": {
"type": "string",
"example": "강남구"
}
}
}
}
],
"responses": {
"200": {
"description": "성공",
"schema": {
"type": "object",
"properties": {
"district_name": {
"type": "string",
"example": "강남구"
},
"message": {
"type": "string",
"example": "정책에 대한 메시지."
},
"district_url": {
"type": "string",
"example": "https://www.gangnam.go.kr/main.do"
}
}
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/upload": {
"post": {
"summary": "사진 업로드 처리",
"description": "대형 폐기물 사진을 업로드하고 해당하는 분리수거 정보를 반환합니다.",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "formData",
"name": "district_name",
"description": "지역 이름",
"required": true,
"type": "string",
"example": "강남구"
},
{
"in": "formData",
"name": "image_file",
"description": "이미지 파일",
"required": true,
"type": "file"
}
],
"responses": {
"200": {
"description": "성공",
"schema": {
"type": "object",
"properties": {
"district_name": {
"type": "string",
"example": "강남구"
},
"message": {
"type": "string",
"example": "이 대형 폐기물의 분리수거 방법은 이것 입니다."
},
"district_url": {
"type": "string",
"example": "https://www.gangnam.go.kr/main.do"
}
}
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
}
},
"definitions": {},
"tags": [
{
"name": "OpenAI API",
"description": "OpenAI API를 사용한 Chatbot"
}
]
}