-
Notifications
You must be signed in to change notification settings - Fork 3
/
openapi.yaml
710 lines (710 loc) · 18.6 KB
/
openapi.yaml
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
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
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
openapi: 3.1.0
info:
contact:
name: BoredLabsHQ
url: https://github.com/BoredLabsHQ/Concord
description: "API for Concord, an AI-powered semantic extraction and recommendation\
\ platform for networked communities."
title: Concord API
version: 1.0.0
servers:
- url: http://localhost:8000/
paths:
/servers/register:
post:
description: "Registers a new server/group with configurable metadata, including\
\ platform and authentication token."
operationId: registerServer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ServerRegisterRequest'
required: true
responses:
"201":
content:
application/json:
schema:
$ref: '#/components/schemas/ServerRegisterResponse'
description: Server/group registered successfully.
"400":
description: Invalid input data or missing required fields.
"409":
description: Conflict if a server/group with the same name exists.
summary: Register a new server/group
tags:
- servers
/channels/{platform_id}/{channel_id}/messages:
post:
description: Processes a message feed from a specified channel and updates associated
topics.
operationId: postChannelMessages
parameters:
- explode: false
in: path
name: platform_id
required: true
schema:
type: string
style: simple
- explode: false
in: path
name: channel_id
required: true
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ChannelMessagesRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ChannelMessagesResponse'
description: Messages processed successfully.
"400":
description: Invalid input data.
summary: Upload channel messages for processing
tags:
- channels
/channels/{platform_id}/{channel_id}/related:
get:
description: Fetches channels discussing topics similar to the specified channel.
operationId: getRelatedChannels
parameters:
- explode: false
in: path
name: platform_id
required: true
schema:
type: string
style: simple
- explode: false
in: path
name: channel_id
required: true
schema:
type: string
style: simple
- explode: true
in: query
name: max_channels
required: false
schema:
default: 10
type: integer
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ChannelRelatedResponse'
description: Related channels list retrieved.
"404":
description: Channel not found.
summary: Retrieve related channels by topic
tags:
- channels
/channels/{platform_id}/{channel_id}/topics:
get:
description: Returns extracted topics for the specified channel.
operationId: getChannelTopics
parameters:
- explode: false
in: path
name: platform_id
required: true
schema:
type: string
style: simple
- explode: false
in: path
name: channel_id
required: true
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ChannelTopicsResponse'
description: Topics for the channel retrieved.
"404":
description: Channel or topics not found.
summary: Get extracted topics for a channel
tags:
- channels
/trending/topics:
get:
description: Retrieves trending topics and associated channels for a specified
time window.
operationId: getTrendingTopics
parameters:
- explode: true
in: query
name: time_window
required: true
schema:
enum:
- week
- month
- year
type: string
style: form
- explode: true
in: query
name: topic_limit
required: false
schema:
default: 10
type: integer
style: form
- explode: true
in: query
name: channel_limit
required: false
schema:
default: 5
type: integer
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/TrendingTopicsResponse'
description: Trending topics list retrieved.
"400":
description: Invalid parameters.
summary: Get trending topics
tags:
- trending
/process-memory:
post:
description: |
Processes incoming memory data from Omi and retrieves channels related to the topics within the memory.
operationId: processMemory
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MemoryRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/PluginResponse'
description: Related channels list retrieved for processed memory data.
"400":
description: Invalid input data.
summary: Process memory data and retrieve related channels
tags:
- external_integration
/setup-complete:
get:
description: |
Indicates that the initial setup for the Concord Channel Finder app is complete.
operationId: setupComplete
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/setupComplete_200_response'
description: Setup completion acknowledgment.
"500":
description: Server error if setup could not be verified.
summary: Confirm setup completion for Concord Channel Finder
tags:
- external_integration
components:
schemas:
ServerRegisterRequest:
example:
platform: matrix
name: server_name
auth_token: auth_token_example
description: Server description
contact_email: [email protected]
webhook_url: https://webhook.example.com
properties:
platform:
description: Platform name.
enum:
- matrix
- slack
- telegram
- discord
type: string
name:
description: Server/group name.
type: string
auth_token:
description: Authentication token.
type: string
description:
description: Optional description of the server/group.
type: string
contact_email:
description: Optional contact email.
format: email
type: string
webhook_url:
description: Optional URL for webhook updates.
format: uri
type: string
title: ServerRegisterRequest
ServerRegisterResponse:
example:
platform_id: unique_platform_id
name: server_name
platform: matrix
status: registered
properties:
platform_id:
description: Unique ID for the platform server/group.
type: string
name:
type: string
platform:
type: string
status:
example: registered
type: string
title: ServerRegisterResponse
ChannelMessagesRequest:
example:
messages:
- Hello!
- This is a test message.
properties:
messages:
description: List of messages for topic extraction.
items:
type: string
type: array
title: ChannelMessagesRequest
ChannelMessagesResponse:
example:
success: true
processed_messages: 2
properties:
success:
type: boolean
processed_messages:
type: integer
title: ChannelMessagesResponse
ChannelRelatedResponse:
example:
related_channels:
- platform_id: matrix
channel_id: channel_1
similarity_score: 0.82
- platform_id: discord
channel_id: channel_2
similarity_score: 0.75
properties:
related_channels:
items:
$ref: '#/components/schemas/RelatedChannel'
type: array
title: ChannelRelatedResponse
RelatedChannel:
example:
platform_id: matrix
channel_id: channel_1
similarity_score: 0.82
properties:
platform_id:
type: string
channel_id:
type: string
similarity_score:
format: float
type: number
title: RelatedChannel
TrendingTopicsResponse:
example:
time_window: week
topics:
- topic: AI developments
channels:
- platform_id: telegram
channel_id: ai_channel
similarity_score: 0.85
- topic: Tech trends
channels:
- platform_id: discord
channel_id: tech_channel
similarity_score: 0.77
properties:
time_window:
type: string
topics:
items:
$ref: '#/components/schemas/TrendingTopic'
type: array
title: TrendingTopicsResponse
TrendingTopic:
example:
topic: AI developments
channels:
- platform_id: telegram
channel_id: ai_channel
similarity_score: 0.85
properties:
topic:
type: string
channels:
items:
$ref: '#/components/schemas/RelatedChannel'
type: array
title: TrendingTopic
ChannelTopicsResponse:
example:
topics:
- topics
- topics
platform_id: platform_id
channel_id: channel_id
properties:
platform_id:
title: platform_id
type: string
channel_id:
title: channel_id
type: string
topics:
items:
type: string
type: array
title: ChannelTopicsResponse
setupComplete_200_response:
example:
message: Setup complete
status: ready
properties:
message:
example: Setup complete
type: string
status:
example: ready
type: string
title: setupComplete_200_response
MemoryRequest:
example:
createdAt: 2000-01-23T04:56:07.000+00:00
discarded: true
transcript: transcript
pluginsResponse:
- result: result
pluginName: pluginName
error: error
status: success
- result: result
pluginName: pluginName
error: error
status: success
startedAt: 2000-01-23T04:56:07.000+00:00
transcriptSegments:
- speaker: speaker
speaker_id: 0
start: 6.0274563
end: 1.4658129
text: text
is_user: true
- speaker: speaker
speaker_id: 0
start: 6.0274563
end: 1.4658129
text: text
is_user: true
structured:
sentiment: positive
keyPhrases:
- keyPhrases
- keyPhrases
entities:
- entities
- entities
additionalData:
key: additionalData
recordingFilePath: recordingFilePath
photos:
- metadata:
key: metadata
description: description
url: https://openapi-generator.tech
- metadata:
key: metadata
description: description
url: https://openapi-generator.tech
finishedAt: 2000-01-23T04:56:07.000+00:00
recordingFileBase64: recordingFileBase64
properties:
createdAt:
format: date-time
title: createdAt
type: string
startedAt:
format: date-time
title: startedAt
type: string
nullable: true
finishedAt:
format: date-time
title: finishedAt
type: string
nullable: true
transcript:
title: transcript
type: string
transcriptSegments:
items:
$ref: '#/components/schemas/TranscriptSegment'
title: transcriptSegments
type: array
photos:
items:
$ref: '#/components/schemas/MemoryPhoto'
title: photos
type: array
nullable: true
recordingFilePath:
title: recordingFilePath
type: string
nullable: true
recordingFileBase64:
format: byte
title: recordingFileBase64
type: string
nullable: true
structured:
$ref: '#/components/schemas/Structured'
pluginsResponse:
items:
$ref: '#/components/schemas/PluginResponse'
title: pluginsResponse
type: array
discarded:
title: discarded
type: boolean
required:
- createdAt
- discarded
- pluginsResponse
- structured
title: MemoryRequest
TranscriptSegment:
type: object
properties:
text:
type: string
speaker:
type: string
speaker_id:
type: integer
is_user:
type: boolean
start:
type: number
format: float
end:
type: number
format: float
required:
- text
- speaker
- speaker_id
- is_user
- start
- end
title: TranscriptSegment
MemoryRequest:
type: object
properties:
createdAt:
type: string
format: date-time
startedAt:
type: string
format: date-time
nullable: true
finishedAt:
type: string
format: date-time
nullable: true
transcript:
type: string
transcriptSegments:
type: array
items:
$ref: '#/components/schemas/TranscriptSegment'
photos:
type: array
items:
$ref: '#/components/schemas/MemoryPhoto'
nullable: true
recordingFilePath:
type: string
nullable: true
recordingFileBase64:
type: string
format: byte
nullable: true
structured:
$ref: '#/components/schemas/Structured'
pluginsResponse:
type: array
items:
$ref: '#/components/schemas/PluginResponse'
discarded:
type: boolean
required:
- createdAt
- structured
- pluginsResponse
- discarded
title: MemoryRequest
TranscriptSegment:
example:
speaker: speaker
speaker_id: 0
start: 6.0274563
end: 1.4658129
text: text
is_user: true
properties:
text:
title: text
type: string
speaker:
title: speaker
type: string
speaker_id:
title: speaker_id
type: integer
is_user:
title: is_user
type: boolean
start:
format: float
title: start
type: number
end:
format: float
title: end
type: number
required:
- end
- is_user
- speaker
- speaker_id
- start
- text
title: TranscriptSegment
MemoryPhoto:
example:
metadata:
key: metadata
description: description
url: https://openapi-generator.tech
properties:
url:
description: URL link to the photo resource.
format: uri
title: url
type: string
description:
description: Optional description or metadata about the photo.
title: description
type: string
metadata:
additionalProperties:
type: string
description: Additional metadata in key-value format.
title: metadata
required:
- url
title: MemoryPhoto
Structured:
example:
sentiment: positive
keyPhrases:
- keyPhrases
- keyPhrases
entities:
- entities
- entities
additionalData:
key: additionalData
properties:
entities:
description: Extracted entities from the structured memory data.
items:
type: string
title: entities
type: array
keyPhrases:
description: Key phrases identified in the structured memory data.
items:
type: string
title: keyPhrases
type: array
sentiment:
description: Overall sentiment classification for the memory data.
enum:
- positive
- neutral
- negative
title: sentiment
type: string
additionalData:
additionalProperties:
type: string
description: Any additional structured data relevant to the memory.
title: additionalData
title: Structured
PluginResponse:
example:
result: result
pluginName: pluginName
error: error
status: success
properties:
pluginName:
description: Name of the plugin providing the response.
title: pluginName
type: string
result:
description: Result or output from the plugin's processing.
title: result
type: string
status:
description: Status indicating success or failure of the plugin operation.
enum:
- success
- failure
title: status
type: string
error:
description: Optional error message if the plugin operation failed.
title: error
type: string
nullable: true
required:
- pluginName
- result
- status
title: PluginResponse