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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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
openapi: 3.0.1
info:
  title: Application
  description: Generated at 05/06/2023 01:41:02. This is the swagger 
    ui based on the open api 3.0 specification of the Application
  version: 1.0.0 created by the flask swagger generator.
externalDocs:
  description: Find out more about Swagger
  url: 'http://swagger.io'
servers:
  - url: '/'
paths:
  '/sendNotification':
    post:
      tags:
      - send_notification
      operationId: 'send_notification'
      requestBody:
        $ref: '#/components/requestBodies/send_notification_request_body' 
      responses:
        '200':
          $ref: '#/components/responses/send_notification_response'
  '/uploadImage':
    post:
      tags:
      - send_notification
      operationId: 'upload_image'
      requestBody:
        $ref: '#/components/requestBodies/upload_image_request_body' 
      responses:
        '200':
          $ref: '#/components/responses/upload_image_response'
  '/image_relatedness':
    post:
      tags:
      - send_notification
      operationId: 'image_relatedness'
      requestBody:
        $ref: '#/components/requestBodies/image_relatedness_request_body' 
      responses:
        '200':
          $ref: '#/components/responses/image_relatedness_response'
  '/file/{filename}':
    get:
      tags:
      - send_notification
      operationId: 'get_swagger_file'
      parameters:
      - in: path
        name: filename
        schema:
          type: string
        description: None
        required: True
  '/training':
    get:
      tags:
      - send_notification
      operationId: 'csv_training'
      responses:
        '200':
          $ref: '#/components/responses/csv_training_response'
  '/feedback':
    post:
      tags:
      - send_notification
      operationId: 'add_feedback'
      requestBody:
        $ref: '#/components/requestBodies/add_feedback_request_body' 
      responses:
        '200':
          $ref: '#/components/responses/add_feedback_response'
  '/feedback/{search}/{rating}':
    get:
      tags:
      - send_notification
      operationId: 'get_feedback'
      parameters:
      - in: path
        name: search
        schema:
          type: string
        description: None
        required: True
      - in: path
        name: rating
        schema:
          type: integer
        description: None
        required: True
      responses:
        '200':
          $ref: '#/components/responses/get_feedback_response'
  '/commands':
    get:
      tags:
      - send_notification
      operationId: 'get_commands'
      responses:
        '200':
          $ref: '#/components/responses/get_commands_response'
  '/chat_rising':
    post:
      tags:
      - send_notification
      operationId: 'message_agent'
      requestBody:
        $ref: '#/components/requestBodies/message_agent_request_body' 
      responses:
        '200':
          $ref: '#/components/responses/message_agent_response'
  '/send_sms':
    post:
      tags:
      - send_notification
      operationId: 'send_sms'
      requestBody:
        $ref: '#/components/requestBodies/send_sms_request_body' 
      responses:
        '200':
          $ref: '#/components/responses/send_sms_response'
  '/train/contacts':
    post:
      tags:
      - send_notification
      operationId: 'train_contacts'
      requestBody:
        $ref: '#/components/requestBodies/train_contacts_request_body' 
      responses:
        '200':
          $ref: '#/components/responses/train_contacts_response'
components:
  requestBodies:
    send_notification_request_body:
      description: None
      required: True
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/send_notification'
    upload_image_request_body:
      description: None
      required: True
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/upload_image'
    image_relatedness_request_body:
      description: None
      required: True
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/image_relatedness'
    add_feedback_request_body:
      description: None
      required: True
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/add_feedback'
    message_agent_request_body:
      description: None
      required: True
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/message_agent'
    send_sms_request_body:
      description: None
      required: True
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/send_sms'
    train_contacts_request_body:
      description: None
      required: True
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/train_contacts'
  responses:
    send_notification_response:
      description: send_notification response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/send_notification_response_schema'
    upload_image_response:
      description: upload_image response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/upload_image_response_schema'
    image_relatedness_response:
      description: image_relatedness response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/image_relatedness_response_schema'
    csv_training_response:
      description: csv_training response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/csv_training_response_schema'
    add_feedback_response:
      description: add_feedback response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/add_feedback_response_schema'
    get_feedback_response:
      description: get_feedback response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/get_feedback_response_schema'
    get_commands_response:
      description: get_commands response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/get_commands_response_schema'
    message_agent_response:
      description: message_agent response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/message_agent_response_schema'
    send_sms_response:
      description: send_sms response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/send_sms_response_schema'
    train_contacts_response:
      description: train_contacts response
      content:
         application/json:
             schema:
                 $ref: '#/components/schemas/train_contacts_response_schema'
  schemas:
    send_notification:
      type: object
      properties:
        message:
          type: string  
          example: this is test message  
        token:
          type: string  
          example: test_token  
        uuid:
          type: string  
          example: test_uuid  
    send_notification_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          type: string  
          example: test_result  
    upload_image:
      type: object
      properties:
        image_name:
          type: string  
          example: this is test image path  
        token:
          type: string  
          example: test_token  
        uuid:
          type: string  
          example: test_uuid  
    upload_image_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          type: string  
          example: test_result  
    image_relatedness:
      type: object
      properties:
        image_name:
          type: string  
          example: this is test image path  
        message:
          type: string  
          example: this is a test message  
        token:
          type: string  
          example: test_token  
        uuid:
          type: string  
          example: test_uuid  
    image_relatedness_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          type: string  
          example: test_result  
    csv_training_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          type: string  
          example: test_result  
    add_feedback_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          type: string  
          example: test_result  
    add_feedback:
      type: object
      properties:
        token:
          type: string  
          example: test_token  
        uuid:
          type: string  
          example: test_uuid  
        prompt:
          $ref: "#/components/schemas/prompt_add_feedback"  
        completion:
          $ref: "#/components/schemas/completion_add_feedback"  
        rating:
          type: integer  
          example: 1  
    prompt_add_feedback:
      type: object
      properties:
        image_name:
          type: string  
          example: test_image  
        message:
          type: string  
          example: test_message  
    completion_add_feedback:
      type: object
      properties:
        image_name:
          type: string  
          example: test_image  
        message:
          type: string  
          example: test_message  
    get_feedback_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          type: string  
          example: test_result  
    get_commands_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          type: string  
          example: test_result  
    message_agent_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          $ref: "#/components/schemas/result_message_agent_response_schema"  
    result_message_agent_response_schema:
      type: object
      properties:
        program:
          type: string  
          example: agent  
        message:
          $ref: "#/components/schemas/message_result_message_agent_response_schema"  
    message_result_message_agent_response_schema:
      type: object
      properties:
        role:
          type: string  
          example: assistant  
        content:
          type: string  
          example: content  
    message_agent:
      type: object
      properties:
        token:
          type: string  
          example: test_token  
        uuid:
          type: string  
          example: test_uuid  
        history:
          type: array  
          items:
            type: object
        user_input:
          type: string  
          example: user_message  
        model:
          type: string  
          example: gpt-3.5-turbo  
    send_sms_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          type: string  
          example: test_result  
    send_sms:
      type: object
      properties:
        token:
          type: string  
          example: test_token  
        uuid:
          type: string  
          example: test_uuid  
        data:
          $ref: "#/components/schemas/data_send_sms"  
    data_send_sms:
      type: object
      properties:
        from:
          type: string  
          example: +15005550006  
        to:
          type: string  
          example: +12173748105  
        body:
          type: string  
          example: All in the game, yo  
    train_contacts_response_schema:
      type: object
      properties:
        message:
          type: string  
          example: message  
        result:
          type: string  
          example: test_result  
    train_contacts:
      type: object
      properties:
        token:
          type: string  
          example: String  
        uuid:
          type: string  
          example: String  
        contacts:
          type: array  
          items:
            type: object