trieve_ruby_client 0.3.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -74
  3. data/docs/AuthApi.md +28 -34
  4. data/docs/AuthQuery.md +22 -0
  5. data/docs/BatchQueuedChunkResponse.md +20 -0
  6. data/docs/ChunkApi.md +69 -143
  7. data/docs/ChunkData.md +42 -0
  8. data/docs/ChunkGroupApi.md +169 -85
  9. data/docs/CreateChunkData.md +41 -34
  10. data/docs/DatasetApi.md +31 -31
  11. data/docs/EventsApi.md +13 -13
  12. data/docs/FileApi.md +21 -21
  13. data/docs/GetEventsData.md +22 -0
  14. data/docs/HealthApi.md +6 -4
  15. data/docs/InvitationApi.md +6 -6
  16. data/docs/MessageApi.md +21 -21
  17. data/docs/OrganizationApi.md +31 -31
  18. data/docs/ReturnQueuedChunk.md +39 -10
  19. data/docs/SingleQueuedChunkResponse.md +20 -0
  20. data/docs/StripeApi.md +21 -13
  21. data/docs/TopicApi.md +21 -21
  22. data/docs/UserApi.md +16 -16
  23. data/lib/trieve_ruby_client/api/auth_api.rb +27 -34
  24. data/lib/trieve_ruby_client/api/chunk_api.rb +57 -132
  25. data/lib/trieve_ruby_client/api/chunk_group_api.rb +149 -61
  26. data/lib/trieve_ruby_client/api/dataset_api.rb +25 -25
  27. data/lib/trieve_ruby_client/api/events_api.rb +21 -16
  28. data/lib/trieve_ruby_client/api/file_api.rb +17 -17
  29. data/lib/trieve_ruby_client/api/health_api.rb +5 -1
  30. data/lib/trieve_ruby_client/api/invitation_api.rb +5 -5
  31. data/lib/trieve_ruby_client/api/message_api.rb +17 -17
  32. data/lib/trieve_ruby_client/api/organization_api.rb +25 -25
  33. data/lib/trieve_ruby_client/api/stripe_api.rb +17 -1
  34. data/lib/trieve_ruby_client/api/topic_api.rb +17 -17
  35. data/lib/trieve_ruby_client/api/user_api.rb +13 -13
  36. data/lib/trieve_ruby_client/api_client.rb +1 -1
  37. data/lib/trieve_ruby_client/api_error.rb +1 -1
  38. data/lib/trieve_ruby_client/configuration.rb +8 -4
  39. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  40. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  41. data/lib/trieve_ruby_client/models/auth_query.rb +238 -0
  42. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +240 -0
  43. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  44. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  45. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  46. data/lib/trieve_ruby_client/models/chunk_data.rb +356 -0
  47. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  48. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  49. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  50. data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
  51. data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
  52. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
  53. data/lib/trieve_ruby_client/models/create_chunk_data.rb +79 -330
  54. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  55. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  56. data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
  57. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  58. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  59. data/lib/trieve_ruby_client/models/dataset.rb +1 -1
  60. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  61. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  62. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  63. data/lib/trieve_ruby_client/models/delete_dataset_request.rb +1 -1
  64. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  65. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  66. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  67. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  68. data/lib/trieve_ruby_client/models/event.rb +1 -1
  69. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  70. data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
  71. data/lib/trieve_ruby_client/models/file.rb +1 -1
  72. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  73. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
  74. data/lib/trieve_ruby_client/models/get_events_data.rb +240 -0
  75. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  76. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  77. data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +1 -1
  78. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  79. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  80. data/lib/trieve_ruby_client/models/message.rb +1 -1
  81. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  82. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  83. data/lib/trieve_ruby_client/models/range.rb +1 -1
  84. data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +1 -1
  85. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
  86. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  87. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +75 -207
  88. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  89. data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
  90. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  91. data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
  92. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
  93. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
  94. data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
  95. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  96. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  97. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +238 -0
  98. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  99. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  100. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  101. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  102. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  103. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  104. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  105. data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
  106. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  107. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  108. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  109. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  110. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  111. data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
  112. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  113. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  114. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  115. data/lib/trieve_ruby_client/version.rb +2 -2
  116. data/lib/trieve_ruby_client.rb +6 -2
  117. data/openapi-generator.yaml +1 -1
  118. data/openapi.json +1233 -824
  119. data/spec/models/auth_query_spec.rb +48 -0
  120. data/spec/models/batch_queued_chunk_response_spec.rb +42 -0
  121. data/spec/models/chunk_data_spec.rb +108 -0
  122. data/spec/models/get_events_data_spec.rb +48 -0
  123. data/spec/models/single_queued_chunk_response_spec.rb +42 -0
  124. data/spec/spec_helper.rb +1 -1
  125. data/trieve_ruby_client-0.3.5.gem +0 -0
  126. data/trieve_ruby_client.gemspec +1 -1
  127. metadata +23 -4
  128. data/trieve_ruby_client-0.3.4.gem +0 -0
  129. data/trieve_ruby_client-0.3.41.gem +0 -0
data/openapi.json CHANGED
@@ -12,28 +12,38 @@
12
12
  "name": "BSL",
13
13
  "url": "https://github.com/devflowinc/trieve/blob/main/LICENSE.txt"
14
14
  },
15
- "version": "0.3.5"
15
+ "version": "0.4.0"
16
16
  },
17
+ "servers": [
18
+ {
19
+ "url": "http://localhost:8090",
20
+ "description": "Local development server"
21
+ },
22
+ {
23
+ "url": "https://api.trieve.ai",
24
+ "description": "Production server"
25
+ }
26
+ ],
17
27
  "paths": {
18
28
  "/api/auth": {
19
29
  "get": {
20
30
  "tags": [
21
31
  "auth"
22
32
  ],
23
- "summary": "login",
24
- "description": "login\n\nThis will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.",
33
+ "summary": "Login",
34
+ "description": "Login\n\nThis will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.",
25
35
  "operationId": "login",
26
- "requestBody": {
27
- "description": "Query parameters for login to be included as kv pairs after ? on the request URL.",
28
- "content": {
29
- "application/x-www-form-urlencoded": {
30
- "schema": {
31
- "$ref": "#/components/schemas/AuthQuery"
32
- }
36
+ "parameters": [
37
+ {
38
+ "name": "content",
39
+ "in": "query",
40
+ "description": "Query parameters for login to be included as kv pairs after ? on the request URL.",
41
+ "required": true,
42
+ "schema": {
43
+ "$ref": "#/components/schemas/AuthQuery"
33
44
  }
34
- },
35
- "required": true
36
- },
45
+ }
46
+ ],
37
47
  "responses": {
38
48
  "303": {
39
49
  "description": "Response that redirects to OAuth provider through a Location header to be handled by browser."
@@ -54,8 +64,8 @@
54
64
  "tags": [
55
65
  "auth"
56
66
  ],
57
- "summary": "logout",
58
- "description": "logout\n\nInvalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.",
67
+ "summary": "Logout",
68
+ "description": "Logout\n\nInvalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.",
59
69
  "operationId": "logout",
60
70
  "responses": {
61
71
  "204": {
@@ -69,8 +79,8 @@
69
79
  "tags": [
70
80
  "auth"
71
81
  ],
72
- "summary": "openid_callback",
73
- "description": "openid_callback\n\nThis is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.",
82
+ "summary": "OpenID Connect callback",
83
+ "description": "OpenID Connect callback\n\nThis is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.",
74
84
  "operationId": "callback",
75
85
  "responses": {
76
86
  "200": {
@@ -101,8 +111,8 @@
101
111
  "tags": [
102
112
  "auth"
103
113
  ],
104
- "summary": "get_me",
105
- "description": "get_me\n\nGet the user corresponding to your current auth credentials.",
114
+ "summary": "Get Me",
115
+ "description": "Get Me\n\nGet the user corresponding to your current auth credentials.",
106
116
  "operationId": "get_me",
107
117
  "responses": {
108
118
  "200": {
@@ -128,10 +138,9 @@
128
138
  },
129
139
  "security": [
130
140
  {
131
- "ApiKey": []
132
- },
133
- {
134
- "Cookie": []
141
+ "ApiKey": [
142
+ "readonly"
143
+ ]
135
144
  }
136
145
  ]
137
146
  }
@@ -141,8 +150,8 @@
141
150
  "tags": [
142
151
  "chunk"
143
152
  ],
144
- "summary": "create_chunk",
145
- "description": "create_chunk\n\nCreate a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.",
153
+ "summary": "Create Chunk",
154
+ "description": "Create Chunk\n\nCreate a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.",
146
155
  "operationId": "create_chunk",
147
156
  "parameters": [
148
157
  {
@@ -178,7 +187,7 @@
178
187
  }
179
188
  },
180
189
  "400": {
181
- "description": "Service error relating to to creating a chunk, likely due to conflicting tracking_id",
190
+ "description": "Error typically due to deserialization issues",
182
191
  "content": {
183
192
  "application/json": {
184
193
  "schema": {
@@ -186,65 +195,9 @@
186
195
  }
187
196
  }
188
197
  }
189
- }
190
- },
191
- "security": [
192
- {
193
- "ApiKey": [
194
- "admin"
195
- ]
196
- },
197
- {
198
- "Cookie": [
199
- "admin"
200
- ]
201
- }
202
- ]
203
- }
204
- },
205
- "/api/chunk/bulk": {
206
- "post": {
207
- "tags": [
208
- "chunk"
209
- ],
210
- "summary": "bulk_create_chunk",
211
- "description": "bulk_create_chunk\n\nCreate a new chunk from an array of chunks. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.",
212
- "operationId": "bulk_create_chunk",
213
- "parameters": [
214
- {
215
- "name": "TR-Dataset",
216
- "in": "header",
217
- "description": "The dataset id to use for the request",
218
- "required": true,
219
- "schema": {
220
- "type": "string"
221
- }
222
- }
223
- ],
224
- "requestBody": {
225
- "description": "JSON request payload to create a new chunk (chunk)",
226
- "content": {
227
- "application/json": {
228
- "schema": {
229
- "$ref": "#/components/schemas/CreateChunkData"
230
- }
231
- }
232
- },
233
- "required": true
234
- },
235
- "responses": {
236
- "200": {
237
- "description": "JSON response payload containing the created chunk",
238
- "content": {
239
- "application/json": {
240
- "schema": {
241
- "$ref": "#/components/schemas/ReturnQueuedChunk"
242
- }
243
- }
244
- }
245
198
  },
246
- "400": {
247
- "description": "Service error relating to to creating a chunk, likely due to conflicting tracking_id",
199
+ "426": {
200
+ "description": "Error when upgrade is needed to process more chunks",
248
201
  "content": {
249
202
  "application/json": {
250
203
  "schema": {
@@ -259,11 +212,6 @@
259
212
  "ApiKey": [
260
213
  "admin"
261
214
  ]
262
- },
263
- {
264
- "Cookie": [
265
- "admin"
266
- ]
267
215
  }
268
216
  ]
269
217
  }
@@ -273,8 +221,8 @@
273
221
  "tags": [
274
222
  "chunk"
275
223
  ],
276
- "summary": "get_suggested_queries",
277
- "description": "get_suggested_queries\n\nThis endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.",
224
+ "summary": "Generate suggested queries",
225
+ "description": "Generate suggested queries\n\nThis endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.",
278
226
  "operationId": "create_suggested_queries_handler",
279
227
  "parameters": [
280
228
  {
@@ -325,11 +273,6 @@
325
273
  "ApiKey": [
326
274
  "readonly"
327
275
  ]
328
- },
329
- {
330
- "Cookie": [
331
- "readonly"
332
- ]
333
276
  }
334
277
  ]
335
278
  }
@@ -339,8 +282,8 @@
339
282
  "tags": [
340
283
  "chunk"
341
284
  ],
342
- "summary": "augmented_generation_from_chunks",
343
- "description": "augmented_generation_from_chunks\n\nThis endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.",
285
+ "summary": "RAG on User Defined Chunks",
286
+ "description": "RAG on User Defined Chunks\n\nThis endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.",
344
287
  "operationId": "generate_off_chunks",
345
288
  "parameters": [
346
289
  {
@@ -391,11 +334,6 @@
391
334
  "ApiKey": [
392
335
  "readonly"
393
336
  ]
394
- },
395
- {
396
- "Cookie": [
397
- "readonly"
398
- ]
399
337
  }
400
338
  ]
401
339
  }
@@ -405,8 +343,8 @@
405
343
  "tags": [
406
344
  "chunk"
407
345
  ],
408
- "summary": "get_recommended_chunks",
409
- "description": "get_recommended_chunks\n\nGet recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint.",
346
+ "summary": "Get Recommended Chunks",
347
+ "description": "Get Recommended Chunks\n\nGet recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint.",
410
348
  "operationId": "get_recommended_chunks",
411
349
  "parameters": [
412
350
  {
@@ -460,11 +398,6 @@
460
398
  "ApiKey": [
461
399
  "readonly"
462
400
  ]
463
- },
464
- {
465
- "Cookie": [
466
- "readonly"
467
- ]
468
401
  }
469
402
  ]
470
403
  }
@@ -474,8 +407,8 @@
474
407
  "tags": [
475
408
  "chunk"
476
409
  ],
477
- "summary": "search",
478
- "description": "search\n\nThis route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b>` tags for sub-sentence highlighting.",
410
+ "summary": "Search",
411
+ "description": "Search\n\nThis route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b>` tags for sub-sentence highlighting.",
479
412
  "operationId": "search_chunk",
480
413
  "parameters": [
481
414
  {
@@ -526,11 +459,6 @@
526
459
  "ApiKey": [
527
460
  "readonly"
528
461
  ]
529
- },
530
- {
531
- "Cookie": [
532
- "readonly"
533
- ]
534
462
  }
535
463
  ]
536
464
  }
@@ -540,8 +468,8 @@
540
468
  "tags": [
541
469
  "chunk"
542
470
  ],
543
- "summary": "update_chunk_by_tracking_id",
544
- "description": "update_chunk_by_tracking_id\n\nUpdate a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.",
471
+ "summary": "Update Chunk By Tracking Id",
472
+ "description": "Update Chunk By Tracking Id\n\nUpdate a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.",
545
473
  "operationId": "update_chunk_by_tracking_id",
546
474
  "parameters": [
547
475
  {
@@ -586,11 +514,6 @@
586
514
  "ApiKey": [
587
515
  "admin"
588
516
  ]
589
- },
590
- {
591
- "Cookie": [
592
- "admin"
593
- ]
594
517
  }
595
518
  ]
596
519
  }
@@ -600,8 +523,8 @@
600
523
  "tags": [
601
524
  "chunk"
602
525
  ],
603
- "summary": "get_chunk_by_tracking_id",
604
- "description": "get_chunk_by_tracking_id\n\nGet a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.",
526
+ "summary": "Get Chunk By Tracking Id",
527
+ "description": "Get Chunk By Tracking Id\n\nGet a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.",
605
528
  "operationId": "get_chunk_by_tracking_id",
606
529
  "parameters": [
607
530
  {
@@ -651,11 +574,6 @@
651
574
  "ApiKey": [
652
575
  "readonly"
653
576
  ]
654
- },
655
- {
656
- "Cookie": [
657
- "readonly"
658
- ]
659
577
  }
660
578
  ]
661
579
  },
@@ -663,8 +581,8 @@
663
581
  "tags": [
664
582
  "chunk"
665
583
  ],
666
- "summary": "delete_chunk_by_tracking_id",
667
- "description": "delete_chunk_by_tracking_id\n\nDelete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.",
584
+ "summary": "Delete Chunk By Tracking Id",
585
+ "description": "Delete Chunk By Tracking Id\n\nDelete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.",
668
586
  "operationId": "delete_chunk_by_tracking_id",
669
587
  "parameters": [
670
588
  {
@@ -707,11 +625,6 @@
707
625
  "ApiKey": [
708
626
  "admin"
709
627
  ]
710
- },
711
- {
712
- "Cookie": [
713
- "admin"
714
- ]
715
628
  }
716
629
  ]
717
630
  }
@@ -721,8 +634,8 @@
721
634
  "tags": [
722
635
  "chunk"
723
636
  ],
724
- "summary": "update_chunk",
725
- "description": "update_chunk\n\nUpdate a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.",
637
+ "summary": "Update Chunk",
638
+ "description": "Update Chunk\n\nUpdate a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.",
726
639
  "operationId": "update_chunk",
727
640
  "parameters": [
728
641
  {
@@ -766,9 +679,135 @@
766
679
  "ApiKey": [
767
680
  "admin"
768
681
  ]
682
+ }
683
+ ]
684
+ }
685
+ },
686
+ "/api/chunk/{tracking_or_chunk}/{chunk_id}": {
687
+ "get": {
688
+ "tags": [
689
+ "chunk"
690
+ ],
691
+ "summary": "Get Chunk By Id",
692
+ "description": "Get Chunk By Id\n\nGet a singular chunk by id.",
693
+ "operationId": "get_chunk_by_id",
694
+ "parameters": [
695
+ {
696
+ "name": "TR-Dataset",
697
+ "in": "header",
698
+ "description": "The dataset id to use for the request",
699
+ "required": true,
700
+ "schema": {
701
+ "type": "string"
702
+ }
703
+ },
704
+ {
705
+ "name": "tracking_or_chunk",
706
+ "in": "path",
707
+ "description": "The type of id you are using to search for the chunk. This can be either 'chunk' or 'tracking_id'",
708
+ "required": true,
709
+ "schema": {
710
+ "type": "string"
711
+ }
712
+ },
713
+ {
714
+ "name": "chunk_id",
715
+ "in": "path",
716
+ "description": "Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.",
717
+ "required": true,
718
+ "schema": {
719
+ "type": "string",
720
+ "format": "uuid",
721
+ "nullable": true
722
+ }
723
+ }
724
+ ],
725
+ "responses": {
726
+ "200": {
727
+ "description": "chunk with the id that you were searching for",
728
+ "content": {
729
+ "application/json": {
730
+ "schema": {
731
+ "$ref": "#/components/schemas/ChunkMetadata"
732
+ }
733
+ }
734
+ }
735
+ },
736
+ "400": {
737
+ "description": "Service error relating to fidning a chunk by tracking_id",
738
+ "content": {
739
+ "application/json": {
740
+ "schema": {
741
+ "$ref": "#/components/schemas/ErrorResponseBody"
742
+ }
743
+ }
744
+ }
745
+ }
746
+ },
747
+ "security": [
748
+ {
749
+ "ApiKey": [
750
+ "readonly"
751
+ ]
752
+ }
753
+ ]
754
+ },
755
+ "delete": {
756
+ "tags": [
757
+ "chunk"
758
+ ],
759
+ "summary": "Delete Chunk",
760
+ "description": "Delete Chunk\n\nDelete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.",
761
+ "operationId": "delete_chunk",
762
+ "parameters": [
763
+ {
764
+ "name": "TR-Dataset",
765
+ "in": "header",
766
+ "description": "The dataset id to use for the request",
767
+ "required": true,
768
+ "schema": {
769
+ "type": "string"
770
+ }
771
+ },
772
+ {
773
+ "name": "tracking_or_chunk",
774
+ "in": "path",
775
+ "description": "The type of id you are using to search for the chunk. This can be either 'chunk' or 'tracking_id'",
776
+ "required": true,
777
+ "schema": {
778
+ "type": "string"
779
+ }
780
+ },
781
+ {
782
+ "name": "chunk_id",
783
+ "in": "path",
784
+ "description": "Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.",
785
+ "required": true,
786
+ "schema": {
787
+ "type": "string",
788
+ "format": "uuid",
789
+ "nullable": true
790
+ }
791
+ }
792
+ ],
793
+ "responses": {
794
+ "204": {
795
+ "description": "Confirmation that the chunk with the id specified was deleted"
769
796
  },
797
+ "400": {
798
+ "description": "Service error relating to finding a chunk by tracking_id",
799
+ "content": {
800
+ "application/json": {
801
+ "schema": {
802
+ "$ref": "#/components/schemas/ErrorResponseBody"
803
+ }
804
+ }
805
+ }
806
+ }
807
+ },
808
+ "security": [
770
809
  {
771
- "Cookie": [
810
+ "ApiKey": [
772
811
  "admin"
773
812
  ]
774
813
  }
@@ -780,8 +819,8 @@
780
819
  "tags": [
781
820
  "chunk_group"
782
821
  ],
783
- "summary": "create_chunk_group",
784
- "description": "create_chunk_group\n\nCreate a new chunk_group.",
822
+ "summary": "Create Chunk Group",
823
+ "description": "Create Chunk Group\n\nCreate a new chunk_group.",
785
824
  "operationId": "create_chunk_group",
786
825
  "parameters": [
787
826
  {
@@ -832,11 +871,6 @@
832
871
  "ApiKey": [
833
872
  "admin"
834
873
  ]
835
- },
836
- {
837
- "Cookie": [
838
- "admin"
839
- ]
840
874
  }
841
875
  ]
842
876
  },
@@ -844,8 +878,8 @@
844
878
  "tags": [
845
879
  "chunk_group"
846
880
  ],
847
- "summary": "update_chunk_group",
848
- "description": "update_chunk_group\n\nUpdate a chunk_group.",
881
+ "summary": "Update Group",
882
+ "description": "Update Group\n\nUpdate a chunk_group.",
849
883
  "operationId": "update_chunk_group",
850
884
  "parameters": [
851
885
  {
@@ -889,11 +923,6 @@
889
923
  "ApiKey": [
890
924
  "admin"
891
925
  ]
892
- },
893
- {
894
- "Cookie": [
895
- "admin"
896
- ]
897
926
  }
898
927
  ]
899
928
  }
@@ -903,8 +932,8 @@
903
932
  "tags": [
904
933
  "chunk_group"
905
934
  ],
906
- "summary": "add_chunk_to_group",
907
- "description": "add_chunk_to_group\n\nRoute to add a chunk to a group",
935
+ "summary": "Add Chunk to Group",
936
+ "description": "Add Chunk to Group\n\nRoute to add a chunk to a group",
908
937
  "operationId": "add_chunk_to_group",
909
938
  "parameters": [
910
939
  {
@@ -959,11 +988,6 @@
959
988
  "ApiKey": [
960
989
  "admin"
961
990
  ]
962
- },
963
- {
964
- "Cookie": [
965
- "admin"
966
- ]
967
991
  }
968
992
  ]
969
993
  },
@@ -971,8 +995,8 @@
971
995
  "tags": [
972
996
  "chunk_group"
973
997
  ],
974
- "summary": "remove_chunk_from_group",
975
- "description": "remove_chunk_from_group\n\nRoute to remove a chunk from a group.",
998
+ "summary": "Remove Chunk from Group",
999
+ "description": "Remove Chunk from Group\n\nRoute to remove a chunk from a group.",
976
1000
  "operationId": "remove_chunk_from_group",
977
1001
  "parameters": [
978
1002
  {
@@ -1027,11 +1051,6 @@
1027
1051
  "ApiKey": [
1028
1052
  "admin"
1029
1053
  ]
1030
- },
1031
- {
1032
- "Cookie": [
1033
- "admin"
1034
- ]
1035
1054
  }
1036
1055
  ]
1037
1056
  }
@@ -1041,6 +1060,8 @@
1041
1060
  "tags": [
1042
1061
  "chunk_group"
1043
1062
  ],
1063
+ "summary": "Get Groups for Chunks",
1064
+ "description": "Get Groups for Chunks\n\nRoute to get the groups that a chunk is in.",
1044
1065
  "operationId": "get_groups_chunk_is_in",
1045
1066
  "parameters": [
1046
1067
  {
@@ -1094,11 +1115,6 @@
1094
1115
  "ApiKey": [
1095
1116
  "readonly"
1096
1117
  ]
1097
- },
1098
- {
1099
- "Cookie": [
1100
- "readonly"
1101
- ]
1102
1118
  }
1103
1119
  ]
1104
1120
  }
@@ -1108,8 +1124,8 @@
1108
1124
  "tags": [
1109
1125
  "chunk_group"
1110
1126
  ],
1111
- "summary": "group_oriented_search",
1112
- "description": "group_oriented_search\n\nThis route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes.",
1127
+ "summary": "Search Over Groups",
1128
+ "description": "Search Over Groups\n\nThis route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes.",
1113
1129
  "operationId": "search_over_groups",
1114
1130
  "requestBody": {
1115
1131
  "description": "JSON request payload to semantically search over groups",
@@ -1151,6 +1167,8 @@
1151
1167
  "tags": [
1152
1168
  "chunk_group"
1153
1169
  ],
1170
+ "summary": "Get Recommended Groups",
1171
+ "description": "Get Recommended Groups\n\nRoute to get recommended groups. This route will return groups which are similar to the groups in the request body.",
1154
1172
  "operationId": "get_recommended_groups",
1155
1173
  "parameters": [
1156
1174
  {
@@ -1204,11 +1222,6 @@
1204
1222
  "ApiKey": [
1205
1223
  "readonly"
1206
1224
  ]
1207
- },
1208
- {
1209
- "Cookie": [
1210
- "readonly"
1211
- ]
1212
1225
  }
1213
1226
  ]
1214
1227
  }
@@ -1218,8 +1231,8 @@
1218
1231
  "tags": [
1219
1232
  "chunk_group"
1220
1233
  ],
1221
- "summary": "search_within_group",
1222
- "description": "search_within_group\n\nThis route allows you to search only within a group. This is useful for when you only want search results to contain chunks which are members of a specific group. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large.",
1234
+ "summary": "Search Within Group",
1235
+ "description": "Search Within Group\n\nThis route allows you to search only within a group. This is useful for when you only want search results to contain chunks which are members of a specific group. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large.",
1223
1236
  "operationId": "search_within_group",
1224
1237
  "parameters": [
1225
1238
  {
@@ -1270,11 +1283,6 @@
1270
1283
  "ApiKey": [
1271
1284
  "readonly"
1272
1285
  ]
1273
- },
1274
- {
1275
- "Cookie": [
1276
- "readonly"
1277
- ]
1278
1286
  }
1279
1287
  ]
1280
1288
  }
@@ -1284,8 +1292,8 @@
1284
1292
  "tags": [
1285
1293
  "chunk_group"
1286
1294
  ],
1287
- "summary": "get_chunks_in_group_by_tracking_id",
1288
- "description": "get_chunks_in_group_by_tracking_id\n\nRoute to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.",
1295
+ "summary": "Get Chunks in Group by Tracking ID",
1296
+ "description": "Get Chunks in Group by Tracking ID\n\nRoute to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.",
1289
1297
  "operationId": "get_chunks_in_group_by_tracking_id",
1290
1298
  "parameters": [
1291
1299
  {
@@ -1347,11 +1355,6 @@
1347
1355
  "ApiKey": [
1348
1356
  "readonly"
1349
1357
  ]
1350
- },
1351
- {
1352
- "Cookie": [
1353
- "readonly"
1354
- ]
1355
1358
  }
1356
1359
  ]
1357
1360
  }
@@ -1361,8 +1364,8 @@
1361
1364
  "tags": [
1362
1365
  "chunk_group"
1363
1366
  ],
1364
- "summary": "get_group_by_tracking_id",
1365
- "description": "get_group_by_tracking_id",
1367
+ "summary": "Get Group by Tracking ID",
1368
+ "description": "Get Group by Tracking ID\n\nFetch the group with the given tracking id.\nget_group_by_tracking_id",
1366
1369
  "operationId": "get_group_by_tracking_id",
1367
1370
  "parameters": [
1368
1371
  {
@@ -1412,11 +1415,6 @@
1412
1415
  "ApiKey": [
1413
1416
  "readonly"
1414
1417
  ]
1415
- },
1416
- {
1417
- "Cookie": [
1418
- "readonly"
1419
- ]
1420
1418
  }
1421
1419
  ]
1422
1420
  },
@@ -1424,8 +1422,8 @@
1424
1422
  "tags": [
1425
1423
  "chunk_group"
1426
1424
  ],
1427
- "summary": "add_chunk_to_group_by_tracking_id",
1428
- "description": "add_chunk_to_group_by_tracking_id\n\nRoute to add a chunk to a group by tracking id. Think of a bookmark as a chunk which is a member of a group.",
1425
+ "summary": "Add Chunk to Group by Tracking ID",
1426
+ "description": "Add Chunk to Group by Tracking ID\n\nRoute to add a chunk to a group by tracking id. Think of a bookmark as a chunk which is a member of a group.",
1429
1427
  "operationId": "add_chunk_to_group_by_tracking_id",
1430
1428
  "parameters": [
1431
1429
  {
@@ -1479,11 +1477,6 @@
1479
1477
  "ApiKey": [
1480
1478
  "admin"
1481
1479
  ]
1482
- },
1483
- {
1484
- "Cookie": [
1485
- "admin"
1486
- ]
1487
1480
  }
1488
1481
  ]
1489
1482
  },
@@ -1491,6 +1484,8 @@
1491
1484
  "tags": [
1492
1485
  "chunk_group"
1493
1486
  ],
1487
+ "summary": "Update Group by Tracking ID",
1488
+ "description": "Update Group by Tracking ID\n\nUpdate a chunk_group with the given tracking id.",
1494
1489
  "operationId": "update_group_by_tracking_id",
1495
1490
  "parameters": [
1496
1491
  {
@@ -1545,11 +1540,6 @@
1545
1540
  "ApiKey": [
1546
1541
  "admin"
1547
1542
  ]
1548
- },
1549
- {
1550
- "Cookie": [
1551
- "admin"
1552
- ]
1553
1543
  }
1554
1544
  ]
1555
1545
  },
@@ -1557,6 +1547,8 @@
1557
1547
  "tags": [
1558
1548
  "chunk_group"
1559
1549
  ],
1550
+ "summary": "Delete Group by Tracking ID",
1551
+ "description": "Delete Group by Tracking ID\n\nDelete a chunk_group with the given tracking id.",
1560
1552
  "operationId": "delete_group_by_tracking_id",
1561
1553
  "parameters": [
1562
1554
  {
@@ -1599,23 +1591,18 @@
1599
1591
  "ApiKey": [
1600
1592
  "admin"
1601
1593
  ]
1602
- },
1603
- {
1604
- "Cookie": [
1605
- "admin"
1606
- ]
1607
1594
  }
1608
1595
  ]
1609
1596
  }
1610
1597
  },
1611
- "/api/chunk_group/{tracking_or_chunk}/{group_id}/{page}": {
1598
+ "/api/chunk_group/{tracking_or_chunk}/{group_id}": {
1612
1599
  "get": {
1613
1600
  "tags": [
1614
1601
  "chunk_group"
1615
1602
  ],
1616
- "summary": "get_chunks_in_group",
1617
- "description": "get_chunks_in_group\n\nRoute to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.",
1618
- "operationId": "get_chunks_in_group",
1603
+ "summary": "Get Group",
1604
+ "description": "Get Group\n\nFetch the group with the given id.\nget_group",
1605
+ "operationId": "get_chunk_group",
1619
1606
  "parameters": [
1620
1607
  {
1621
1608
  "name": "TR-Dataset",
@@ -1626,20 +1613,146 @@
1626
1613
  "type": "string"
1627
1614
  }
1628
1615
  },
1616
+ {
1617
+ "name": "tracking_or_chunk",
1618
+ "in": "path",
1619
+ "description": "The type of id you are using to search for the group. This can be either 'chunk' or 'tracking_id'",
1620
+ "required": true,
1621
+ "schema": {
1622
+ "type": "string"
1623
+ }
1624
+ },
1629
1625
  {
1630
1626
  "name": "group_id",
1631
1627
  "in": "path",
1632
- "description": "Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.",
1628
+ "description": "Id of the group you want to fetch. This can be either the group_id or the tracking_id.",
1633
1629
  "required": true,
1634
1630
  "schema": {
1635
- "allOf": [
1636
- {
1637
- "$ref": "#/components/schemas/uuid"
1631
+ "type": "string",
1632
+ "format": "uuid",
1633
+ "nullable": true
1634
+ }
1635
+ }
1636
+ ],
1637
+ "responses": {
1638
+ "200": {
1639
+ "description": "JSON body representing the group with the given tracking id",
1640
+ "content": {
1641
+ "application/json": {
1642
+ "schema": {
1643
+ "$ref": "#/components/schemas/ChunkGroup"
1638
1644
  }
1639
- ],
1645
+ }
1646
+ }
1647
+ },
1648
+ "400": {
1649
+ "description": "Service error relating to getting the group with the given tracking id",
1650
+ "content": {
1651
+ "application/json": {
1652
+ "schema": {
1653
+ "$ref": "#/components/schemas/ErrorResponseBody"
1654
+ }
1655
+ }
1656
+ }
1657
+ }
1658
+ },
1659
+ "security": [
1660
+ {
1661
+ "ApiKey": [
1662
+ "readonly"
1663
+ ]
1664
+ }
1665
+ ]
1666
+ },
1667
+ "delete": {
1668
+ "tags": [
1669
+ "chunk_group"
1670
+ ],
1671
+ "summary": "Delete Group",
1672
+ "description": "Delete Group\n\nThis will delete a chunk_group. This will not delete the chunks that are in the group. We will soon support deleting a chunk_group along with its member chunks.",
1673
+ "operationId": "delete_chunk_group",
1674
+ "parameters": [
1675
+ {
1676
+ "name": "TR-Dataset",
1677
+ "in": "header",
1678
+ "description": "The dataset id to use for the request",
1679
+ "required": true,
1680
+ "schema": {
1681
+ "type": "string"
1682
+ }
1683
+ },
1684
+ {
1685
+ "name": "tracking_or_chunk",
1686
+ "in": "path",
1687
+ "description": "The type of id you are using to search for the group. This can be either 'chunk' or 'tracking_id'",
1688
+ "required": true,
1689
+ "schema": {
1690
+ "type": "string"
1691
+ }
1692
+ },
1693
+ {
1694
+ "name": "group_id",
1695
+ "in": "path",
1696
+ "description": "Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.",
1697
+ "required": true,
1698
+ "schema": {
1699
+ "type": "string",
1700
+ "format": "uuid",
1640
1701
  "nullable": true
1641
1702
  }
1642
1703
  },
1704
+ {
1705
+ "name": "delete_chunks",
1706
+ "in": "query",
1707
+ "description": "Delete the chunks within the group",
1708
+ "required": true,
1709
+ "schema": {
1710
+ "type": "boolean"
1711
+ }
1712
+ }
1713
+ ],
1714
+ "responses": {
1715
+ "204": {
1716
+ "description": "Confirmation that the chunkGroup was deleted"
1717
+ },
1718
+ "400": {
1719
+ "description": "Service error relating to deleting the chunkGroup",
1720
+ "content": {
1721
+ "application/json": {
1722
+ "schema": {
1723
+ "$ref": "#/components/schemas/ErrorResponseBody"
1724
+ }
1725
+ }
1726
+ }
1727
+ }
1728
+ },
1729
+ "security": [
1730
+ {
1731
+ "ApiKey": [
1732
+ "admin"
1733
+ ]
1734
+ }
1735
+ ]
1736
+ }
1737
+ },
1738
+ "/api/chunk_group/{tracking_or_chunk}/{group_id}/{page}": {
1739
+ "get": {
1740
+ "tags": [
1741
+ "chunk_group"
1742
+ ],
1743
+ "summary": "Get Chunks in Group",
1744
+ "description": "Get Chunks in Group\n\nRoute to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.",
1745
+ "operationId": "get_chunks_in_group",
1746
+ "parameters": [
1747
+ {
1748
+ "name": "TR-Dataset",
1749
+ "in": "header",
1750
+ "description": "The dataset id to use for the request",
1751
+ "required": true,
1752
+ "schema": {
1753
+ "type": "string"
1754
+ }
1755
+ },
1643
1756
  {
1644
1757
  "name": "tracking_or_chunk",
1645
1758
  "in": "path",
@@ -1649,6 +1762,17 @@
1649
1762
  "type": "string"
1650
1763
  }
1651
1764
  },
1765
+ {
1766
+ "name": "group_id",
1767
+ "in": "path",
1768
+ "description": "Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.",
1769
+ "required": true,
1770
+ "schema": {
1771
+ "type": "string",
1772
+ "format": "uuid",
1773
+ "nullable": true
1774
+ }
1775
+ },
1652
1776
  {
1653
1777
  "name": "page",
1654
1778
  "in": "path",
@@ -1688,11 +1812,6 @@
1688
1812
  "ApiKey": [
1689
1813
  "readonly"
1690
1814
  ]
1691
- },
1692
- {
1693
- "Cookie": [
1694
- "readonly"
1695
- ]
1696
1815
  }
1697
1816
  ]
1698
1817
  }
@@ -1702,8 +1821,8 @@
1702
1821
  "tags": [
1703
1822
  "dataset"
1704
1823
  ],
1705
- "summary": "create_dataset",
1706
- "description": "create_dataset\n\nCreate a new dataset. The auth'ed user must be an owner of the organization to create a dataset.",
1824
+ "summary": "Create dataset",
1825
+ "description": "Create dataset\n\nCreate a new dataset. The auth'ed user must be an owner of the organization to create a dataset.",
1707
1826
  "operationId": "create_dataset",
1708
1827
  "parameters": [
1709
1828
  {
@@ -1754,11 +1873,6 @@
1754
1873
  "ApiKey": [
1755
1874
  "owner"
1756
1875
  ]
1757
- },
1758
- {
1759
- "Cookie": [
1760
- "owner"
1761
- ]
1762
1876
  }
1763
1877
  ]
1764
1878
  },
@@ -1766,8 +1880,8 @@
1766
1880
  "tags": [
1767
1881
  "dataset"
1768
1882
  ],
1769
- "summary": "update_dataset",
1770
- "description": "update_dataset\n\nUpdate a dataset. The auth'ed user must be an owner of the organization to update a dataset.",
1883
+ "summary": "Update Dataset",
1884
+ "description": "Update Dataset\n\nUpdate a dataset. The auth'ed user must be an owner of the organization to update a dataset.",
1771
1885
  "operationId": "update_dataset",
1772
1886
  "parameters": [
1773
1887
  {
@@ -1818,11 +1932,6 @@
1818
1932
  "ApiKey": [
1819
1933
  "owner"
1820
1934
  ]
1821
- },
1822
- {
1823
- "Cookie": [
1824
- "owner"
1825
- ]
1826
1935
  }
1827
1936
  ]
1828
1937
  },
@@ -1830,8 +1939,8 @@
1830
1939
  "tags": [
1831
1940
  "dataset"
1832
1941
  ],
1833
- "summary": "delete_dataset",
1834
- "description": "delete_dataset\n\nDelete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.",
1942
+ "summary": "Delete Dataset",
1943
+ "description": "Delete Dataset\n\nDelete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.",
1835
1944
  "operationId": "delete_dataset",
1836
1945
  "parameters": [
1837
1946
  {
@@ -1875,11 +1984,6 @@
1875
1984
  "ApiKey": [
1876
1985
  "owner"
1877
1986
  ]
1878
- },
1879
- {
1880
- "Cookie": [
1881
- "owner"
1882
- ]
1883
1987
  }
1884
1988
  ]
1885
1989
  }
@@ -1889,8 +1993,8 @@
1889
1993
  "tags": [
1890
1994
  "dataset"
1891
1995
  ],
1892
- "summary": "get_client_dataset_config",
1893
- "description": "get_client_dataset_config\n\nGet the client configuration for a dataset. Will use the TR-D",
1996
+ "summary": "Get Client Configuration",
1997
+ "description": "Get Client Configuration\n\nGet the client configuration for a dataset. Will use the TR-D",
1894
1998
  "operationId": "get_client_dataset_config",
1895
1999
  "parameters": [
1896
2000
  {
@@ -1930,11 +2034,6 @@
1930
2034
  "ApiKey": [
1931
2035
  "readonly"
1932
2036
  ]
1933
- },
1934
- {
1935
- "Cookie": [
1936
- "readonly"
1937
- ]
1938
2037
  }
1939
2038
  ]
1940
2039
  }
@@ -1944,8 +2043,8 @@
1944
2043
  "tags": [
1945
2044
  "file"
1946
2045
  ],
1947
- "summary": "get_dataset_files",
1948
- "description": "get_dataset_files\n\nGet all files which belong to a given dataset specified by the dataset_id parameter. 10 files are returned per page.",
2046
+ "summary": "Get Files for Dataset",
2047
+ "description": "Get Files for Dataset\n\nGet all files which belong to a given dataset specified by the dataset_id parameter. 10 files are returned per page.",
1949
2048
  "operationId": "get_dataset_files_handler",
1950
2049
  "parameters": [
1951
2050
  {
@@ -2009,11 +2108,6 @@
2009
2108
  "ApiKey": [
2010
2109
  "readonly"
2011
2110
  ]
2012
- },
2013
- {
2014
- "Cookie": [
2015
- "readonly"
2016
- ]
2017
2111
  }
2018
2112
  ]
2019
2113
  }
@@ -2023,8 +2117,8 @@
2023
2117
  "tags": [
2024
2118
  "chunk_group"
2025
2119
  ],
2026
- "summary": "get_dataset_groups",
2027
- "description": "get_dataset_groups\n\nFetch the groups which belong to a dataset specified by its id.",
2120
+ "summary": "Get Groups for Dataset",
2121
+ "description": "Get Groups for Dataset\n\nFetch the groups which belong to a dataset specified by its id.",
2028
2122
  "operationId": "get_specific_dataset_chunk_groups",
2029
2123
  "parameters": [
2030
2124
  {
@@ -2084,11 +2178,6 @@
2084
2178
  "ApiKey": [
2085
2179
  "readonly"
2086
2180
  ]
2087
- },
2088
- {
2089
- "Cookie": [
2090
- "readonly"
2091
- ]
2092
2181
  }
2093
2182
  ]
2094
2183
  }
@@ -2098,8 +2187,8 @@
2098
2187
  "tags": [
2099
2188
  "dataset"
2100
2189
  ],
2101
- "summary": "get_organization_datasets",
2102
- "description": "get_organization_datasets\n\nGet all datasets for an organization. The auth'ed user must be an admin or owner of the organization to get its datasets.",
2190
+ "summary": "Get Datasets from Organization",
2191
+ "description": "Get Datasets from Organization\n\nGet all datasets for an organization. The auth'ed user must be an admin or owner of the organization to get its datasets.",
2103
2192
  "operationId": "get_datasets_from_organization",
2104
2193
  "parameters": [
2105
2194
  {
@@ -2152,11 +2241,6 @@
2152
2241
  "ApiKey": [
2153
2242
  "admin"
2154
2243
  ]
2155
- },
2156
- {
2157
- "Cookie": [
2158
- "admin"
2159
- ]
2160
2244
  }
2161
2245
  ]
2162
2246
  }
@@ -2166,8 +2250,8 @@
2166
2250
  "tags": [
2167
2251
  "dataset"
2168
2252
  ],
2169
- "summary": "get_dataset",
2170
- "description": "get_dataset\n\nGet a dataset by id. The auth'ed user must be an admin or owner of the organization to get a dataset.",
2253
+ "summary": "Get Dataset",
2254
+ "description": "Get Dataset\n\nGet a dataset by id. The auth'ed user must be an admin or owner of the organization to get a dataset.",
2171
2255
  "operationId": "get_dataset",
2172
2256
  "parameters": [
2173
2257
  {
@@ -2226,22 +2310,17 @@
2226
2310
  "ApiKey": [
2227
2311
  "admin"
2228
2312
  ]
2229
- },
2230
- {
2231
- "Cookie": [
2232
- "admin"
2233
- ]
2234
2313
  }
2235
2314
  ]
2236
2315
  }
2237
2316
  },
2238
- "/api/events/{page}": {
2239
- "get": {
2317
+ "/api/events": {
2318
+ "post": {
2240
2319
  "tags": [
2241
2320
  "events"
2242
2321
  ],
2243
- "summary": "get_events",
2244
- "description": "get_events\n\nGet events for the auth'ed user. Currently, this is only for events belonging to the auth'ed user. Soon, we plan to associate events to datasets instead of users. Each page contains 10 events.",
2322
+ "summary": "Get events for the dataset",
2323
+ "description": "Get events for the dataset\n\nGet events for the auth'ed user. Currently, this is only for events belonging to the auth'ed user. Soon, we plan to associate events to datasets instead of users.",
2245
2324
  "operationId": "get_events",
2246
2325
  "parameters": [
2247
2326
  {
@@ -2252,18 +2331,19 @@
2252
2331
  "schema": {
2253
2332
  "type": "string"
2254
2333
  }
2255
- },
2256
- {
2257
- "name": "page",
2258
- "in": "path",
2259
- "description": "Page number of events to get",
2260
- "required": true,
2261
- "schema": {
2262
- "type": "integer",
2263
- "format": "int64"
2264
- }
2265
2334
  }
2266
2335
  ],
2336
+ "requestBody": {
2337
+ "description": "JSON request payload to get events for a dataset",
2338
+ "content": {
2339
+ "application/json": {
2340
+ "schema": {
2341
+ "$ref": "#/components/schemas/GetEventsData"
2342
+ }
2343
+ }
2344
+ },
2345
+ "required": true
2346
+ },
2267
2347
  "responses": {
2268
2348
  "200": {
2269
2349
  "description": "Events for the dataset",
@@ -2291,11 +2371,6 @@
2291
2371
  "ApiKey": [
2292
2372
  "readonly"
2293
2373
  ]
2294
- },
2295
- {
2296
- "Cookie": [
2297
- "readonly"
2298
- ]
2299
2374
  }
2300
2375
  ]
2301
2376
  }
@@ -2305,8 +2380,8 @@
2305
2380
  "tags": [
2306
2381
  "file"
2307
2382
  ],
2308
- "summary": "upload_file",
2309
- "description": "upload_file\n\nUpload a file to S3 attached to the server. The file will be converted to HTML with tika and chunked algorithmically, images will be OCR'ed with tesseract. The resulting chunks will be indexed and searchable. Optionally, you can only upload the file and manually create chunks associated to the file after. See docs.trieve.ai and/or contact us for more details and tips. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.",
2383
+ "summary": "Upload File",
2384
+ "description": "Upload File\n\nUpload a file to S3 attached to the server. The file will be converted to HTML with tika and chunked algorithmically, images will be OCR'ed with tesseract. The resulting chunks will be indexed and searchable. Optionally, you can only upload the file and manually create chunks associated to the file after. See docs.trieve.ai and/or contact us for more details and tips. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.",
2310
2385
  "operationId": "upload_file_handler",
2311
2386
  "parameters": [
2312
2387
  {
@@ -2357,11 +2432,6 @@
2357
2432
  "ApiKey": [
2358
2433
  "admin"
2359
2434
  ]
2360
- },
2361
- {
2362
- "Cookie": [
2363
- "admin"
2364
- ]
2365
2435
  }
2366
2436
  ]
2367
2437
  }
@@ -2371,8 +2441,8 @@
2371
2441
  "tags": [
2372
2442
  "file"
2373
2443
  ],
2374
- "summary": "get_file",
2375
- "description": "get_file\n\nDownload a file from S3 attached to the server based on its id. We plan to add support for getting signed S3 URLs to download from S3 directly in a release soon.",
2444
+ "summary": "Get File",
2445
+ "description": "Get File\n\nDownload a file from S3 attached to the server based on its id. We plan to add support for getting signed S3 URLs to download from S3 directly in a release soon.",
2376
2446
  "operationId": "get_file_handler",
2377
2447
  "parameters": [
2378
2448
  {
@@ -2422,11 +2492,6 @@
2422
2492
  "ApiKey": [
2423
2493
  "readonly"
2424
2494
  ]
2425
- },
2426
- {
2427
- "Cookie": [
2428
- "readonly"
2429
- ]
2430
2495
  }
2431
2496
  ]
2432
2497
  },
@@ -2434,8 +2499,8 @@
2434
2499
  "tags": [
2435
2500
  "file"
2436
2501
  ],
2437
- "summary": "delete_file",
2438
- "description": "delete_file\n\nDelete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but will not delete the chunks. We plan to add support for deleting chunks in a release soon. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.",
2502
+ "summary": "Delete File",
2503
+ "description": "Delete File\n\nDelete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but will not delete the chunks. We plan to add support for deleting chunks in a release soon. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.",
2439
2504
  "operationId": "delete_file_handler",
2440
2505
  "parameters": [
2441
2506
  {
@@ -2487,11 +2552,6 @@
2487
2552
  "ApiKey": [
2488
2553
  "admin"
2489
2554
  ]
2490
- },
2491
- {
2492
- "Cookie": [
2493
- "admin"
2494
- ]
2495
2555
  }
2496
2556
  ]
2497
2557
  }
@@ -2501,6 +2561,8 @@
2501
2561
  "tags": [
2502
2562
  "health"
2503
2563
  ],
2564
+ "summary": "Health Check",
2565
+ "description": "Health Check\n\nConfirmation that the service is healthy and can make embedding vectors",
2504
2566
  "operationId": "health_check",
2505
2567
  "responses": {
2506
2568
  "200": {
@@ -2524,8 +2586,8 @@
2524
2586
  "tags": [
2525
2587
  "invitation"
2526
2588
  ],
2527
- "summary": "send_invitation",
2528
- "description": "send_invitation\n\nInvitations act as a way to invite users to join an organization. After a user is invited, they will automatically be added to the organization with the role specified in the invitation once they set their.",
2589
+ "summary": "Send Invitation",
2590
+ "description": "Send Invitation\n\nInvitations act as a way to invite users to join an organization. After a user is invited, they will automatically be added to the organization with the role specified in the invitation once they set their.",
2529
2591
  "operationId": "post_invitation",
2530
2592
  "parameters": [
2531
2593
  {
@@ -2569,11 +2631,6 @@
2569
2631
  "ApiKey": [
2570
2632
  "admin"
2571
2633
  ]
2572
- },
2573
- {
2574
- "Cookie": [
2575
- "admin"
2576
- ]
2577
2634
  }
2578
2635
  ]
2579
2636
  }
@@ -2583,8 +2640,8 @@
2583
2640
  "tags": [
2584
2641
  "message"
2585
2642
  ],
2586
- "summary": "create_message",
2587
- "description": "create_message\n\nCreate a message. Messages are attached to topics in order to coordinate memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon. Currently, you can only send user messages. If the topic is a RAG topic then the response will include Chunks first on the stream. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.",
2643
+ "summary": "Create a message",
2644
+ "description": "Create a message\n\nCreate a message. Messages are attached to topics in order to coordinate memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon. Currently, you can only send user messages. If the topic is a RAG topic then the response will include Chunks first on the stream. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.",
2588
2645
  "operationId": "create_message_completion_handler",
2589
2646
  "parameters": [
2590
2647
  {
@@ -2635,11 +2692,6 @@
2635
2692
  "ApiKey": [
2636
2693
  "readonly"
2637
2694
  ]
2638
- },
2639
- {
2640
- "Cookie": [
2641
- "readonly"
2642
- ]
2643
2695
  }
2644
2696
  ]
2645
2697
  },
@@ -2647,8 +2699,8 @@
2647
2699
  "tags": [
2648
2700
  "message"
2649
2701
  ],
2650
- "summary": "edit_message",
2651
- "description": "edit_message\n\nEdit a message which exists within the topic's chat history. This will delete the message and replace it with a new message. The new message will be generated by the AI based on the new content provided in the request body. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.",
2702
+ "summary": "Edit a message",
2703
+ "description": "Edit a message\n\nEdit a message which exists within the topic's chat history. This will delete the message and replace it with a new message. The new message will be generated by the AI based on the new content provided in the request body. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.",
2652
2704
  "operationId": "edit_message_handler",
2653
2705
  "parameters": [
2654
2706
  {
@@ -2692,11 +2744,6 @@
2692
2744
  "ApiKey": [
2693
2745
  "readonly"
2694
2746
  ]
2695
- },
2696
- {
2697
- "Cookie": [
2698
- "readonly"
2699
- ]
2700
2747
  }
2701
2748
  ]
2702
2749
  },
@@ -2704,8 +2751,8 @@
2704
2751
  "tags": [
2705
2752
  "message"
2706
2753
  ],
2707
- "summary": "regenerate_message",
2708
- "description": "regenerate_message\n\nRegenerate the assistant response to the last user message of a topic. This will delete the last message and replace it with a new message. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.",
2754
+ "summary": "Regenerate message",
2755
+ "description": "Regenerate message\n\nRegenerate the assistant response to the last user message of a topic. This will delete the last message and replace it with a new message. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.",
2709
2756
  "operationId": "regenerate_message_handler",
2710
2757
  "parameters": [
2711
2758
  {
@@ -2756,11 +2803,6 @@
2756
2803
  "ApiKey": [
2757
2804
  "readonly"
2758
2805
  ]
2759
- },
2760
- {
2761
- "Cookie": [
2762
- "readonly"
2763
- ]
2764
2806
  }
2765
2807
  ]
2766
2808
  }
@@ -2770,8 +2812,8 @@
2770
2812
  "tags": [
2771
2813
  "message"
2772
2814
  ],
2773
- "summary": "get_all_messages",
2774
- "description": "get_all_messages\n\nGet all messages for a given topic. If the topic is a RAG topic then the response will include Chunks first on each message. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.",
2815
+ "summary": "Get all messages for a given topic",
2816
+ "description": "Get all messages for a given topic\n\nGet all messages for a given topic. If the topic is a RAG topic then the response will include Chunks first on each message. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.",
2775
2817
  "operationId": "get_all_topic_messages",
2776
2818
  "parameters": [
2777
2819
  {
@@ -2824,11 +2866,6 @@
2824
2866
  "ApiKey": [
2825
2867
  "readonly"
2826
2868
  ]
2827
- },
2828
- {
2829
- "Cookie": [
2830
- "readonly"
2831
- ]
2832
2869
  }
2833
2870
  ]
2834
2871
  }
@@ -2838,8 +2875,8 @@
2838
2875
  "tags": [
2839
2876
  "organization"
2840
2877
  ],
2841
- "summary": "create_organization",
2842
- "description": "create_organization\n\nCreate a new organization. The auth'ed user who creates the organization will be the default owner of the organization.",
2878
+ "summary": "Create Organization",
2879
+ "description": "Create Organization\n\nCreate a new organization. The auth'ed user who creates the organization will be the default owner of the organization.",
2843
2880
  "operationId": "create_organization",
2844
2881
  "requestBody": {
2845
2882
  "description": "The organization data that you want to create",
@@ -2879,11 +2916,6 @@
2879
2916
  "ApiKey": [
2880
2917
  "readonly"
2881
2918
  ]
2882
- },
2883
- {
2884
- "Cookie": [
2885
- "readonly"
2886
- ]
2887
2919
  }
2888
2920
  ]
2889
2921
  },
@@ -2891,8 +2923,8 @@
2891
2923
  "tags": [
2892
2924
  "organization"
2893
2925
  ],
2894
- "summary": "update_organization",
2895
- "description": "update_organization\n\nUpdate an organization. Only the owner of the organization can update it.",
2926
+ "summary": "Update Organization",
2927
+ "description": "Update Organization\n\nUpdate an organization. Only the owner of the organization can update it.",
2896
2928
  "operationId": "update_organization",
2897
2929
  "parameters": [
2898
2930
  {
@@ -2943,11 +2975,6 @@
2943
2975
  "ApiKey": [
2944
2976
  "owner"
2945
2977
  ]
2946
- },
2947
- {
2948
- "Cookie": [
2949
- "owner"
2950
- ]
2951
2978
  }
2952
2979
  ]
2953
2980
  }
@@ -2957,8 +2984,8 @@
2957
2984
  "tags": [
2958
2985
  "organization"
2959
2986
  ],
2960
- "summary": "get_organization_usage",
2961
- "description": "get_organization_usage\n\nFetch the current usage specification of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.",
2987
+ "summary": "Get Organization Usage",
2988
+ "description": "Get Organization Usage\n\nFetch the current usage specification of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.",
2962
2989
  "operationId": "get_organization_usage",
2963
2990
  "parameters": [
2964
2991
  {
@@ -3008,11 +3035,6 @@
3008
3035
  "ApiKey": [
3009
3036
  "admin"
3010
3037
  ]
3011
- },
3012
- {
3013
- "Cookie": [
3014
- "admin"
3015
- ]
3016
3038
  }
3017
3039
  ]
3018
3040
  }
@@ -3022,8 +3044,8 @@
3022
3044
  "tags": [
3023
3045
  "organization"
3024
3046
  ],
3025
- "summary": "get_organization_users",
3026
- "description": "get_organization_users\n\nFetch the users of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.",
3047
+ "summary": "Get Organization Users",
3048
+ "description": "Get Organization Users\n\nFetch the users of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.",
3027
3049
  "operationId": "get_organization_users",
3028
3050
  "parameters": [
3029
3051
  {
@@ -3076,11 +3098,6 @@
3076
3098
  "ApiKey": [
3077
3099
  "admin"
3078
3100
  ]
3079
- },
3080
- {
3081
- "Cookie": [
3082
- "admin"
3083
- ]
3084
3101
  }
3085
3102
  ]
3086
3103
  }
@@ -3090,8 +3107,8 @@
3090
3107
  "tags": [
3091
3108
  "organization"
3092
3109
  ],
3093
- "summary": "get_organization",
3094
- "description": "get_organization\n\nFetch the details of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.",
3110
+ "summary": "Get Organization",
3111
+ "description": "Get Organization\n\nFetch the details of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.",
3095
3112
  "operationId": "get_organization_by_id",
3096
3113
  "parameters": [
3097
3114
  {
@@ -3141,11 +3158,6 @@
3141
3158
  "ApiKey": [
3142
3159
  "admin"
3143
3160
  ]
3144
- },
3145
- {
3146
- "Cookie": [
3147
- "admin"
3148
- ]
3149
3161
  }
3150
3162
  ]
3151
3163
  },
@@ -3153,8 +3165,8 @@
3153
3165
  "tags": [
3154
3166
  "organization"
3155
3167
  ],
3156
- "summary": "delete_organization",
3157
- "description": "delete_organization\n\nDelete an organization by its id. The auth'ed user must be an owner of the organization to delete it.",
3168
+ "summary": "Delete Organization",
3169
+ "description": "Delete Organization\n\nDelete an organization by its id. The auth'ed user must be an owner of the organization to delete it.",
3158
3170
  "operationId": "delete_organization_by_id",
3159
3171
  "parameters": [
3160
3172
  {
@@ -3204,11 +3216,6 @@
3204
3216
  "ApiKey": [
3205
3217
  "admin"
3206
3218
  ]
3207
- },
3208
- {
3209
- "Cookie": [
3210
- "admin"
3211
- ]
3212
3219
  }
3213
3220
  ]
3214
3221
  }
@@ -3218,6 +3225,8 @@
3218
3225
  "tags": [
3219
3226
  "stripe"
3220
3227
  ],
3228
+ "summary": "Checkout",
3229
+ "description": "Checkout\n\nGet a direct link to the stripe checkout page for the plan and organization",
3221
3230
  "operationId": "direct_to_payment_link",
3222
3231
  "parameters": [
3223
3232
  {
@@ -3263,6 +3272,8 @@
3263
3272
  "tags": [
3264
3273
  "stripe"
3265
3274
  ],
3275
+ "summary": "Get All Plans",
3276
+ "description": "Get All Plans\n\nGet a list of all plans",
3266
3277
  "operationId": "get_all_plans",
3267
3278
  "responses": {
3268
3279
  "200": {
@@ -3296,6 +3307,8 @@
3296
3307
  "tags": [
3297
3308
  "stripe"
3298
3309
  ],
3310
+ "summary": "Cancel Subscription",
3311
+ "description": "Cancel Subscription\n\nCancel a subscription by its id",
3299
3312
  "operationId": "cancel_subscription",
3300
3313
  "parameters": [
3301
3314
  {
@@ -3338,11 +3351,6 @@
3338
3351
  "ApiKey": [
3339
3352
  "owner"
3340
3353
  ]
3341
- },
3342
- {
3343
- "Cookie": [
3344
- "owner"
3345
- ]
3346
3354
  }
3347
3355
  ]
3348
3356
  }
@@ -3352,6 +3360,8 @@
3352
3360
  "tags": [
3353
3361
  "stripe"
3354
3362
  ],
3363
+ "summary": "Update Subscription Plan",
3364
+ "description": "Update Subscription Plan\n\nUpdate a subscription to a new plan",
3355
3365
  "operationId": "update_subscription_plan",
3356
3366
  "parameters": [
3357
3367
  {
@@ -3404,11 +3414,6 @@
3404
3414
  "ApiKey": [
3405
3415
  "readonly"
3406
3416
  ]
3407
- },
3408
- {
3409
- "Cookie": [
3410
- "readonly"
3411
- ]
3412
3417
  }
3413
3418
  ]
3414
3419
  }
@@ -3418,8 +3423,8 @@
3418
3423
  "tags": [
3419
3424
  "topic"
3420
3425
  ],
3421
- "summary": "create_topic",
3422
- "description": "create_topic\n\nCreate a new chat topic. Topics are attached to a user and act as a coordinator for memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon.",
3426
+ "summary": "Create Topic",
3427
+ "description": "Create Topic\n\nCreate a new chat topic. Topics are attached to a user and act as a coordinator for memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon.",
3423
3428
  "operationId": "create_topic",
3424
3429
  "parameters": [
3425
3430
  {
@@ -3470,11 +3475,6 @@
3470
3475
  "ApiKey": [
3471
3476
  "readonly"
3472
3477
  ]
3473
- },
3474
- {
3475
- "Cookie": [
3476
- "readonly"
3477
- ]
3478
3478
  }
3479
3479
  ]
3480
3480
  },
@@ -3482,8 +3482,8 @@
3482
3482
  "tags": [
3483
3483
  "topic"
3484
3484
  ],
3485
- "summary": "update_topic",
3486
- "description": "update_topic\n\nUpdate an existing chat topic. Currently, only the name of the topic can be updated.",
3485
+ "summary": "Update Topic",
3486
+ "description": "Update Topic\n\nUpdate an existing chat topic. Currently, only the name of the topic can be updated.",
3487
3487
  "operationId": "update_topic",
3488
3488
  "parameters": [
3489
3489
  {
@@ -3527,11 +3527,6 @@
3527
3527
  "ApiKey": [
3528
3528
  "readonly"
3529
3529
  ]
3530
- },
3531
- {
3532
- "Cookie": [
3533
- "readonly"
3534
- ]
3535
3530
  }
3536
3531
  ]
3537
3532
  },
@@ -3539,8 +3534,8 @@
3539
3534
  "tags": [
3540
3535
  "topic"
3541
3536
  ],
3542
- "summary": "delete_topic",
3543
- "description": "delete_topic\n\nDelete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.",
3537
+ "summary": "Delete Topic",
3538
+ "description": "Delete Topic\n\nDelete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.",
3544
3539
  "operationId": "delete_topic",
3545
3540
  "parameters": [
3546
3541
  {
@@ -3584,11 +3579,6 @@
3584
3579
  "ApiKey": [
3585
3580
  "readonly"
3586
3581
  ]
3587
- },
3588
- {
3589
- "Cookie": [
3590
- "readonly"
3591
- ]
3592
3582
  }
3593
3583
  ]
3594
3584
  }
@@ -3598,8 +3588,8 @@
3598
3588
  "tags": [
3599
3589
  "topic"
3600
3590
  ],
3601
- "summary": "get_all_topics_for_user",
3602
- "description": "get_all_topics_for_user\n\nGet all topics belonging to a the auth'ed user. Soon, we plan to allow specification of the user for this route and include pagination.",
3591
+ "summary": "Get All Topics for User",
3592
+ "description": "Get All Topics for User\n\nGet all topics belonging to a the auth'ed user. Soon, we plan to allow specification of the user for this route and include pagination.",
3603
3593
  "operationId": "get_all_topics_for_user",
3604
3594
  "parameters": [
3605
3595
  {
@@ -3652,11 +3642,6 @@
3652
3642
  "ApiKey": [
3653
3643
  "readonly"
3654
3644
  ]
3655
- },
3656
- {
3657
- "Cookie": [
3658
- "readonly"
3659
- ]
3660
3645
  }
3661
3646
  ]
3662
3647
  }
@@ -3666,8 +3651,8 @@
3666
3651
  "tags": [
3667
3652
  "user"
3668
3653
  ],
3669
- "summary": "update_user",
3670
- "description": "update_user\n\nUpdate a user's information. If the user_id is not provided, the auth'ed user will be updated. If the user_id is provided, the auth'ed user must be an admin (1) or owner (2) of the organization.",
3654
+ "summary": "Update User",
3655
+ "description": "Update User\n\nUpdate a user's information. If the user_id is not provided, the auth'ed user will be updated. If the user_id is provided, the auth'ed user must be an admin (1) or owner (2) of the organization.",
3671
3656
  "operationId": "update_user",
3672
3657
  "requestBody": {
3673
3658
  "description": "JSON request payload to update user information for the auth'ed user",
@@ -3707,11 +3692,6 @@
3707
3692
  "ApiKey": [
3708
3693
  "readonly"
3709
3694
  ]
3710
- },
3711
- {
3712
- "Cookie": [
3713
- "readonly"
3714
- ]
3715
3695
  }
3716
3696
  ]
3717
3697
  }
@@ -3721,8 +3701,8 @@
3721
3701
  "tags": [
3722
3702
  "user"
3723
3703
  ],
3724
- "summary": "delete_user_api_key",
3725
- "description": "delete_user_api_key\n\nDelete an api key for the auth'ed user.",
3704
+ "summary": "Delete User Api Key",
3705
+ "description": "Delete User Api Key\n\nDelete an api key for the auth'ed user.",
3726
3706
  "operationId": "delete_user_api_key",
3727
3707
  "requestBody": {
3728
3708
  "description": "JSON request payload to delete a user api key",
@@ -3765,11 +3745,6 @@
3765
3745
  "ApiKey": [
3766
3746
  "readonly"
3767
3747
  ]
3768
- },
3769
- {
3770
- "Cookie": [
3771
- "readonly"
3772
- ]
3773
3748
  }
3774
3749
  ]
3775
3750
  }
@@ -3779,8 +3754,8 @@
3779
3754
  "tags": [
3780
3755
  "user"
3781
3756
  ],
3782
- "summary": "set_user_api_key",
3783
- "description": "set_user_api_key\n\nCreate a new api key for the auth'ed user. Successful response will contain the newly created api key. If a write role is assigned the api key will have permission level of the auth'ed user who calls this endpoint.",
3757
+ "summary": "Set User Api Key",
3758
+ "description": "Set User Api Key\n\nCreate a new api key for the auth'ed user. Successful response will contain the newly created api key. If a write role is assigned the api key will have permission level of the auth'ed user who calls this endpoint.",
3784
3759
  "operationId": "set_user_api_key",
3785
3760
  "requestBody": {
3786
3761
  "description": "JSON request payload to create a new user api key",
@@ -3820,238 +3795,6 @@
3820
3795
  "ApiKey": [
3821
3796
  "readonly"
3822
3797
  ]
3823
- },
3824
- {
3825
- "Cookie": [
3826
- "readonly"
3827
- ]
3828
- }
3829
- ]
3830
- }
3831
- },
3832
- "/api/{tracking_or_chunk}/{chunk_id}": {
3833
- "get": {
3834
- "tags": [
3835
- "chunk"
3836
- ],
3837
- "summary": "get_chunk",
3838
- "description": "get_chunk\n\nGet a singular chunk by id.",
3839
- "operationId": "get_chunk_by_id",
3840
- "parameters": [
3841
- {
3842
- "name": "TR-Dataset",
3843
- "in": "header",
3844
- "description": "The dataset id to use for the request",
3845
- "required": true,
3846
- "schema": {
3847
- "type": "string"
3848
- }
3849
- },
3850
- {
3851
- "name": "chunk_id",
3852
- "in": "path",
3853
- "description": "Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.",
3854
- "required": true,
3855
- "schema": {
3856
- "allOf": [
3857
- {
3858
- "$ref": "#/components/schemas/uuid"
3859
- }
3860
- ],
3861
- "nullable": true
3862
- }
3863
- },
3864
- {
3865
- "name": "tracking_or_chunk",
3866
- "in": "path",
3867
- "description": "The type of id you are using to search for the chunk. This can be either 'chunk' or 'tracking_id'",
3868
- "required": true,
3869
- "schema": {
3870
- "type": "string"
3871
- }
3872
- }
3873
- ],
3874
- "responses": {
3875
- "200": {
3876
- "description": "chunk with the id that you were searching for",
3877
- "content": {
3878
- "application/json": {
3879
- "schema": {
3880
- "$ref": "#/components/schemas/ChunkMetadata"
3881
- }
3882
- }
3883
- }
3884
- },
3885
- "400": {
3886
- "description": "Service error relating to fidning a chunk by tracking_id",
3887
- "content": {
3888
- "application/json": {
3889
- "schema": {
3890
- "$ref": "#/components/schemas/ErrorResponseBody"
3891
- }
3892
- }
3893
- }
3894
- }
3895
- },
3896
- "security": [
3897
- {
3898
- "ApiKey": [
3899
- "readonly"
3900
- ]
3901
- },
3902
- {
3903
- "Cookie": [
3904
- "readonly"
3905
- ]
3906
- }
3907
- ]
3908
- },
3909
- "delete": {
3910
- "tags": [
3911
- "chunk"
3912
- ],
3913
- "summary": "delete_chunk",
3914
- "description": "delete_chunk\n\nDelete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.",
3915
- "operationId": "delete_chunk",
3916
- "parameters": [
3917
- {
3918
- "name": "TR-Dataset",
3919
- "in": "header",
3920
- "description": "The dataset id to use for the request",
3921
- "required": true,
3922
- "schema": {
3923
- "type": "string"
3924
- }
3925
- },
3926
- {
3927
- "name": "chunk_id",
3928
- "in": "path",
3929
- "description": "Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.",
3930
- "required": true,
3931
- "schema": {
3932
- "allOf": [
3933
- {
3934
- "$ref": "#/components/schemas/uuid"
3935
- }
3936
- ],
3937
- "nullable": true
3938
- }
3939
- },
3940
- {
3941
- "name": "tracking_or_chunk",
3942
- "in": "path",
3943
- "description": "The type of id you are using to search for the chunk. This can be either 'chunk' or 'tracking_id'",
3944
- "required": true,
3945
- "schema": {
3946
- "type": "string"
3947
- }
3948
- }
3949
- ],
3950
- "responses": {
3951
- "204": {
3952
- "description": "Confirmation that the chunk with the id specified was deleted"
3953
- },
3954
- "400": {
3955
- "description": "Service error relating to finding a chunk by tracking_id",
3956
- "content": {
3957
- "application/json": {
3958
- "schema": {
3959
- "$ref": "#/components/schemas/ErrorResponseBody"
3960
- }
3961
- }
3962
- }
3963
- }
3964
- },
3965
- "security": [
3966
- {
3967
- "ApiKey": [
3968
- "admin"
3969
- ]
3970
- },
3971
- {
3972
- "Cookie": [
3973
- "admin"
3974
- ]
3975
- }
3976
- ]
3977
- }
3978
- },
3979
- "/api/{tracking_or_chunk}/{group_id}": {
3980
- "delete": {
3981
- "tags": [
3982
- "chunk_group"
3983
- ],
3984
- "summary": "delete_chunk_group",
3985
- "description": "delete_chunk_group\n\nThis will delete a chunk_group. This will not delete the chunks that are in the group. We will soon support deleting a chunk_group along with its member chunks.",
3986
- "operationId": "delete_chunk_group",
3987
- "parameters": [
3988
- {
3989
- "name": "TR-Dataset",
3990
- "in": "header",
3991
- "description": "The dataset id to use for the request",
3992
- "required": true,
3993
- "schema": {
3994
- "type": "string"
3995
- }
3996
- },
3997
- {
3998
- "name": "group_id",
3999
- "in": "path",
4000
- "description": "Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.",
4001
- "required": true,
4002
- "schema": {
4003
- "allOf": [
4004
- {
4005
- "$ref": "#/components/schemas/uuid"
4006
- }
4007
- ],
4008
- "nullable": true
4009
- }
4010
- },
4011
- {
4012
- "name": "tracking_or_chunk",
4013
- "in": "path",
4014
- "description": "The type of id you are using to search for the group. This can be either 'chunk' or 'tracking_id'",
4015
- "required": true,
4016
- "schema": {
4017
- "type": "string"
4018
- }
4019
- },
4020
- {
4021
- "name": "delete_chunks",
4022
- "in": "query",
4023
- "description": "Delete the chunks within the group",
4024
- "required": true,
4025
- "schema": {
4026
- "type": "boolean"
4027
- }
4028
- }
4029
- ],
4030
- "responses": {
4031
- "204": {
4032
- "description": "Confirmation that the chunkGroup was deleted"
4033
- },
4034
- "400": {
4035
- "description": "Service error relating to deleting the chunkGroup",
4036
- "content": {
4037
- "application/json": {
4038
- "schema": {
4039
- "$ref": "#/components/schemas/ErrorResponseBody"
4040
- }
4041
- }
4042
- }
4043
- }
4044
- },
4045
- "security": [
4046
- {
4047
- "ApiKey": [
4048
- "admin"
4049
- ]
4050
- },
4051
- {
4052
- "Cookie": [
4053
- "admin"
4054
- ]
4055
3798
  }
4056
3799
  ]
4057
3800
  }
@@ -4106,6 +3849,14 @@
4106
3849
  "type": "string",
4107
3850
  "format": "uuid"
4108
3851
  }
3852
+ },
3853
+ "example": {
3854
+ "created_at": "2021-01-01T00:00:00",
3855
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
3856
+ "name": "Trieve",
3857
+ "role": 1,
3858
+ "updated_at": "2021-01-01T00:00:00",
3859
+ "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
4109
3860
  }
4110
3861
  },
4111
3862
  "AuthQuery": {
@@ -4128,6 +3879,78 @@
4128
3879
  "description": "URL to redirect to after successful login",
4129
3880
  "nullable": true
4130
3881
  }
3882
+ },
3883
+ "example": {
3884
+ "inv_code": "00000000-0000-0000-0000-000000000000",
3885
+ "organization_id": "00000000-0000-0000-0000-000000000000",
3886
+ "redirect_uri": "https://api.trieve.ai"
3887
+ }
3888
+ },
3889
+ "BatchQueuedChunkResponse": {
3890
+ "type": "object",
3891
+ "required": [
3892
+ "chunk_metadata",
3893
+ "pos_in_queue"
3894
+ ],
3895
+ "properties": {
3896
+ "chunk_metadata": {
3897
+ "type": "array",
3898
+ "items": {
3899
+ "$ref": "#/components/schemas/ChunkMetadata"
3900
+ }
3901
+ },
3902
+ "pos_in_queue": {
3903
+ "type": "integer",
3904
+ "format": "int32",
3905
+ "description": "The current position the last access item is in the queue"
3906
+ }
3907
+ },
3908
+ "example": {
3909
+ "chunk_metadata": [
3910
+ {
3911
+ "chunk_vector": [
3912
+ 0.1,
3913
+ 0.2,
3914
+ 0.3
3915
+ ],
3916
+ "content": "Some content",
3917
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
3918
+ "link": "https://example.com",
3919
+ "metadata": {
3920
+ "key1": "value1",
3921
+ "key2": "value2"
3922
+ },
3923
+ "tag_set": [
3924
+ "tag1",
3925
+ "tag2"
3926
+ ],
3927
+ "time_stamp": "2021-01-01T00:00:00",
3928
+ "tracking_id": "tracking_id",
3929
+ "weight": 0.5
3930
+ },
3931
+ {
3932
+ "chunk_vector": [
3933
+ 0.1,
3934
+ 0.2,
3935
+ 0.3
3936
+ ],
3937
+ "content": "Some content",
3938
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
3939
+ "link": "https://example.com",
3940
+ "metadata": {
3941
+ "key1": "value1",
3942
+ "key2": "value2"
3943
+ },
3944
+ "tag_set": [
3945
+ "tag1",
3946
+ "tag2"
3947
+ ],
3948
+ "time_stamp": "2021-01-01T00:00:00",
3949
+ "tracking_id": "tracking_id",
3950
+ "weight": 0.5
3951
+ }
3952
+ ],
3953
+ "pos_in_queue": 2
4131
3954
  }
4132
3955
  },
4133
3956
  "BookmarkData": {
@@ -4185,6 +4008,124 @@
4185
4008
  "role": {
4186
4009
  "type": "string"
4187
4010
  }
4011
+ },
4012
+ "example": {
4013
+ "content": "Hello, world!",
4014
+ "role": "user"
4015
+ }
4016
+ },
4017
+ "ChunkData": {
4018
+ "type": "object",
4019
+ "properties": {
4020
+ "chunk_html": {
4021
+ "type": "string",
4022
+ "description": "HTML content of the chunk. This can also be plaintext. The innerText of the HTML will be used to create the embedding vector. The point of using HTML is for convienience, as some users have applications where users submit HTML content.",
4023
+ "nullable": true
4024
+ },
4025
+ "chunk_vector": {
4026
+ "type": "array",
4027
+ "items": {
4028
+ "type": "number",
4029
+ "format": "float"
4030
+ },
4031
+ "description": "Chunk_vector is a vector of floats which can be used instead of generating a new embedding. This is useful for when you are using a pre-embedded dataset. If this is not provided, the innerText of the chunk_html will be used to create the embedding.",
4032
+ "nullable": true
4033
+ },
4034
+ "file_id": {
4035
+ "type": "string",
4036
+ "format": "uuid",
4037
+ "description": "File_uuid is the uuid of the file that the chunk is associated with. This is used to associate chunks with files. This is useful for when you want to delete a file and all of its associated chunks.",
4038
+ "nullable": true
4039
+ },
4040
+ "group_ids": {
4041
+ "type": "array",
4042
+ "items": {
4043
+ "type": "string",
4044
+ "format": "uuid"
4045
+ },
4046
+ "description": "Group ids are the ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response.",
4047
+ "nullable": true
4048
+ },
4049
+ "group_tracking_ids": {
4050
+ "type": "array",
4051
+ "items": {
4052
+ "type": "string"
4053
+ },
4054
+ "description": "Group tracking_ids are the tracking_ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response.",
4055
+ "nullable": true
4056
+ },
4057
+ "link": {
4058
+ "type": "string",
4059
+ "description": "Link to the chunk. This can also be any string. Frequently, this is a link to the source of the chunk. The link value will not affect the embedding creation.",
4060
+ "nullable": true
4061
+ },
4062
+ "metadata": {
4063
+ "description": "Metadata is a JSON object which can be used to filter chunks. This is useful for when you want to filter chunks by arbitrary metadata. Unlike with tag filtering, there is a performance hit for filtering on metadata.",
4064
+ "nullable": true
4065
+ },
4066
+ "split_avg": {
4067
+ "type": "boolean",
4068
+ "description": "Split avg is a boolean which tells the server to split the text in the chunk_html into smaller chunks and average their resulting vectors. This is useful for when you want to create a chunk from a large piece of text and want to split it into smaller chunks to create a more fuzzy average dense vector. The sparse vector will be generated normally with no averaging. By default this is false.",
4069
+ "nullable": true
4070
+ },
4071
+ "tag_set": {
4072
+ "type": "array",
4073
+ "items": {
4074
+ "type": "string"
4075
+ },
4076
+ "description": "Tag set is a list of tags. This can be used to filter chunks by tag. Unlike with metadata filtering, HNSW indices will exist for each tag such that there is not a performance hit for filtering on them.",
4077
+ "nullable": true
4078
+ },
4079
+ "time_stamp": {
4080
+ "type": "string",
4081
+ "description": "Time_stamp should be an ISO 8601 combined date and time without timezone. It is used for time window filtering and recency-biasing search results.",
4082
+ "nullable": true
4083
+ },
4084
+ "tracking_id": {
4085
+ "type": "string",
4086
+ "description": "Tracking_id is a string which can be used to identify a chunk. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.",
4087
+ "nullable": true
4088
+ },
4089
+ "upsert_by_tracking_id": {
4090
+ "type": "boolean",
4091
+ "description": "Upsert when a chunk with the same tracking_id exists. By default this is false, and the request will fail if a chunk with the same tracking_id exists. If this is true, the chunk will be updated if a chunk with the same tracking_id exists.",
4092
+ "nullable": true
4093
+ },
4094
+ "weight": {
4095
+ "type": "number",
4096
+ "format": "double",
4097
+ "description": "Weight is a float which can be used to bias search results. This is useful for when you want to bias search results for a chunk. The magnitude only matters relative to other chunks in the chunk's dataset dataset.",
4098
+ "nullable": true
4099
+ }
4100
+ },
4101
+ "example": {
4102
+ "chunk_html": "<p>Some HTML content</p>",
4103
+ "chunk_vector": [
4104
+ 0.1,
4105
+ 0.2,
4106
+ 0.3
4107
+ ],
4108
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
4109
+ "group_ids": [
4110
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
4111
+ ],
4112
+ "group_tracking_ids": [
4113
+ "group_tracking_id"
4114
+ ],
4115
+ "link": "https://example.com",
4116
+ "metadata": {
4117
+ "key1": "value1",
4118
+ "key2": "value2"
4119
+ },
4120
+ "split_avg": false,
4121
+ "tag_set": [
4122
+ "tag1",
4123
+ "tag2"
4124
+ ],
4125
+ "time_stamp": "2021-01-01T00:00:00",
4126
+ "tracking_id": "tracking_id",
4127
+ "upsert_by_tracking_id": true,
4128
+ "weight": 0.5
4188
4129
  }
4189
4130
  },
4190
4131
  "ChunkFilter": {
@@ -4214,6 +4155,53 @@
4214
4155
  "description": "Only one of these field conditions has to match for the chunk to be included in the result set.",
4215
4156
  "nullable": true
4216
4157
  }
4158
+ },
4159
+ "example": {
4160
+ "must": [
4161
+ {
4162
+ "field": "metadata.key2",
4163
+ "match": [
4164
+ "value3",
4165
+ "value4"
4166
+ ],
4167
+ "range": {
4168
+ "gt": 0,
4169
+ "gte": 0,
4170
+ "lt": 1,
4171
+ "lte": 1
4172
+ }
4173
+ }
4174
+ ],
4175
+ "must_not": [
4176
+ {
4177
+ "field": "metadata.key3",
4178
+ "match": [
4179
+ "value5",
4180
+ "value6"
4181
+ ],
4182
+ "range": {
4183
+ "gt": 0,
4184
+ "gte": 0,
4185
+ "lt": 1,
4186
+ "lte": 1
4187
+ }
4188
+ }
4189
+ ],
4190
+ "should": [
4191
+ {
4192
+ "field": "metadata.key1",
4193
+ "match": [
4194
+ "value1",
4195
+ "value2"
4196
+ ],
4197
+ "range": {
4198
+ "gt": 0,
4199
+ "gte": 0,
4200
+ "lt": 1,
4201
+ "lte": 1
4202
+ }
4203
+ }
4204
+ ]
4217
4205
  }
4218
4206
  },
4219
4207
  "ChunkGroup": {
@@ -4253,6 +4241,14 @@
4253
4241
  "type": "string",
4254
4242
  "format": "date-time"
4255
4243
  }
4244
+ },
4245
+ "example": {
4246
+ "created_at": "2021-01-01T00:00:00",
4247
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4248
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4249
+ "name": "Trieve",
4250
+ "tracking_id": "3",
4251
+ "updated_at": "2021-01-01T00:00:00"
4256
4252
  }
4257
4253
  },
4258
4254
  "ChunkGroupAndFile": {
@@ -4297,6 +4293,16 @@
4297
4293
  "type": "string",
4298
4294
  "format": "date-time"
4299
4295
  }
4296
+ },
4297
+ "example": {
4298
+ "created_at": "2021-01-01T00:00:00",
4299
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4300
+ "description": "A group of chunks",
4301
+ "file_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4302
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4303
+ "name": "Trieve",
4304
+ "tracking_id": "3",
4305
+ "updated_at": "2021-01-01T00:00:00"
4300
4306
  }
4301
4307
  },
4302
4308
  "ChunkMetadata": {
@@ -4362,6 +4368,23 @@
4362
4368
  "type": "number",
4363
4369
  "format": "double"
4364
4370
  }
4371
+ },
4372
+ "example": {
4373
+ "chunk_html": "<p>Hello, world!</p>",
4374
+ "content": "Hello, world!",
4375
+ "created_at": "2021-01-01T00:00:00",
4376
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4377
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4378
+ "link": "https://trieve.ai",
4379
+ "metadata": {
4380
+ "key": "value"
4381
+ },
4382
+ "qdrant_point_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4383
+ "tag_set": "tag1,tag2",
4384
+ "time_stamp": "2021-01-01T00:00:00",
4385
+ "tracking_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4386
+ "updated_at": "2021-01-01T00:00:00",
4387
+ "weight": 0.5
4365
4388
  }
4366
4389
  },
4367
4390
  "ChunkMetadataWithFileData": {
@@ -4431,6 +4454,24 @@
4431
4454
  "type": "number",
4432
4455
  "format": "double"
4433
4456
  }
4457
+ },
4458
+ "example": {
4459
+ "chunk_html": "<p>Hello, world!</p>",
4460
+ "content": "Hello, world!",
4461
+ "created_at": "2021-01-01T00:00:00",
4462
+ "file_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4463
+ "file_name": "file.txt",
4464
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4465
+ "link": "https://trieve.ai",
4466
+ "metadata": {
4467
+ "key": "value"
4468
+ },
4469
+ "qdrant_point_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4470
+ "tag_set": "tag1,tag2",
4471
+ "time_stamp": "2021-01-01T00:00:00",
4472
+ "tracking_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4473
+ "updated_at": "2021-01-01T00:00:00",
4474
+ "weight": 0.5
4434
4475
  }
4435
4476
  },
4436
4477
  "ClientDatasetConfiguration": {
@@ -4482,92 +4523,96 @@
4482
4523
  "type": "string",
4483
4524
  "nullable": true
4484
4525
  }
4526
+ },
4527
+ "example": {
4528
+ "CREATE_CHUNK_FEATURE": true,
4529
+ "DATE_RANGE_VALUE": "date range value",
4530
+ "DOCUMENT_UPLOAD_FEATURE": true,
4531
+ "FILE_NAME_KEY": "file_name_key",
4532
+ "FILTER_ITEMS": [],
4533
+ "FRONTMATTER_VALS": "frontmatter vals",
4534
+ "IMAGE_RANGE_END_KEY": "image range end key",
4535
+ "IMAGE_RANGE_START_KEY": "image range start key",
4536
+ "LINES_BEFORE_SHOW_MORE": 10,
4537
+ "SEARCH_QUERIES": "search queries",
4538
+ "SUGGESTED_QUERIES": "suggested queries"
4485
4539
  }
4486
4540
  },
4487
- "CreateChunkData": {
4488
- "type": "object",
4489
- "properties": {
4490
- "chunk_html": {
4491
- "type": "string",
4492
- "description": "HTML content of the chunk. This can also be plaintext. The innerText of the HTML will be used to create the embedding vector. The point of using HTML is for convienience, as some users have applications where users submit HTML content.",
4493
- "nullable": true
4494
- },
4495
- "chunk_vector": {
4496
- "type": "array",
4497
- "items": {
4498
- "type": "number",
4499
- "format": "float"
4500
- },
4501
- "description": "Chunk_vector is a vector of floats which can be used instead of generating a new embedding. This is useful for when you are using a pre-embedded dataset. If this is not provided, the innerText of the chunk_html will be used to create the embedding.",
4502
- "nullable": true
4503
- },
4504
- "file_id": {
4505
- "type": "string",
4506
- "format": "uuid",
4507
- "description": "File_uuid is the uuid of the file that the chunk is associated with. This is used to associate chunks with files. This is useful for when you want to delete a file and all of its associated chunks.",
4508
- "nullable": true
4509
- },
4510
- "group_ids": {
4511
- "type": "array",
4512
- "items": {
4513
- "type": "string",
4514
- "format": "uuid"
4515
- },
4516
- "description": "Group ids are the ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response.",
4517
- "nullable": true
4518
- },
4519
- "group_tracking_ids": {
4520
- "type": "array",
4521
- "items": {
4522
- "type": "string"
4541
+ "CreateBatchChunkData": {
4542
+ "type": "array",
4543
+ "items": {
4544
+ "$ref": "#/components/schemas/ChunkData"
4545
+ },
4546
+ "example": [
4547
+ {
4548
+ "chunk_html": "<p>Some HTML content</p>",
4549
+ "chunk_vector": [
4550
+ 0.1,
4551
+ 0.2,
4552
+ 0.3
4553
+ ],
4554
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
4555
+ "group_ids": [
4556
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
4557
+ ],
4558
+ "group_tracking_ids": [
4559
+ "group_tracking_id"
4560
+ ],
4561
+ "link": "https://example.com",
4562
+ "metadata": {
4563
+ "key1": "value1",
4564
+ "key2": "value2"
4523
4565
  },
4524
- "description": "Group tracking_ids are the tracking_ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response.",
4525
- "nullable": true
4526
- },
4527
- "link": {
4528
- "type": "string",
4529
- "description": "Link to the chunk. This can also be any string. Frequently, this is a link to the source of the chunk. The link value will not affect the embedding creation.",
4530
- "nullable": true
4531
- },
4532
- "metadata": {
4533
- "description": "Metadata is a JSON object which can be used to filter chunks. This is useful for when you want to filter chunks by arbitrary metadata. Unlike with tag filtering, there is a performance hit for filtering on metadata.",
4534
- "nullable": true
4535
- },
4536
- "split_avg": {
4537
- "type": "boolean",
4538
- "description": "Split avg is a boolean which tells the server to split the text in the chunk_html into smaller chunks and average their resulting vectors. This is useful for when you want to create a chunk from a large piece of text and want to split it into smaller chunks to create a more fuzzy average dense vector. The sparse vector will be generated normally with no averaging. By default this is false.",
4539
- "nullable": true
4566
+ "split_avg": false,
4567
+ "tag_set": [
4568
+ "tag1",
4569
+ "tag2"
4570
+ ],
4571
+ "time_stamp": "2021-01-01T00:00:00",
4572
+ "tracking_id": "tracking_id",
4573
+ "upsert_by_tracking_id": true,
4574
+ "weight": 0.5
4540
4575
  },
4541
- "tag_set": {
4542
- "type": "array",
4543
- "items": {
4544
- "type": "string"
4576
+ {
4577
+ "chunk_html": "<p>Some more HTML content</p>",
4578
+ "chunk_vector": [
4579
+ 0.1,
4580
+ 0.2,
4581
+ 0.3
4582
+ ],
4583
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
4584
+ "group_ids": [
4585
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
4586
+ ],
4587
+ "group_tracking_ids": [
4588
+ "group_tracking_id"
4589
+ ],
4590
+ "link": "https://explain.com",
4591
+ "metadata": {
4592
+ "key1": "value1",
4593
+ "key2": "value2"
4545
4594
  },
4546
- "description": "Tag set is a list of tags. This can be used to filter chunks by tag. Unlike with metadata filtering, HNSW indices will exist for each tag such that there is not a performance hit for filtering on them.",
4547
- "nullable": true
4548
- },
4549
- "time_stamp": {
4550
- "type": "string",
4551
- "description": "Time_stamp should be an ISO 8601 combined date and time without timezone. It is used for time window filtering and recency-biasing search results.",
4552
- "nullable": true
4553
- },
4554
- "tracking_id": {
4555
- "type": "string",
4556
- "description": "Tracking_id is a string which can be used to identify a chunk. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.",
4557
- "nullable": true
4558
- },
4559
- "upsert_by_tracking_id": {
4560
- "type": "boolean",
4561
- "description": "Upsert when a chunk with the same tracking_id exists. By default this is false, and the request will fail if a chunk with the same tracking_id exists. If this is true, the chunk will be updated if a chunk with the same tracking_id exists.",
4562
- "nullable": true
4595
+ "split_avg": false,
4596
+ "tag_set": [
4597
+ "tag3",
4598
+ "tag4"
4599
+ ],
4600
+ "time_stamp": "2021-01-01T00:00:00",
4601
+ "tracking_id": "tracking_id",
4602
+ "upsert_by_tracking_id": true,
4603
+ "weight": 0.5
4604
+ }
4605
+ ]
4606
+ },
4607
+ "CreateChunkData": {
4608
+ "oneOf": [
4609
+ {
4610
+ "$ref": "#/components/schemas/CreateSingleChunkData"
4563
4611
  },
4564
- "weight": {
4565
- "type": "number",
4566
- "format": "double",
4567
- "description": "Weight is a float which can be used to bias search results. This is useful for when you want to bias search results for a chunk. The magnitude only matters relative to other chunks in the chunk's dataset dataset.",
4568
- "nullable": true
4612
+ {
4613
+ "$ref": "#/components/schemas/CreateBatchChunkData"
4569
4614
  }
4570
- }
4615
+ ]
4571
4616
  },
4572
4617
  "CreateChunkGroupData": {
4573
4618
  "type": "object",
@@ -4615,6 +4660,12 @@
4615
4660
  "server_configuration": {
4616
4661
  "description": "Server configuration for the dataset, can be arbitrary JSON. We recommend setting to `{}` to start. See docs.trieve.ai for more information or adjust with the admin dashboard."
4617
4662
  }
4663
+ },
4664
+ "example": {
4665
+ "client_configuration": {},
4666
+ "dataset_name": "My Dataset",
4667
+ "organization_id": "00000000-0000-0000-0000-000000000000",
4668
+ "server_configuration": {}
4618
4669
  }
4619
4670
  },
4620
4671
  "CreateMessageData": {
@@ -4670,6 +4721,9 @@
4670
4721
  }
4671
4722
  }
4672
4723
  },
4724
+ "CreateSingleChunkData": {
4725
+ "$ref": "#/components/schemas/ChunkData"
4726
+ },
4673
4727
  "CreateTopicData": {
4674
4728
  "type": "object",
4675
4729
  "properties": {
@@ -4723,6 +4777,19 @@
4723
4777
  "type": "string",
4724
4778
  "format": "date-time"
4725
4779
  }
4780
+ },
4781
+ "example": {
4782
+ "client_configuration": {
4783
+ "key": "value"
4784
+ },
4785
+ "created_at": "2021-01-01T00:00:00",
4786
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4787
+ "name": "Trieve",
4788
+ "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4789
+ "server_configuration": {
4790
+ "key": "value"
4791
+ },
4792
+ "updated_at": "2021-01-01T00:00:00"
4726
4793
  }
4727
4794
  },
4728
4795
  "DatasetAndUsage": {
@@ -4738,6 +4805,23 @@
4738
4805
  "dataset_usage": {
4739
4806
  "$ref": "#/components/schemas/DatasetUsageCount"
4740
4807
  }
4808
+ },
4809
+ "example": {
4810
+ "dataset": {
4811
+ "client_configuration": {
4812
+ "key": "value"
4813
+ },
4814
+ "created_at": "2021-01-01T00:00:00",
4815
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4816
+ "name": "Trieve",
4817
+ "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4818
+ "updated_at": "2021-01-01T00:00:00"
4819
+ },
4820
+ "dataset_usage": {
4821
+ "chunk_count": 100,
4822
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4823
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
4824
+ }
4741
4825
  }
4742
4826
  },
4743
4827
  "DatasetDTO": {
@@ -4771,6 +4855,16 @@
4771
4855
  "type": "string",
4772
4856
  "format": "date-time"
4773
4857
  }
4858
+ },
4859
+ "example": {
4860
+ "client_configuration": {
4861
+ "key": "value"
4862
+ },
4863
+ "created_at": "2021-01-01T00:00:00",
4864
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4865
+ "name": "Trieve",
4866
+ "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4867
+ "updated_at": "2021-01-01T00:00:00"
4774
4868
  }
4775
4869
  },
4776
4870
  "DatasetUsageCount": {
@@ -4793,6 +4887,11 @@
4793
4887
  "type": "string",
4794
4888
  "format": "uuid"
4795
4889
  }
4890
+ },
4891
+ "example": {
4892
+ "chunk_count": 100,
4893
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4894
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
4796
4895
  }
4797
4896
  },
4798
4897
  "DeleteDatasetRequest": {
@@ -4890,6 +4989,9 @@
4890
4989
  "message": {
4891
4990
  "type": "string"
4892
4991
  }
4992
+ },
4993
+ "example": {
4994
+ "message": "Bad Request"
4893
4995
  }
4894
4996
  },
4895
4997
  "Event": {
@@ -4923,6 +5025,17 @@
4923
5025
  "type": "string",
4924
5026
  "format": "date-time"
4925
5027
  }
5028
+ },
5029
+ "example": {
5030
+ "created_at": "2021-01-01T00:00:00",
5031
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5032
+ "event_data": {
5033
+ "file_name": "file.txt",
5034
+ "group_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
5035
+ },
5036
+ "event_type": "file_uploaded",
5037
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5038
+ "updated_at": "2021-01-01T00:00:00"
4926
5039
  }
4927
5040
  },
4928
5041
  "EventReturn": {
@@ -4970,6 +5083,19 @@
4970
5083
  ],
4971
5084
  "nullable": true
4972
5085
  }
5086
+ },
5087
+ "example": {
5088
+ "field": "metadata.key1",
5089
+ "match": [
5090
+ "value1",
5091
+ "value2"
5092
+ ],
5093
+ "range": {
5094
+ "gt": 0,
5095
+ "gte": 0,
5096
+ "lt": 1,
5097
+ "lte": 1
5098
+ }
4973
5099
  }
4974
5100
  },
4975
5101
  "File": {
@@ -5022,6 +5148,20 @@
5022
5148
  "type": "string",
5023
5149
  "format": "date-time"
5024
5150
  }
5151
+ },
5152
+ "example": {
5153
+ "created_at": "2021-01-01T00:00:00",
5154
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5155
+ "file_name": "file.txt",
5156
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5157
+ "link": "https://trieve.ai",
5158
+ "metadata": {
5159
+ "key": "value"
5160
+ },
5161
+ "size": 1000,
5162
+ "tag_set": "tag1,tag2",
5163
+ "time_stamp": "2021-01-01T00:00:00",
5164
+ "updated_at": "2021-01-01T00:00:00"
5025
5165
  }
5026
5166
  },
5027
5167
  "FileDTO": {
@@ -5064,6 +5204,18 @@
5064
5204
  "type": "string",
5065
5205
  "format": "date-time"
5066
5206
  }
5207
+ },
5208
+ "example": {
5209
+ "created_at": "2021-01-01T00:00:00",
5210
+ "file_name": "file.txt",
5211
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5212
+ "link": "https://trieve.ai",
5213
+ "metadata": {
5214
+ "key": "value"
5215
+ },
5216
+ "s3_url": "https://trieve.ai",
5217
+ "size": 1000,
5218
+ "updated_at": "2021-01-01T00:00:00"
5067
5219
  }
5068
5220
  },
5069
5221
  "GenerateChunksRequest": {
@@ -5103,6 +5255,52 @@
5103
5255
  "description": "Whether or not to stream the response. If this is set to true or not included, the response will be a stream. If this is set to false, the response will be a normal JSON response. Default is true.",
5104
5256
  "nullable": true
5105
5257
  }
5258
+ },
5259
+ "example": {
5260
+ "chunk_ids": [
5261
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
5262
+ ],
5263
+ "model": "text-embedding-small",
5264
+ "prev_messages": [
5265
+ {
5266
+ "content": "I am going to provide several pieces of information (docs) for you to use in response to a request or question.",
5267
+ "role": "user"
5268
+ }
5269
+ ],
5270
+ "prompt": "Respond to the instruction and include the doc numbers that you used in square brackets at the end of the sentences that you used the docs for:",
5271
+ "stream_response": true
5272
+ }
5273
+ },
5274
+ "GetEventsData": {
5275
+ "type": "object",
5276
+ "properties": {
5277
+ "event_types": {
5278
+ "type": "array",
5279
+ "items": {
5280
+ "type": "string"
5281
+ },
5282
+ "description": "The type of events to get. Any combination of file_uploaded, card_uploaded, card_action_failed, or card_updated. Leave undefined to get all events.",
5283
+ "nullable": true
5284
+ },
5285
+ "page": {
5286
+ "type": "integer",
5287
+ "format": "int64",
5288
+ "description": "The page number to get. Default is 1.",
5289
+ "nullable": true
5290
+ },
5291
+ "page_size": {
5292
+ "type": "integer",
5293
+ "format": "int64",
5294
+ "description": "The number of items per page. Default is 10.",
5295
+ "nullable": true
5296
+ }
5297
+ },
5298
+ "example": {
5299
+ "page": 1,
5300
+ "page_size": 10,
5301
+ "type": [
5302
+ "card_action_failed"
5303
+ ]
5106
5304
  }
5107
5305
  },
5108
5306
  "GetGroupsForChunksData": {
@@ -5260,6 +5458,19 @@
5260
5458
  "type": "string",
5261
5459
  "format": "date-time"
5262
5460
  }
5461
+ },
5462
+ "example": {
5463
+ "completion_tokens": 300,
5464
+ "content": "Hello, world!",
5465
+ "created_at": "2021-01-01T00:00:00",
5466
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5467
+ "deleted": false,
5468
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5469
+ "prompt_tokens": 300,
5470
+ "role": "user",
5471
+ "sort_order": 1,
5472
+ "topic_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5473
+ "updated_at": "2021-01-01T00:00:00"
5263
5474
  }
5264
5475
  },
5265
5476
  "Organization": {
@@ -5290,6 +5501,13 @@
5290
5501
  "type": "string",
5291
5502
  "format": "date-time"
5292
5503
  }
5504
+ },
5505
+ "example": {
5506
+ "created_at": "2021-01-01T00:00:00",
5507
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5508
+ "name": "Trieve",
5509
+ "registerable": true,
5510
+ "updated_at": "2021-01-01T00:00:00"
5293
5511
  }
5294
5512
  },
5295
5513
  "OrganizationUsageCount": {
@@ -5327,6 +5545,14 @@
5327
5545
  "type": "integer",
5328
5546
  "format": "int32"
5329
5547
  }
5548
+ },
5549
+ "example": {
5550
+ "dataset_count": 1,
5551
+ "file_storage": 512,
5552
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5553
+ "message_count": 1000,
5554
+ "org_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5555
+ "user_count": 5
5330
5556
  }
5331
5557
  },
5332
5558
  "Range": {
@@ -5352,6 +5578,12 @@
5352
5578
  "format": "double",
5353
5579
  "nullable": true
5354
5580
  }
5581
+ },
5582
+ "example": {
5583
+ "gt": 0,
5584
+ "gte": 0,
5585
+ "lt": 1,
5586
+ "lte": 1
5355
5587
  }
5356
5588
  },
5357
5589
  "ReccomendGroupChunksRequest": {
@@ -5506,20 +5738,14 @@
5506
5738
  }
5507
5739
  },
5508
5740
  "ReturnQueuedChunk": {
5509
- "type": "object",
5510
- "required": [
5511
- "chunk_metadata",
5512
- "pos_in_queue"
5513
- ],
5514
- "properties": {
5515
- "chunk_metadata": {
5516
- "$ref": "#/components/schemas/ChunkMetadata"
5741
+ "oneOf": [
5742
+ {
5743
+ "$ref": "#/components/schemas/SingleQueuedChunkResponse"
5517
5744
  },
5518
- "pos_in_queue": {
5519
- "type": "integer",
5520
- "format": "int32"
5745
+ {
5746
+ "$ref": "#/components/schemas/BatchQueuedChunkResponse"
5521
5747
  }
5522
- }
5748
+ ]
5523
5749
  },
5524
5750
  "ScoreChunkDTO": {
5525
5751
  "type": "object",
@@ -5538,6 +5764,23 @@
5538
5764
  "type": "number",
5539
5765
  "format": "double"
5540
5766
  }
5767
+ },
5768
+ "example": {
5769
+ "metadata": [
5770
+ {
5771
+ "chunk_html": "<p>Some HTML content</p>",
5772
+ "content": "Some content",
5773
+ "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
5774
+ "link": "https://example.com",
5775
+ "metadata": {
5776
+ "key1": "value1",
5777
+ "key2": "value2"
5778
+ },
5779
+ "time_stamp": "2021-01-01T00:00:00",
5780
+ "weight": 0.5
5781
+ }
5782
+ ],
5783
+ "score": 0.5
5541
5784
  }
5542
5785
  },
5543
5786
  "SearchChunkData": {
@@ -5611,6 +5854,70 @@
5611
5854
  "description": "Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true.",
5612
5855
  "nullable": true
5613
5856
  }
5857
+ },
5858
+ "example": {
5859
+ "date_bias": true,
5860
+ "filters": {
5861
+ "must": [
5862
+ {
5863
+ "field": "metadata.key2",
5864
+ "match": [
5865
+ "value3",
5866
+ "value4"
5867
+ ],
5868
+ "range": {
5869
+ "gt": 0,
5870
+ "gte": 0,
5871
+ "lt": 1,
5872
+ "lte": 1
5873
+ }
5874
+ }
5875
+ ],
5876
+ "must_not": [
5877
+ {
5878
+ "field": "metadata.key3",
5879
+ "match": [
5880
+ "value5",
5881
+ "value6"
5882
+ ],
5883
+ "range": {
5884
+ "gt": 0,
5885
+ "gte": 0,
5886
+ "lt": 1,
5887
+ "lte": 1
5888
+ }
5889
+ }
5890
+ ],
5891
+ "should": [
5892
+ {
5893
+ "field": "metadata.key1",
5894
+ "match": [
5895
+ "value1",
5896
+ "value2"
5897
+ ],
5898
+ "range": {
5899
+ "gt": 0,
5900
+ "gte": 0,
5901
+ "lt": 1,
5902
+ "lte": 1
5903
+ }
5904
+ }
5905
+ ]
5906
+ },
5907
+ "get_collisions": true,
5908
+ "highlight_delimiters": [
5909
+ "?",
5910
+ ",",
5911
+ ".",
5912
+ "!"
5913
+ ],
5914
+ "highlight_results": true,
5915
+ "page": 1,
5916
+ "page_size": 10,
5917
+ "query": "Some search query",
5918
+ "score_threshold": 0.5,
5919
+ "search_type": "semantic",
5920
+ "use_weights": true
5614
5921
  }
5615
5922
  },
5616
5923
  "SearchChunkQueryResponseBody": {
@@ -5852,6 +6159,49 @@
5852
6159
  }
5853
6160
  }
5854
6161
  },
6162
+ "SingleQueuedChunkResponse": {
6163
+ "type": "object",
6164
+ "required": [
6165
+ "chunk_metadata",
6166
+ "pos_in_queue"
6167
+ ],
6168
+ "properties": {
6169
+ "chunk_metadata": {
6170
+ "$ref": "#/components/schemas/ChunkMetadata"
6171
+ },
6172
+ "pos_in_queue": {
6173
+ "type": "integer",
6174
+ "format": "int32",
6175
+ "description": "The current position the last access item is in the queue"
6176
+ }
6177
+ },
6178
+ "example": {
6179
+ "chunk_metadata": [
6180
+ {
6181
+ "chunk_vector": [
6182
+ 0.1,
6183
+ 0.2,
6184
+ 0.3
6185
+ ],
6186
+ "content": "Some content",
6187
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
6188
+ "link": "https://example.com",
6189
+ "metadata": {
6190
+ "key1": "value1",
6191
+ "key2": "value2"
6192
+ },
6193
+ "tag_set": [
6194
+ "tag1",
6195
+ "tag2"
6196
+ ],
6197
+ "time_stamp": "2021-01-01T00:00:00",
6198
+ "tracking_id": "tracking_id",
6199
+ "weight": 0.5
6200
+ }
6201
+ ],
6202
+ "pos_in_queue": 1
6203
+ }
6204
+ },
5855
6205
  "SlimGroup": {
5856
6206
  "type": "object",
5857
6207
  "required": [
@@ -5875,6 +6225,12 @@
5875
6225
  "of_current_dataset": {
5876
6226
  "type": "boolean"
5877
6227
  }
6228
+ },
6229
+ "example": {
6230
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6231
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6232
+ "name": "Trieve",
6233
+ "of_current_dataset": true
5878
6234
  }
5879
6235
  },
5880
6236
  "SlimUser": {
@@ -5921,6 +6277,33 @@
5921
6277
  "type": "string",
5922
6278
  "nullable": true
5923
6279
  }
6280
+ },
6281
+ "example": {
6282
+ "email": "developers@trieve.ai",
6283
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6284
+ "name": "Trieve",
6285
+ "orgs": [
6286
+ {
6287
+ "created_at": "2021-01-01T00:00:00",
6288
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6289
+ "name": "Trieve",
6290
+ "registerable": true,
6291
+ "updated_at": "2021-01-01T00:00:00"
6292
+ }
6293
+ ],
6294
+ "user_orgs": [
6295
+ {
6296
+ "created_at": "2021-01-01T00:00:00",
6297
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6298
+ "org_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6299
+ "role": 0,
6300
+ "updated_at": "2021-01-01T00:00:00",
6301
+ "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
6302
+ }
6303
+ ],
6304
+ "username": "trieve",
6305
+ "visible_email": true,
6306
+ "website": "https://trieve.ai"
5924
6307
  }
5925
6308
  },
5926
6309
  "StripePlan": {
@@ -5981,47 +6364,19 @@
5981
6364
  "type": "integer",
5982
6365
  "format": "int32"
5983
6366
  }
5984
- }
5985
- },
5986
- "StripeSubscription": {
5987
- "type": "object",
5988
- "required": [
5989
- "id",
5990
- "stripe_id",
5991
- "plan_id",
5992
- "organization_id",
5993
- "created_at",
5994
- "updated_at"
5995
- ],
5996
- "properties": {
5997
- "created_at": {
5998
- "type": "string",
5999
- "format": "date-time"
6000
- },
6001
- "current_period_end": {
6002
- "type": "string",
6003
- "format": "date-time",
6004
- "nullable": true
6005
- },
6006
- "id": {
6007
- "type": "string",
6008
- "format": "uuid"
6009
- },
6010
- "organization_id": {
6011
- "type": "string",
6012
- "format": "uuid"
6013
- },
6014
- "plan_id": {
6015
- "type": "string",
6016
- "format": "uuid"
6017
- },
6018
- "stripe_id": {
6019
- "type": "string"
6020
- },
6021
- "updated_at": {
6022
- "type": "string",
6023
- "format": "date-time"
6024
- }
6367
+ },
6368
+ "example": {
6369
+ "amount": 1000,
6370
+ "chunk_count": 1000,
6371
+ "created_at": "2021-01-01T00:00:00",
6372
+ "dataset_count": 1,
6373
+ "file_storage": 512,
6374
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6375
+ "message_count": 1000,
6376
+ "name": "Free",
6377
+ "stripe_id": "plan_123",
6378
+ "updated_at": "2021-01-01T00:00:00",
6379
+ "user_count": 5
6025
6380
  }
6026
6381
  },
6027
6382
  "SuggestedQueriesRequest": {
@@ -6088,6 +6443,15 @@
6088
6443
  "type": "string",
6089
6444
  "format": "uuid"
6090
6445
  }
6446
+ },
6447
+ "example": {
6448
+ "created_at": "2021-01-01T00:00:00",
6449
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6450
+ "deleted": false,
6451
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6452
+ "name": "Trieve",
6453
+ "updated_at": "2021-01-01T00:00:00",
6454
+ "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
6091
6455
  }
6092
6456
  },
6093
6457
  "UpdateChunkByTrackingIdData": {
@@ -6200,6 +6564,20 @@
6200
6564
  "description": "Weight is a float which can be used to bias search results. This is useful for when you want to bias search results for a chunk. The magnitude only matters relative to other chunks in the chunk's dataset dataset. If no weight is provided, the existing weight will be used.",
6201
6565
  "nullable": true
6202
6566
  }
6567
+ },
6568
+ "example": {
6569
+ "chunk_html": "<p>Some HTML content</p>",
6570
+ "chunk_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
6571
+ "group_ids": [
6572
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
6573
+ ],
6574
+ "link": "https://example.com",
6575
+ "metadata": {
6576
+ "key1": "value1",
6577
+ "key2": "value2"
6578
+ },
6579
+ "time_stamp": "2021-01-01T00:00:00",
6580
+ "weight": 0.5
6203
6581
  }
6204
6582
  },
6205
6583
  "UpdateChunkGroupData": {
@@ -6252,6 +6630,12 @@
6252
6630
  "description": "The new server configuration of the dataset, can be arbitrary JSON. See docs.trieve.ai for more information. If not provided, the server configuration will not be updated.",
6253
6631
  "nullable": true
6254
6632
  }
6633
+ },
6634
+ "example": {
6635
+ "client_configuration": {},
6636
+ "dataset_id": "00000000-0000-0000-0000-000000000000",
6637
+ "dataset_name": "My Dataset",
6638
+ "server_configuration": {}
6255
6639
  }
6256
6640
  },
6257
6641
  "UpdateGroupByTrackingIDData": {
@@ -6409,6 +6793,23 @@
6409
6793
  "description": "Time stamp should be an ISO 8601 combined date and time without timezone. Time_stamp is used for time window filtering and recency-biasing search results. Will be passed down to the file's chunks.",
6410
6794
  "nullable": true
6411
6795
  }
6796
+ },
6797
+ "example": {
6798
+ "base64_file": "base64_encoded_file",
6799
+ "create_chunks": true,
6800
+ "description": "This is an example file",
6801
+ "file_mime_type": "application/pdf",
6802
+ "file_name": "example.pdf",
6803
+ "link": "https://example.com",
6804
+ "metadata": {
6805
+ "key1": "value1",
6806
+ "key2": "value2"
6807
+ },
6808
+ "tag_set": [
6809
+ "tag1",
6810
+ "tag2"
6811
+ ],
6812
+ "time_stamp": "2021-01-01T00:00:00Z"
6412
6813
  }
6413
6814
  },
6414
6815
  "UploadFileResult": {
@@ -6457,6 +6858,14 @@
6457
6858
  "type": "string",
6458
6859
  "format": "uuid"
6459
6860
  }
6861
+ },
6862
+ "example": {
6863
+ "created_at": "2021-01-01T00:00:00",
6864
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6865
+ "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6866
+ "role": 2,
6867
+ "updated_at": "2021-01-01T00:00:00",
6868
+ "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
6460
6869
  }
6461
6870
  }
6462
6871
  },