trieve_ruby_client 0.3.5 → 0.5.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 (217) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -74
  3. data/docs/AddChunkToGroupData.md +1 -1
  4. data/docs/AuthApi.md +28 -34
  5. data/docs/AuthQuery.md +22 -0
  6. data/docs/BatchQueuedChunkResponse.md +20 -0
  7. data/docs/ChunkApi.md +69 -147
  8. data/docs/ChunkData.md +42 -0
  9. data/docs/ChunkGroupApi.md +168 -90
  10. data/docs/CreateChunkData.md +41 -34
  11. data/docs/DatasetApi.md +31 -31
  12. data/docs/EventsApi.md +13 -13
  13. data/docs/FileApi.md +21 -21
  14. data/docs/GetEventsData.md +22 -0
  15. data/docs/HealthApi.md +6 -4
  16. data/docs/InvitationApi.md +6 -6
  17. data/docs/MessageApi.md +21 -21
  18. data/docs/OrganizationApi.md +31 -31
  19. data/docs/ReturnQueuedChunk.md +39 -10
  20. data/docs/SingleQueuedChunkResponse.md +20 -0
  21. data/docs/StripeApi.md +21 -13
  22. data/docs/TopicApi.md +21 -21
  23. data/docs/UserApi.md +16 -16
  24. data/lib/trieve_ruby_client/api/auth_api.rb +27 -34
  25. data/lib/trieve_ruby_client/api/chunk_api.rb +64 -143
  26. data/lib/trieve_ruby_client/api/chunk_group_api.rb +153 -75
  27. data/lib/trieve_ruby_client/api/dataset_api.rb +25 -25
  28. data/lib/trieve_ruby_client/api/events_api.rb +21 -16
  29. data/lib/trieve_ruby_client/api/file_api.rb +17 -17
  30. data/lib/trieve_ruby_client/api/health_api.rb +5 -1
  31. data/lib/trieve_ruby_client/api/invitation_api.rb +5 -5
  32. data/lib/trieve_ruby_client/api/message_api.rb +17 -17
  33. data/lib/trieve_ruby_client/api/organization_api.rb +25 -25
  34. data/lib/trieve_ruby_client/api/stripe_api.rb +17 -1
  35. data/lib/trieve_ruby_client/api/topic_api.rb +17 -17
  36. data/lib/trieve_ruby_client/api/user_api.rb +13 -13
  37. data/lib/trieve_ruby_client/api_client.rb +1 -1
  38. data/lib/trieve_ruby_client/api_error.rb +1 -1
  39. data/lib/trieve_ruby_client/configuration.rb +8 -4
  40. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +2 -2
  41. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  42. data/lib/trieve_ruby_client/models/{stripe_subscription.rb → auth_query.rb} +23 -96
  43. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +240 -0
  44. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  45. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  46. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  47. data/lib/trieve_ruby_client/models/chunk_data.rb +356 -0
  48. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  49. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  50. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  51. data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
  52. data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
  53. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
  54. data/lib/trieve_ruby_client/models/create_chunk_data.rb +79 -330
  55. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  56. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  57. data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
  58. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  59. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  60. data/lib/trieve_ruby_client/models/dataset.rb +1 -1
  61. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  62. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  63. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  64. data/lib/trieve_ruby_client/models/delete_dataset_request.rb +1 -1
  65. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  66. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  67. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  68. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  69. data/lib/trieve_ruby_client/models/event.rb +1 -1
  70. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  71. data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
  72. data/lib/trieve_ruby_client/models/file.rb +1 -1
  73. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  74. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
  75. data/lib/trieve_ruby_client/models/get_events_data.rb +240 -0
  76. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  77. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  78. data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +1 -1
  79. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  80. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  81. data/lib/trieve_ruby_client/models/message.rb +1 -1
  82. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  83. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  84. data/lib/trieve_ruby_client/models/range.rb +1 -1
  85. data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +1 -1
  86. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
  87. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  88. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +75 -207
  89. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  90. data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
  91. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  92. data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
  93. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
  94. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
  95. data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
  96. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  97. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  98. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +238 -0
  99. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  100. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  101. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  102. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  103. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  104. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  105. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  106. data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
  107. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  108. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  109. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  110. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  111. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  112. data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
  113. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  114. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  115. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  116. data/lib/trieve_ruby_client/version.rb +2 -2
  117. data/lib/trieve_ruby_client.rb +6 -2
  118. data/openapi-generator.yaml +1 -1
  119. data/openapi.json +1196 -849
  120. data/spec/api/auth_api_spec.rb +16 -18
  121. data/spec/api/chunk_api_spec.rb +30 -43
  122. data/spec/api/chunk_group_api_spec.rb +54 -33
  123. data/spec/api/dataset_api_spec.rb +19 -19
  124. data/spec/api/events_api_spec.rb +10 -10
  125. data/spec/api/file_api_spec.rb +15 -15
  126. data/spec/api/health_api_spec.rb +9 -7
  127. data/spec/api/invitation_api_spec.rb +9 -9
  128. data/spec/api/message_api_spec.rb +15 -15
  129. data/spec/api/organization_api_spec.rb +19 -19
  130. data/spec/api/stripe_api_spec.rb +15 -7
  131. data/spec/api/topic_api_spec.rb +15 -15
  132. data/spec/api/user_api_spec.rb +13 -13
  133. data/spec/models/add_chunk_to_group_data_spec.rb +8 -8
  134. data/spec/models/api_key_dto_spec.rb +8 -8
  135. data/spec/models/auth_query_spec.rb +48 -0
  136. data/spec/models/batch_queued_chunk_response_spec.rb +42 -0
  137. data/spec/models/bookmark_data_spec.rb +8 -8
  138. data/spec/models/bookmark_group_result_spec.rb +8 -8
  139. data/spec/models/chat_message_proxy_spec.rb +8 -8
  140. data/spec/models/chunk_data_spec.rb +108 -0
  141. data/spec/models/chunk_filter_spec.rb +8 -8
  142. data/spec/models/chunk_group_and_file_spec.rb +8 -8
  143. data/spec/models/chunk_group_spec.rb +8 -8
  144. data/spec/models/chunk_metadata_spec.rb +8 -8
  145. data/spec/models/chunk_metadata_with_file_data_spec.rb +8 -8
  146. data/spec/models/client_dataset_configuration_spec.rb +8 -8
  147. data/spec/models/create_chunk_data_spec.rb +11 -87
  148. data/spec/models/create_chunk_group_data_spec.rb +8 -8
  149. data/spec/models/create_dataset_request_spec.rb +8 -8
  150. data/spec/models/create_message_data_spec.rb +8 -8
  151. data/spec/models/create_organization_data_spec.rb +8 -8
  152. data/spec/models/create_topic_data_spec.rb +8 -8
  153. data/spec/models/dataset_and_usage_spec.rb +8 -8
  154. data/spec/models/dataset_dto_spec.rb +8 -8
  155. data/spec/models/dataset_spec.rb +8 -8
  156. data/spec/models/dataset_usage_count_spec.rb +8 -8
  157. data/spec/models/delete_dataset_request_spec.rb +8 -8
  158. data/spec/models/delete_topic_data_spec.rb +8 -8
  159. data/spec/models/delete_user_api_key_request_spec.rb +8 -8
  160. data/spec/models/edit_message_data_spec.rb +8 -8
  161. data/spec/models/error_response_body_spec.rb +8 -8
  162. data/spec/models/event_return_spec.rb +8 -8
  163. data/spec/models/event_spec.rb +8 -8
  164. data/spec/models/field_condition_spec.rb +8 -8
  165. data/spec/models/file_dto_spec.rb +8 -8
  166. data/spec/models/file_spec.rb +8 -8
  167. data/spec/models/generate_chunks_request_spec.rb +8 -8
  168. data/spec/models/get_events_data_spec.rb +48 -0
  169. data/spec/models/get_groups_for_chunks_data_spec.rb +8 -8
  170. data/spec/models/group_data_spec.rb +8 -8
  171. data/spec/models/group_score_chunk_dto_spec.rb +8 -8
  172. data/spec/models/invitation_data_spec.rb +8 -8
  173. data/spec/models/match_condition_spec.rb +6 -6
  174. data/spec/models/message_spec.rb +8 -8
  175. data/spec/models/organization_spec.rb +8 -8
  176. data/spec/models/organization_usage_count_spec.rb +8 -8
  177. data/spec/models/range_spec.rb +8 -8
  178. data/spec/models/reccomend_group_chunks_request_spec.rb +8 -8
  179. data/spec/models/recommend_chunks_request_spec.rb +8 -8
  180. data/spec/models/regenerate_message_data_spec.rb +8 -8
  181. data/spec/models/return_queued_chunk_spec.rb +11 -21
  182. data/spec/models/score_chunk_dto_spec.rb +8 -8
  183. data/spec/models/search_chunk_data_spec.rb +8 -8
  184. data/spec/models/search_chunk_query_response_body_spec.rb +8 -8
  185. data/spec/models/search_groups_result_spec.rb +8 -8
  186. data/spec/models/search_over_groups_data_spec.rb +8 -8
  187. data/spec/models/search_over_groups_response_body_spec.rb +8 -8
  188. data/spec/models/search_within_group_data_spec.rb +8 -8
  189. data/spec/models/set_user_api_key_request_spec.rb +8 -8
  190. data/spec/models/set_user_api_key_response_spec.rb +8 -8
  191. data/spec/models/single_queued_chunk_response_spec.rb +42 -0
  192. data/spec/models/slim_group_spec.rb +8 -8
  193. data/spec/models/slim_user_spec.rb +8 -8
  194. data/spec/models/stripe_plan_spec.rb +8 -8
  195. data/spec/models/suggested_queries_request_spec.rb +8 -8
  196. data/spec/models/suggested_queries_response_spec.rb +8 -8
  197. data/spec/models/topic_spec.rb +8 -8
  198. data/spec/models/update_chunk_by_tracking_id_data_spec.rb +20 -8
  199. data/spec/models/update_chunk_data_spec.rb +20 -8
  200. data/spec/models/update_chunk_group_data_spec.rb +14 -8
  201. data/spec/models/update_dataset_request_spec.rb +8 -8
  202. data/spec/models/update_group_by_tracking_id_data_spec.rb +8 -8
  203. data/spec/models/update_organization_data_spec.rb +8 -8
  204. data/spec/models/update_topic_data_spec.rb +8 -8
  205. data/spec/models/update_user_data_spec.rb +8 -8
  206. data/spec/models/upload_file_data_spec.rb +8 -8
  207. data/spec/models/upload_file_result_spec.rb +8 -8
  208. data/spec/models/user_organization_spec.rb +8 -8
  209. data/spec/spec_helper.rb +1 -1
  210. data/trieve_ruby_client-0.3.5.gem +0 -0
  211. data/trieve_ruby_client-0.4.0.gem +0 -0
  212. data/trieve_ruby_client.gemspec +1 -1
  213. metadata +24 -8
  214. data/docs/StripeSubscription.md +0 -30
  215. data/spec/models/stripe_subscription_spec.rb +0 -72
  216. data/trieve_ruby_client-0.3.4.gem +0 -0
  217. 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.5.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 or Upsert Chunk or Chunks",
154
+ "description": "Create or Upsert Chunk or Chunks\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,17 @@
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",
191
+ "content": {
192
+ "application/json": {
193
+ "schema": {
194
+ "$ref": "#/components/schemas/ErrorResponseBody"
195
+ }
196
+ }
197
+ }
198
+ },
199
+ "426": {
200
+ "description": "Error when upgrade is needed to process more chunks",
182
201
  "content": {
183
202
  "application/json": {
184
203
  "schema": {
@@ -193,23 +212,16 @@
193
212
  "ApiKey": [
194
213
  "admin"
195
214
  ]
196
- },
197
- {
198
- "Cookie": [
199
- "admin"
200
- ]
201
215
  }
202
216
  ]
203
- }
204
- },
205
- "/api/chunk/bulk": {
206
- "post": {
217
+ },
218
+ "put": {
207
219
  "tags": [
208
220
  "chunk"
209
221
  ],
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",
222
+ "summary": "Update Chunk",
223
+ "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.",
224
+ "operationId": "update_chunk",
213
225
  "parameters": [
214
226
  {
215
227
  "name": "TR-Dataset",
@@ -222,29 +234,22 @@
222
234
  }
223
235
  ],
224
236
  "requestBody": {
225
- "description": "JSON request payload to create a new chunk (chunk)",
237
+ "description": "JSON request payload to update a chunk (chunk)",
226
238
  "content": {
227
239
  "application/json": {
228
240
  "schema": {
229
- "$ref": "#/components/schemas/CreateChunkData"
241
+ "$ref": "#/components/schemas/UpdateChunkData"
230
242
  }
231
243
  }
232
244
  },
233
245
  "required": true
234
246
  },
235
247
  "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
- }
248
+ "204": {
249
+ "description": "No content Ok response indicating the chunk was updated as requested"
245
250
  },
246
251
  "400": {
247
- "description": "Service error relating to to creating a chunk, likely due to conflicting tracking_id",
252
+ "description": "Service error relating to to updating chunk, likely due to conflicting tracking_id",
248
253
  "content": {
249
254
  "application/json": {
250
255
  "schema": {
@@ -259,11 +264,6 @@
259
264
  "ApiKey": [
260
265
  "admin"
261
266
  ]
262
- },
263
- {
264
- "Cookie": [
265
- "admin"
266
- ]
267
267
  }
268
268
  ]
269
269
  }
@@ -273,8 +273,8 @@
273
273
  "tags": [
274
274
  "chunk"
275
275
  ],
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.",
276
+ "summary": "Generate suggested queries",
277
+ "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
278
  "operationId": "create_suggested_queries_handler",
279
279
  "parameters": [
280
280
  {
@@ -325,11 +325,6 @@
325
325
  "ApiKey": [
326
326
  "readonly"
327
327
  ]
328
- },
329
- {
330
- "Cookie": [
331
- "readonly"
332
- ]
333
328
  }
334
329
  ]
335
330
  }
@@ -339,8 +334,8 @@
339
334
  "tags": [
340
335
  "chunk"
341
336
  ],
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.",
337
+ "summary": "RAG on Specified Chunks",
338
+ "description": "RAG on Specified 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
339
  "operationId": "generate_off_chunks",
345
340
  "parameters": [
346
341
  {
@@ -391,11 +386,6 @@
391
386
  "ApiKey": [
392
387
  "readonly"
393
388
  ]
394
- },
395
- {
396
- "Cookie": [
397
- "readonly"
398
- ]
399
389
  }
400
390
  ]
401
391
  }
@@ -405,8 +395,8 @@
405
395
  "tags": [
406
396
  "chunk"
407
397
  ],
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.",
398
+ "summary": "Get Recommended Chunks",
399
+ "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
400
  "operationId": "get_recommended_chunks",
411
401
  "parameters": [
412
402
  {
@@ -460,11 +450,6 @@
460
450
  "ApiKey": [
461
451
  "readonly"
462
452
  ]
463
- },
464
- {
465
- "Cookie": [
466
- "readonly"
467
- ]
468
453
  }
469
454
  ]
470
455
  }
@@ -474,8 +459,8 @@
474
459
  "tags": [
475
460
  "chunk"
476
461
  ],
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.",
462
+ "summary": "Search",
463
+ "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
464
  "operationId": "search_chunk",
480
465
  "parameters": [
481
466
  {
@@ -526,11 +511,6 @@
526
511
  "ApiKey": [
527
512
  "readonly"
528
513
  ]
529
- },
530
- {
531
- "Cookie": [
532
- "readonly"
533
- ]
534
514
  }
535
515
  ]
536
516
  }
@@ -540,8 +520,8 @@
540
520
  "tags": [
541
521
  "chunk"
542
522
  ],
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.",
523
+ "summary": "Update Chunk By Tracking Id",
524
+ "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
525
  "operationId": "update_chunk_by_tracking_id",
546
526
  "parameters": [
547
527
  {
@@ -580,17 +560,11 @@
580
560
  }
581
561
  }
582
562
  },
583
- "deprecated": true,
584
563
  "security": [
585
564
  {
586
565
  "ApiKey": [
587
566
  "admin"
588
567
  ]
589
- },
590
- {
591
- "Cookie": [
592
- "admin"
593
- ]
594
568
  }
595
569
  ]
596
570
  }
@@ -600,8 +574,8 @@
600
574
  "tags": [
601
575
  "chunk"
602
576
  ],
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.",
577
+ "summary": "Get Chunk By Tracking Id",
578
+ "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
579
  "operationId": "get_chunk_by_tracking_id",
606
580
  "parameters": [
607
581
  {
@@ -645,17 +619,11 @@
645
619
  }
646
620
  }
647
621
  },
648
- "deprecated": true,
649
622
  "security": [
650
623
  {
651
624
  "ApiKey": [
652
625
  "readonly"
653
626
  ]
654
- },
655
- {
656
- "Cookie": [
657
- "readonly"
658
- ]
659
627
  }
660
628
  ]
661
629
  },
@@ -663,8 +631,8 @@
663
631
  "tags": [
664
632
  "chunk"
665
633
  ],
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.",
634
+ "summary": "Delete Chunk By Tracking Id",
635
+ "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
636
  "operationId": "delete_chunk_by_tracking_id",
669
637
  "parameters": [
670
638
  {
@@ -701,29 +669,23 @@
701
669
  }
702
670
  }
703
671
  },
704
- "deprecated": true,
705
672
  "security": [
706
673
  {
707
674
  "ApiKey": [
708
675
  "admin"
709
676
  ]
710
- },
711
- {
712
- "Cookie": [
713
- "admin"
714
- ]
715
677
  }
716
678
  ]
717
679
  }
718
680
  },
719
- "/api/chunk/update": {
720
- "put": {
681
+ "/api/chunk/{chunk_id}": {
682
+ "get": {
721
683
  "tags": [
722
684
  "chunk"
723
685
  ],
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.",
726
- "operationId": "update_chunk",
686
+ "summary": "Get Chunk By Id",
687
+ "description": "Get Chunk By Id\n\nGet a singular chunk by id.",
688
+ "operationId": "get_chunk_by_id",
727
689
  "parameters": [
728
690
  {
729
691
  "name": "TR-Dataset",
@@ -733,25 +695,82 @@
733
695
  "schema": {
734
696
  "type": "string"
735
697
  }
698
+ },
699
+ {
700
+ "name": "chunk_id",
701
+ "in": "path",
702
+ "description": "Id of the chunk you want to fetch.",
703
+ "required": true,
704
+ "schema": {
705
+ "type": "string",
706
+ "format": "uuid"
707
+ }
736
708
  }
737
709
  ],
738
- "requestBody": {
739
- "description": "JSON request payload to update a chunk (chunk)",
740
- "content": {
741
- "application/json": {
742
- "schema": {
743
- "$ref": "#/components/schemas/UpdateChunkData"
710
+ "responses": {
711
+ "200": {
712
+ "description": "chunk with the id that you were searching for",
713
+ "content": {
714
+ "application/json": {
715
+ "schema": {
716
+ "$ref": "#/components/schemas/ChunkMetadata"
717
+ }
744
718
  }
745
719
  }
746
720
  },
747
- "required": true
721
+ "400": {
722
+ "description": "Service error relating to fidning a chunk by tracking_id",
723
+ "content": {
724
+ "application/json": {
725
+ "schema": {
726
+ "$ref": "#/components/schemas/ErrorResponseBody"
727
+ }
728
+ }
729
+ }
730
+ }
748
731
  },
732
+ "security": [
733
+ {
734
+ "ApiKey": [
735
+ "readonly"
736
+ ]
737
+ }
738
+ ]
739
+ },
740
+ "delete": {
741
+ "tags": [
742
+ "chunk"
743
+ ],
744
+ "summary": "Delete Chunk",
745
+ "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.",
746
+ "operationId": "delete_chunk",
747
+ "parameters": [
748
+ {
749
+ "name": "TR-Dataset",
750
+ "in": "header",
751
+ "description": "The dataset id to use for the request",
752
+ "required": true,
753
+ "schema": {
754
+ "type": "string"
755
+ }
756
+ },
757
+ {
758
+ "name": "chunk_id",
759
+ "in": "path",
760
+ "description": "Id of the chunk you want to fetch.",
761
+ "required": true,
762
+ "schema": {
763
+ "type": "string",
764
+ "format": "uuid"
765
+ }
766
+ }
767
+ ],
749
768
  "responses": {
750
769
  "204": {
751
- "description": "No content Ok response indicating the chunk was updated as requested"
770
+ "description": "Confirmation that the chunk with the id specified was deleted"
752
771
  },
753
772
  "400": {
754
- "description": "Service error relating to to updating chunk, likely due to conflicting tracking_id",
773
+ "description": "Service error relating to finding a chunk by tracking_id",
755
774
  "content": {
756
775
  "application/json": {
757
776
  "schema": {
@@ -766,11 +785,6 @@
766
785
  "ApiKey": [
767
786
  "admin"
768
787
  ]
769
- },
770
- {
771
- "Cookie": [
772
- "admin"
773
- ]
774
788
  }
775
789
  ]
776
790
  }
@@ -780,8 +794,8 @@
780
794
  "tags": [
781
795
  "chunk_group"
782
796
  ],
783
- "summary": "create_chunk_group",
784
- "description": "create_chunk_group\n\nCreate a new chunk_group.",
797
+ "summary": "Create Chunk Group",
798
+ "description": "Create Chunk Group\n\nCreate a new chunk_group. This is a way to group chunks together. If you try to create a chunk_group with the same tracking_id as an existing chunk_group, this operation will fail.",
785
799
  "operationId": "create_chunk_group",
786
800
  "parameters": [
787
801
  {
@@ -832,11 +846,6 @@
832
846
  "ApiKey": [
833
847
  "admin"
834
848
  ]
835
- },
836
- {
837
- "Cookie": [
838
- "admin"
839
- ]
840
849
  }
841
850
  ]
842
851
  },
@@ -844,8 +853,8 @@
844
853
  "tags": [
845
854
  "chunk_group"
846
855
  ],
847
- "summary": "update_chunk_group",
848
- "description": "update_chunk_group\n\nUpdate a chunk_group.",
856
+ "summary": "Update Group",
857
+ "description": "Update Group\n\nUpdate a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail.",
849
858
  "operationId": "update_chunk_group",
850
859
  "parameters": [
851
860
  {
@@ -889,11 +898,6 @@
889
898
  "ApiKey": [
890
899
  "admin"
891
900
  ]
892
- },
893
- {
894
- "Cookie": [
895
- "admin"
896
- ]
897
901
  }
898
902
  ]
899
903
  }
@@ -903,8 +907,8 @@
903
907
  "tags": [
904
908
  "chunk_group"
905
909
  ],
906
- "summary": "add_chunk_to_group",
907
- "description": "add_chunk_to_group\n\nRoute to add a chunk to a group",
910
+ "summary": "Add Chunk to Group",
911
+ "description": "Add Chunk to Group\n\nRoute to add a chunk to a group.",
908
912
  "operationId": "add_chunk_to_group",
909
913
  "parameters": [
910
914
  {
@@ -953,17 +957,11 @@
953
957
  }
954
958
  }
955
959
  },
956
- "deprecated": true,
957
960
  "security": [
958
961
  {
959
962
  "ApiKey": [
960
963
  "admin"
961
964
  ]
962
- },
963
- {
964
- "Cookie": [
965
- "admin"
966
- ]
967
965
  }
968
966
  ]
969
967
  },
@@ -971,8 +969,8 @@
971
969
  "tags": [
972
970
  "chunk_group"
973
971
  ],
974
- "summary": "remove_chunk_from_group",
975
- "description": "remove_chunk_from_group\n\nRoute to remove a chunk from a group.",
972
+ "summary": "Remove Chunk from Group",
973
+ "description": "Remove Chunk from Group\n\nRoute to remove a chunk from a group.",
976
974
  "operationId": "remove_chunk_from_group",
977
975
  "parameters": [
978
976
  {
@@ -1021,17 +1019,11 @@
1021
1019
  }
1022
1020
  }
1023
1021
  },
1024
- "deprecated": true,
1025
1022
  "security": [
1026
1023
  {
1027
1024
  "ApiKey": [
1028
1025
  "admin"
1029
1026
  ]
1030
- },
1031
- {
1032
- "Cookie": [
1033
- "admin"
1034
- ]
1035
1027
  }
1036
1028
  ]
1037
1029
  }
@@ -1041,6 +1033,8 @@
1041
1033
  "tags": [
1042
1034
  "chunk_group"
1043
1035
  ],
1036
+ "summary": "Get Groups for Chunks",
1037
+ "description": "Get Groups for Chunks\n\nRoute to get the groups that a chunk is in.",
1044
1038
  "operationId": "get_groups_chunk_is_in",
1045
1039
  "parameters": [
1046
1040
  {
@@ -1094,11 +1088,6 @@
1094
1088
  "ApiKey": [
1095
1089
  "readonly"
1096
1090
  ]
1097
- },
1098
- {
1099
- "Cookie": [
1100
- "readonly"
1101
- ]
1102
1091
  }
1103
1092
  ]
1104
1093
  }
@@ -1108,8 +1097,8 @@
1108
1097
  "tags": [
1109
1098
  "chunk_group"
1110
1099
  ],
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.",
1100
+ "summary": "Search Over Groups",
1101
+ "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
1102
  "operationId": "search_over_groups",
1114
1103
  "requestBody": {
1115
1104
  "description": "JSON request payload to semantically search over groups",
@@ -1151,6 +1140,8 @@
1151
1140
  "tags": [
1152
1141
  "chunk_group"
1153
1142
  ],
1143
+ "summary": "Get Recommended Groups",
1144
+ "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
1145
  "operationId": "get_recommended_groups",
1155
1146
  "parameters": [
1156
1147
  {
@@ -1204,11 +1195,6 @@
1204
1195
  "ApiKey": [
1205
1196
  "readonly"
1206
1197
  ]
1207
- },
1208
- {
1209
- "Cookie": [
1210
- "readonly"
1211
- ]
1212
1198
  }
1213
1199
  ]
1214
1200
  }
@@ -1218,8 +1204,8 @@
1218
1204
  "tags": [
1219
1205
  "chunk_group"
1220
1206
  ],
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.",
1207
+ "summary": "Search Within Group",
1208
+ "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
1209
  "operationId": "search_within_group",
1224
1210
  "parameters": [
1225
1211
  {
@@ -1270,11 +1256,6 @@
1270
1256
  "ApiKey": [
1271
1257
  "readonly"
1272
1258
  ]
1273
- },
1274
- {
1275
- "Cookie": [
1276
- "readonly"
1277
- ]
1278
1259
  }
1279
1260
  ]
1280
1261
  }
@@ -1284,8 +1265,8 @@
1284
1265
  "tags": [
1285
1266
  "chunk_group"
1286
1267
  ],
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.",
1268
+ "summary": "Get Chunks in Group by Tracking ID",
1269
+ "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
1270
  "operationId": "get_chunks_in_group_by_tracking_id",
1290
1271
  "parameters": [
1291
1272
  {
@@ -1303,8 +1284,7 @@
1303
1284
  "description": "The id of the group to get the chunks from",
1304
1285
  "required": true,
1305
1286
  "schema": {
1306
- "type": "string",
1307
- "format": "uuid"
1287
+ "type": "string"
1308
1288
  }
1309
1289
  },
1310
1290
  {
@@ -1341,17 +1321,11 @@
1341
1321
  }
1342
1322
  }
1343
1323
  },
1344
- "deprecated": true,
1345
1324
  "security": [
1346
1325
  {
1347
1326
  "ApiKey": [
1348
1327
  "readonly"
1349
1328
  ]
1350
- },
1351
- {
1352
- "Cookie": [
1353
- "readonly"
1354
- ]
1355
1329
  }
1356
1330
  ]
1357
1331
  }
@@ -1361,8 +1335,8 @@
1361
1335
  "tags": [
1362
1336
  "chunk_group"
1363
1337
  ],
1364
- "summary": "get_group_by_tracking_id",
1365
- "description": "get_group_by_tracking_id",
1338
+ "summary": "Get Group by Tracking ID",
1339
+ "description": "Get Group by Tracking ID\n\nFetch the group with the given tracking id.\nget_group_by_tracking_id",
1366
1340
  "operationId": "get_group_by_tracking_id",
1367
1341
  "parameters": [
1368
1342
  {
@@ -1406,17 +1380,11 @@
1406
1380
  }
1407
1381
  }
1408
1382
  },
1409
- "deprecated": true,
1410
1383
  "security": [
1411
1384
  {
1412
1385
  "ApiKey": [
1413
1386
  "readonly"
1414
1387
  ]
1415
- },
1416
- {
1417
- "Cookie": [
1418
- "readonly"
1419
- ]
1420
1388
  }
1421
1389
  ]
1422
1390
  },
@@ -1424,8 +1392,8 @@
1424
1392
  "tags": [
1425
1393
  "chunk_group"
1426
1394
  ],
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.",
1395
+ "summary": "Add Chunk to Group by Tracking ID",
1396
+ "description": "Add Chunk to Group by Tracking ID\n\nRoute to add a chunk to a group by tracking id.",
1429
1397
  "operationId": "add_chunk_to_group_by_tracking_id",
1430
1398
  "parameters": [
1431
1399
  {
@@ -1473,17 +1441,11 @@
1473
1441
  }
1474
1442
  }
1475
1443
  },
1476
- "deprecated": true,
1477
1444
  "security": [
1478
1445
  {
1479
1446
  "ApiKey": [
1480
1447
  "admin"
1481
1448
  ]
1482
- },
1483
- {
1484
- "Cookie": [
1485
- "admin"
1486
- ]
1487
1449
  }
1488
1450
  ]
1489
1451
  },
@@ -1491,6 +1453,8 @@
1491
1453
  "tags": [
1492
1454
  "chunk_group"
1493
1455
  ],
1456
+ "summary": "Update Group by Tracking ID",
1457
+ "description": "Update Group by Tracking ID\n\nUpdate a chunk_group with the given tracking id.",
1494
1458
  "operationId": "update_group_by_tracking_id",
1495
1459
  "parameters": [
1496
1460
  {
@@ -1539,17 +1503,11 @@
1539
1503
  }
1540
1504
  }
1541
1505
  },
1542
- "deprecated": true,
1543
1506
  "security": [
1544
1507
  {
1545
1508
  "ApiKey": [
1546
1509
  "admin"
1547
1510
  ]
1548
- },
1549
- {
1550
- "Cookie": [
1551
- "admin"
1552
- ]
1553
1511
  }
1554
1512
  ]
1555
1513
  },
@@ -1557,6 +1515,8 @@
1557
1515
  "tags": [
1558
1516
  "chunk_group"
1559
1517
  ],
1518
+ "summary": "Delete Group by Tracking ID",
1519
+ "description": "Delete Group by Tracking ID\n\nDelete a chunk_group with the given tracking id.",
1560
1520
  "operationId": "delete_group_by_tracking_id",
1561
1521
  "parameters": [
1562
1522
  {
@@ -1593,29 +1553,23 @@
1593
1553
  }
1594
1554
  }
1595
1555
  },
1596
- "deprecated": true,
1597
1556
  "security": [
1598
1557
  {
1599
1558
  "ApiKey": [
1600
1559
  "admin"
1601
1560
  ]
1602
- },
1603
- {
1604
- "Cookie": [
1605
- "admin"
1606
- ]
1607
1561
  }
1608
1562
  ]
1609
1563
  }
1610
1564
  },
1611
- "/api/chunk_group/{tracking_or_chunk}/{group_id}/{page}": {
1565
+ "/api/chunk_group/{group_id}": {
1612
1566
  "get": {
1613
1567
  "tags": [
1614
1568
  "chunk_group"
1615
1569
  ],
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",
1570
+ "summary": "Get Group",
1571
+ "description": "Get Group\n\nFetch the group with the given id.\nget_group",
1572
+ "operationId": "get_chunk_group",
1619
1573
  "parameters": [
1620
1574
  {
1621
1575
  "name": "TR-Dataset",
@@ -1629,51 +1583,27 @@
1629
1583
  {
1630
1584
  "name": "group_id",
1631
1585
  "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.",
1633
- "required": true,
1634
- "schema": {
1635
- "allOf": [
1636
- {
1637
- "$ref": "#/components/schemas/uuid"
1638
- }
1639
- ],
1640
- "nullable": true
1641
- }
1642
- },
1643
- {
1644
- "name": "tracking_or_chunk",
1645
- "in": "path",
1646
- "description": "The type of id you are using to search for the group. This can be either 'chunk' or 'tracking_id'",
1647
- "required": true,
1648
- "schema": {
1649
- "type": "string"
1650
- }
1651
- },
1652
- {
1653
- "name": "page",
1654
- "in": "path",
1655
- "description": "The page of chunks to get from the group",
1586
+ "description": "Id of the group you want to fetch.",
1656
1587
  "required": true,
1657
1588
  "schema": {
1658
- "type": "integer",
1659
- "format": "int64",
1660
- "minimum": 0
1589
+ "type": "string",
1590
+ "format": "uuid"
1661
1591
  }
1662
1592
  }
1663
1593
  ],
1664
1594
  "responses": {
1665
1595
  "200": {
1666
- "description": "Chunks present within the specified group",
1596
+ "description": "JSON body representing the group with the given tracking id",
1667
1597
  "content": {
1668
1598
  "application/json": {
1669
1599
  "schema": {
1670
- "$ref": "#/components/schemas/BookmarkData"
1600
+ "$ref": "#/components/schemas/ChunkGroup"
1671
1601
  }
1672
1602
  }
1673
1603
  }
1674
1604
  },
1675
1605
  "400": {
1676
- "description": "Service error relating to getting the groups that the chunk is in",
1606
+ "description": "Service error relating to getting the group with the given tracking id",
1677
1607
  "content": {
1678
1608
  "application/json": {
1679
1609
  "schema": {
@@ -1688,22 +1618,149 @@
1688
1618
  "ApiKey": [
1689
1619
  "readonly"
1690
1620
  ]
1691
- },
1692
- {
1693
- "Cookie": [
1694
- "readonly"
1695
- ]
1696
1621
  }
1697
1622
  ]
1698
- }
1699
- },
1700
- "/api/dataset": {
1701
- "post": {
1623
+ },
1624
+ "delete": {
1625
+ "tags": [
1626
+ "chunk_group"
1627
+ ],
1628
+ "summary": "Delete Group",
1629
+ "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.",
1630
+ "operationId": "delete_chunk_group",
1631
+ "parameters": [
1632
+ {
1633
+ "name": "TR-Dataset",
1634
+ "in": "header",
1635
+ "description": "The dataset id to use for the request",
1636
+ "required": true,
1637
+ "schema": {
1638
+ "type": "string"
1639
+ }
1640
+ },
1641
+ {
1642
+ "name": "group_id",
1643
+ "in": "path",
1644
+ "description": "Id of the group you want to fetch.",
1645
+ "required": true,
1646
+ "schema": {
1647
+ "type": "string",
1648
+ "format": "uuid"
1649
+ }
1650
+ },
1651
+ {
1652
+ "name": "delete_chunks",
1653
+ "in": "query",
1654
+ "description": "Delete the chunks within the group",
1655
+ "required": true,
1656
+ "schema": {
1657
+ "type": "boolean"
1658
+ }
1659
+ }
1660
+ ],
1661
+ "responses": {
1662
+ "204": {
1663
+ "description": "Confirmation that the chunkGroup was deleted"
1664
+ },
1665
+ "400": {
1666
+ "description": "Service error relating to deleting the chunkGroup",
1667
+ "content": {
1668
+ "application/json": {
1669
+ "schema": {
1670
+ "$ref": "#/components/schemas/ErrorResponseBody"
1671
+ }
1672
+ }
1673
+ }
1674
+ }
1675
+ },
1676
+ "security": [
1677
+ {
1678
+ "ApiKey": [
1679
+ "admin"
1680
+ ]
1681
+ }
1682
+ ]
1683
+ }
1684
+ },
1685
+ "/api/chunk_group/{group_id}/{page}": {
1686
+ "get": {
1687
+ "tags": [
1688
+ "chunk_group"
1689
+ ],
1690
+ "summary": "Get Chunks in Group",
1691
+ "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.",
1692
+ "operationId": "get_chunks_in_group",
1693
+ "parameters": [
1694
+ {
1695
+ "name": "TR-Dataset",
1696
+ "in": "header",
1697
+ "description": "The dataset id to use for the request",
1698
+ "required": true,
1699
+ "schema": {
1700
+ "type": "string"
1701
+ }
1702
+ },
1703
+ {
1704
+ "name": "group_id",
1705
+ "in": "path",
1706
+ "description": "Id of the group you want to fetch.",
1707
+ "required": true,
1708
+ "schema": {
1709
+ "type": "string",
1710
+ "format": "uuid"
1711
+ }
1712
+ },
1713
+ {
1714
+ "name": "page",
1715
+ "in": "path",
1716
+ "description": "The page of chunks to get from the group",
1717
+ "required": true,
1718
+ "schema": {
1719
+ "type": "integer",
1720
+ "format": "int64",
1721
+ "nullable": true,
1722
+ "minimum": 0
1723
+ }
1724
+ }
1725
+ ],
1726
+ "responses": {
1727
+ "200": {
1728
+ "description": "Chunks present within the specified group",
1729
+ "content": {
1730
+ "application/json": {
1731
+ "schema": {
1732
+ "$ref": "#/components/schemas/BookmarkData"
1733
+ }
1734
+ }
1735
+ }
1736
+ },
1737
+ "400": {
1738
+ "description": "Service error relating to getting the groups that the chunk is in",
1739
+ "content": {
1740
+ "application/json": {
1741
+ "schema": {
1742
+ "$ref": "#/components/schemas/ErrorResponseBody"
1743
+ }
1744
+ }
1745
+ }
1746
+ }
1747
+ },
1748
+ "security": [
1749
+ {
1750
+ "ApiKey": [
1751
+ "readonly"
1752
+ ]
1753
+ }
1754
+ ]
1755
+ }
1756
+ },
1757
+ "/api/dataset": {
1758
+ "post": {
1702
1759
  "tags": [
1703
1760
  "dataset"
1704
1761
  ],
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.",
1762
+ "summary": "Create dataset",
1763
+ "description": "Create dataset\n\nCreate a new dataset. The auth'ed user must be an owner of the organization to create a dataset.",
1707
1764
  "operationId": "create_dataset",
1708
1765
  "parameters": [
1709
1766
  {
@@ -1754,11 +1811,6 @@
1754
1811
  "ApiKey": [
1755
1812
  "owner"
1756
1813
  ]
1757
- },
1758
- {
1759
- "Cookie": [
1760
- "owner"
1761
- ]
1762
1814
  }
1763
1815
  ]
1764
1816
  },
@@ -1766,8 +1818,8 @@
1766
1818
  "tags": [
1767
1819
  "dataset"
1768
1820
  ],
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.",
1821
+ "summary": "Update Dataset",
1822
+ "description": "Update Dataset\n\nUpdate a dataset. The auth'ed user must be an owner of the organization to update a dataset.",
1771
1823
  "operationId": "update_dataset",
1772
1824
  "parameters": [
1773
1825
  {
@@ -1818,11 +1870,6 @@
1818
1870
  "ApiKey": [
1819
1871
  "owner"
1820
1872
  ]
1821
- },
1822
- {
1823
- "Cookie": [
1824
- "owner"
1825
- ]
1826
1873
  }
1827
1874
  ]
1828
1875
  },
@@ -1830,8 +1877,8 @@
1830
1877
  "tags": [
1831
1878
  "dataset"
1832
1879
  ],
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.",
1880
+ "summary": "Delete Dataset",
1881
+ "description": "Delete Dataset\n\nDelete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.",
1835
1882
  "operationId": "delete_dataset",
1836
1883
  "parameters": [
1837
1884
  {
@@ -1875,11 +1922,6 @@
1875
1922
  "ApiKey": [
1876
1923
  "owner"
1877
1924
  ]
1878
- },
1879
- {
1880
- "Cookie": [
1881
- "owner"
1882
- ]
1883
1925
  }
1884
1926
  ]
1885
1927
  }
@@ -1889,8 +1931,8 @@
1889
1931
  "tags": [
1890
1932
  "dataset"
1891
1933
  ],
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",
1934
+ "summary": "Get Client Configuration",
1935
+ "description": "Get Client Configuration\n\nGet the client configuration for a dataset. Will use the TR-D",
1894
1936
  "operationId": "get_client_dataset_config",
1895
1937
  "parameters": [
1896
1938
  {
@@ -1930,11 +1972,6 @@
1930
1972
  "ApiKey": [
1931
1973
  "readonly"
1932
1974
  ]
1933
- },
1934
- {
1935
- "Cookie": [
1936
- "readonly"
1937
- ]
1938
1975
  }
1939
1976
  ]
1940
1977
  }
@@ -1944,8 +1981,8 @@
1944
1981
  "tags": [
1945
1982
  "file"
1946
1983
  ],
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.",
1984
+ "summary": "Get Files for Dataset",
1985
+ "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
1986
  "operationId": "get_dataset_files_handler",
1950
1987
  "parameters": [
1951
1988
  {
@@ -2009,11 +2046,6 @@
2009
2046
  "ApiKey": [
2010
2047
  "readonly"
2011
2048
  ]
2012
- },
2013
- {
2014
- "Cookie": [
2015
- "readonly"
2016
- ]
2017
2049
  }
2018
2050
  ]
2019
2051
  }
@@ -2023,8 +2055,8 @@
2023
2055
  "tags": [
2024
2056
  "chunk_group"
2025
2057
  ],
2026
- "summary": "get_dataset_groups",
2027
- "description": "get_dataset_groups\n\nFetch the groups which belong to a dataset specified by its id.",
2058
+ "summary": "Get Groups for Dataset",
2059
+ "description": "Get Groups for Dataset\n\nFetch the groups which belong to a dataset specified by its id.",
2028
2060
  "operationId": "get_specific_dataset_chunk_groups",
2029
2061
  "parameters": [
2030
2062
  {
@@ -2084,11 +2116,6 @@
2084
2116
  "ApiKey": [
2085
2117
  "readonly"
2086
2118
  ]
2087
- },
2088
- {
2089
- "Cookie": [
2090
- "readonly"
2091
- ]
2092
2119
  }
2093
2120
  ]
2094
2121
  }
@@ -2098,8 +2125,8 @@
2098
2125
  "tags": [
2099
2126
  "dataset"
2100
2127
  ],
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.",
2128
+ "summary": "Get Datasets from Organization",
2129
+ "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
2130
  "operationId": "get_datasets_from_organization",
2104
2131
  "parameters": [
2105
2132
  {
@@ -2152,11 +2179,6 @@
2152
2179
  "ApiKey": [
2153
2180
  "admin"
2154
2181
  ]
2155
- },
2156
- {
2157
- "Cookie": [
2158
- "admin"
2159
- ]
2160
2182
  }
2161
2183
  ]
2162
2184
  }
@@ -2166,8 +2188,8 @@
2166
2188
  "tags": [
2167
2189
  "dataset"
2168
2190
  ],
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.",
2191
+ "summary": "Get Dataset",
2192
+ "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
2193
  "operationId": "get_dataset",
2172
2194
  "parameters": [
2173
2195
  {
@@ -2226,22 +2248,17 @@
2226
2248
  "ApiKey": [
2227
2249
  "admin"
2228
2250
  ]
2229
- },
2230
- {
2231
- "Cookie": [
2232
- "admin"
2233
- ]
2234
2251
  }
2235
2252
  ]
2236
2253
  }
2237
2254
  },
2238
- "/api/events/{page}": {
2239
- "get": {
2255
+ "/api/events": {
2256
+ "post": {
2240
2257
  "tags": [
2241
2258
  "events"
2242
2259
  ],
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.",
2260
+ "summary": "Get events for the dataset",
2261
+ "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
2262
  "operationId": "get_events",
2246
2263
  "parameters": [
2247
2264
  {
@@ -2252,18 +2269,19 @@
2252
2269
  "schema": {
2253
2270
  "type": "string"
2254
2271
  }
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
2272
  }
2266
2273
  ],
2274
+ "requestBody": {
2275
+ "description": "JSON request payload to get events for a dataset",
2276
+ "content": {
2277
+ "application/json": {
2278
+ "schema": {
2279
+ "$ref": "#/components/schemas/GetEventsData"
2280
+ }
2281
+ }
2282
+ },
2283
+ "required": true
2284
+ },
2267
2285
  "responses": {
2268
2286
  "200": {
2269
2287
  "description": "Events for the dataset",
@@ -2291,11 +2309,6 @@
2291
2309
  "ApiKey": [
2292
2310
  "readonly"
2293
2311
  ]
2294
- },
2295
- {
2296
- "Cookie": [
2297
- "readonly"
2298
- ]
2299
2312
  }
2300
2313
  ]
2301
2314
  }
@@ -2305,8 +2318,8 @@
2305
2318
  "tags": [
2306
2319
  "file"
2307
2320
  ],
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.",
2321
+ "summary": "Upload File",
2322
+ "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
2323
  "operationId": "upload_file_handler",
2311
2324
  "parameters": [
2312
2325
  {
@@ -2357,11 +2370,6 @@
2357
2370
  "ApiKey": [
2358
2371
  "admin"
2359
2372
  ]
2360
- },
2361
- {
2362
- "Cookie": [
2363
- "admin"
2364
- ]
2365
2373
  }
2366
2374
  ]
2367
2375
  }
@@ -2371,8 +2379,8 @@
2371
2379
  "tags": [
2372
2380
  "file"
2373
2381
  ],
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.",
2382
+ "summary": "Get File",
2383
+ "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
2384
  "operationId": "get_file_handler",
2377
2385
  "parameters": [
2378
2386
  {
@@ -2422,11 +2430,6 @@
2422
2430
  "ApiKey": [
2423
2431
  "readonly"
2424
2432
  ]
2425
- },
2426
- {
2427
- "Cookie": [
2428
- "readonly"
2429
- ]
2430
2433
  }
2431
2434
  ]
2432
2435
  },
@@ -2434,8 +2437,8 @@
2434
2437
  "tags": [
2435
2438
  "file"
2436
2439
  ],
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.",
2440
+ "summary": "Delete File",
2441
+ "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
2442
  "operationId": "delete_file_handler",
2440
2443
  "parameters": [
2441
2444
  {
@@ -2487,11 +2490,6 @@
2487
2490
  "ApiKey": [
2488
2491
  "admin"
2489
2492
  ]
2490
- },
2491
- {
2492
- "Cookie": [
2493
- "admin"
2494
- ]
2495
2493
  }
2496
2494
  ]
2497
2495
  }
@@ -2501,6 +2499,8 @@
2501
2499
  "tags": [
2502
2500
  "health"
2503
2501
  ],
2502
+ "summary": "Health Check",
2503
+ "description": "Health Check\n\nConfirmation that the service is healthy and can make embedding vectors",
2504
2504
  "operationId": "health_check",
2505
2505
  "responses": {
2506
2506
  "200": {
@@ -2524,8 +2524,8 @@
2524
2524
  "tags": [
2525
2525
  "invitation"
2526
2526
  ],
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.",
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.",
2529
2529
  "operationId": "post_invitation",
2530
2530
  "parameters": [
2531
2531
  {
@@ -2569,11 +2569,6 @@
2569
2569
  "ApiKey": [
2570
2570
  "admin"
2571
2571
  ]
2572
- },
2573
- {
2574
- "Cookie": [
2575
- "admin"
2576
- ]
2577
2572
  }
2578
2573
  ]
2579
2574
  }
@@ -2583,8 +2578,8 @@
2583
2578
  "tags": [
2584
2579
  "message"
2585
2580
  ],
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.",
2581
+ "summary": "Create a message",
2582
+ "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
2583
  "operationId": "create_message_completion_handler",
2589
2584
  "parameters": [
2590
2585
  {
@@ -2635,11 +2630,6 @@
2635
2630
  "ApiKey": [
2636
2631
  "readonly"
2637
2632
  ]
2638
- },
2639
- {
2640
- "Cookie": [
2641
- "readonly"
2642
- ]
2643
2633
  }
2644
2634
  ]
2645
2635
  },
@@ -2647,8 +2637,8 @@
2647
2637
  "tags": [
2648
2638
  "message"
2649
2639
  ],
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.",
2640
+ "summary": "Edit a message",
2641
+ "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
2642
  "operationId": "edit_message_handler",
2653
2643
  "parameters": [
2654
2644
  {
@@ -2692,11 +2682,6 @@
2692
2682
  "ApiKey": [
2693
2683
  "readonly"
2694
2684
  ]
2695
- },
2696
- {
2697
- "Cookie": [
2698
- "readonly"
2699
- ]
2700
2685
  }
2701
2686
  ]
2702
2687
  },
@@ -2704,8 +2689,8 @@
2704
2689
  "tags": [
2705
2690
  "message"
2706
2691
  ],
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.",
2692
+ "summary": "Regenerate message",
2693
+ "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
2694
  "operationId": "regenerate_message_handler",
2710
2695
  "parameters": [
2711
2696
  {
@@ -2756,11 +2741,6 @@
2756
2741
  "ApiKey": [
2757
2742
  "readonly"
2758
2743
  ]
2759
- },
2760
- {
2761
- "Cookie": [
2762
- "readonly"
2763
- ]
2764
2744
  }
2765
2745
  ]
2766
2746
  }
@@ -2770,8 +2750,8 @@
2770
2750
  "tags": [
2771
2751
  "message"
2772
2752
  ],
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.",
2753
+ "summary": "Get all messages for a given topic",
2754
+ "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
2755
  "operationId": "get_all_topic_messages",
2776
2756
  "parameters": [
2777
2757
  {
@@ -2824,11 +2804,6 @@
2824
2804
  "ApiKey": [
2825
2805
  "readonly"
2826
2806
  ]
2827
- },
2828
- {
2829
- "Cookie": [
2830
- "readonly"
2831
- ]
2832
2807
  }
2833
2808
  ]
2834
2809
  }
@@ -2838,8 +2813,8 @@
2838
2813
  "tags": [
2839
2814
  "organization"
2840
2815
  ],
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.",
2816
+ "summary": "Create Organization",
2817
+ "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
2818
  "operationId": "create_organization",
2844
2819
  "requestBody": {
2845
2820
  "description": "The organization data that you want to create",
@@ -2879,11 +2854,6 @@
2879
2854
  "ApiKey": [
2880
2855
  "readonly"
2881
2856
  ]
2882
- },
2883
- {
2884
- "Cookie": [
2885
- "readonly"
2886
- ]
2887
2857
  }
2888
2858
  ]
2889
2859
  },
@@ -2891,8 +2861,8 @@
2891
2861
  "tags": [
2892
2862
  "organization"
2893
2863
  ],
2894
- "summary": "update_organization",
2895
- "description": "update_organization\n\nUpdate an organization. Only the owner of the organization can update it.",
2864
+ "summary": "Update Organization",
2865
+ "description": "Update Organization\n\nUpdate an organization. Only the owner of the organization can update it.",
2896
2866
  "operationId": "update_organization",
2897
2867
  "parameters": [
2898
2868
  {
@@ -2943,11 +2913,6 @@
2943
2913
  "ApiKey": [
2944
2914
  "owner"
2945
2915
  ]
2946
- },
2947
- {
2948
- "Cookie": [
2949
- "owner"
2950
- ]
2951
2916
  }
2952
2917
  ]
2953
2918
  }
@@ -2957,8 +2922,8 @@
2957
2922
  "tags": [
2958
2923
  "organization"
2959
2924
  ],
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.",
2925
+ "summary": "Get Organization Usage",
2926
+ "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
2927
  "operationId": "get_organization_usage",
2963
2928
  "parameters": [
2964
2929
  {
@@ -3008,11 +2973,6 @@
3008
2973
  "ApiKey": [
3009
2974
  "admin"
3010
2975
  ]
3011
- },
3012
- {
3013
- "Cookie": [
3014
- "admin"
3015
- ]
3016
2976
  }
3017
2977
  ]
3018
2978
  }
@@ -3022,8 +2982,8 @@
3022
2982
  "tags": [
3023
2983
  "organization"
3024
2984
  ],
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.",
2985
+ "summary": "Get Organization Users",
2986
+ "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
2987
  "operationId": "get_organization_users",
3028
2988
  "parameters": [
3029
2989
  {
@@ -3076,11 +3036,6 @@
3076
3036
  "ApiKey": [
3077
3037
  "admin"
3078
3038
  ]
3079
- },
3080
- {
3081
- "Cookie": [
3082
- "admin"
3083
- ]
3084
3039
  }
3085
3040
  ]
3086
3041
  }
@@ -3090,8 +3045,8 @@
3090
3045
  "tags": [
3091
3046
  "organization"
3092
3047
  ],
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.",
3048
+ "summary": "Get Organization",
3049
+ "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
3050
  "operationId": "get_organization_by_id",
3096
3051
  "parameters": [
3097
3052
  {
@@ -3141,11 +3096,6 @@
3141
3096
  "ApiKey": [
3142
3097
  "admin"
3143
3098
  ]
3144
- },
3145
- {
3146
- "Cookie": [
3147
- "admin"
3148
- ]
3149
3099
  }
3150
3100
  ]
3151
3101
  },
@@ -3153,8 +3103,8 @@
3153
3103
  "tags": [
3154
3104
  "organization"
3155
3105
  ],
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.",
3106
+ "summary": "Delete Organization",
3107
+ "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
3108
  "operationId": "delete_organization_by_id",
3159
3109
  "parameters": [
3160
3110
  {
@@ -3204,11 +3154,6 @@
3204
3154
  "ApiKey": [
3205
3155
  "admin"
3206
3156
  ]
3207
- },
3208
- {
3209
- "Cookie": [
3210
- "admin"
3211
- ]
3212
3157
  }
3213
3158
  ]
3214
3159
  }
@@ -3218,6 +3163,8 @@
3218
3163
  "tags": [
3219
3164
  "stripe"
3220
3165
  ],
3166
+ "summary": "Checkout",
3167
+ "description": "Checkout\n\nGet a direct link to the stripe checkout page for the plan and organization",
3221
3168
  "operationId": "direct_to_payment_link",
3222
3169
  "parameters": [
3223
3170
  {
@@ -3263,6 +3210,8 @@
3263
3210
  "tags": [
3264
3211
  "stripe"
3265
3212
  ],
3213
+ "summary": "Get All Plans",
3214
+ "description": "Get All Plans\n\nGet a list of all plans",
3266
3215
  "operationId": "get_all_plans",
3267
3216
  "responses": {
3268
3217
  "200": {
@@ -3296,6 +3245,8 @@
3296
3245
  "tags": [
3297
3246
  "stripe"
3298
3247
  ],
3248
+ "summary": "Cancel Subscription",
3249
+ "description": "Cancel Subscription\n\nCancel a subscription by its id",
3299
3250
  "operationId": "cancel_subscription",
3300
3251
  "parameters": [
3301
3252
  {
@@ -3338,11 +3289,6 @@
3338
3289
  "ApiKey": [
3339
3290
  "owner"
3340
3291
  ]
3341
- },
3342
- {
3343
- "Cookie": [
3344
- "owner"
3345
- ]
3346
3292
  }
3347
3293
  ]
3348
3294
  }
@@ -3352,6 +3298,8 @@
3352
3298
  "tags": [
3353
3299
  "stripe"
3354
3300
  ],
3301
+ "summary": "Update Subscription Plan",
3302
+ "description": "Update Subscription Plan\n\nUpdate a subscription to a new plan",
3355
3303
  "operationId": "update_subscription_plan",
3356
3304
  "parameters": [
3357
3305
  {
@@ -3404,11 +3352,6 @@
3404
3352
  "ApiKey": [
3405
3353
  "readonly"
3406
3354
  ]
3407
- },
3408
- {
3409
- "Cookie": [
3410
- "readonly"
3411
- ]
3412
3355
  }
3413
3356
  ]
3414
3357
  }
@@ -3418,8 +3361,8 @@
3418
3361
  "tags": [
3419
3362
  "topic"
3420
3363
  ],
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.",
3364
+ "summary": "Create Topic",
3365
+ "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
3366
  "operationId": "create_topic",
3424
3367
  "parameters": [
3425
3368
  {
@@ -3470,11 +3413,6 @@
3470
3413
  "ApiKey": [
3471
3414
  "readonly"
3472
3415
  ]
3473
- },
3474
- {
3475
- "Cookie": [
3476
- "readonly"
3477
- ]
3478
3416
  }
3479
3417
  ]
3480
3418
  },
@@ -3482,8 +3420,8 @@
3482
3420
  "tags": [
3483
3421
  "topic"
3484
3422
  ],
3485
- "summary": "update_topic",
3486
- "description": "update_topic\n\nUpdate an existing chat topic. Currently, only the name of the topic can be updated.",
3423
+ "summary": "Update Topic",
3424
+ "description": "Update Topic\n\nUpdate an existing chat topic. Currently, only the name of the topic can be updated.",
3487
3425
  "operationId": "update_topic",
3488
3426
  "parameters": [
3489
3427
  {
@@ -3527,11 +3465,6 @@
3527
3465
  "ApiKey": [
3528
3466
  "readonly"
3529
3467
  ]
3530
- },
3531
- {
3532
- "Cookie": [
3533
- "readonly"
3534
- ]
3535
3468
  }
3536
3469
  ]
3537
3470
  },
@@ -3539,8 +3472,8 @@
3539
3472
  "tags": [
3540
3473
  "topic"
3541
3474
  ],
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.",
3475
+ "summary": "Delete Topic",
3476
+ "description": "Delete Topic\n\nDelete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.",
3544
3477
  "operationId": "delete_topic",
3545
3478
  "parameters": [
3546
3479
  {
@@ -3584,11 +3517,6 @@
3584
3517
  "ApiKey": [
3585
3518
  "readonly"
3586
3519
  ]
3587
- },
3588
- {
3589
- "Cookie": [
3590
- "readonly"
3591
- ]
3592
3520
  }
3593
3521
  ]
3594
3522
  }
@@ -3598,8 +3526,8 @@
3598
3526
  "tags": [
3599
3527
  "topic"
3600
3528
  ],
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.",
3529
+ "summary": "Get All Topics for User",
3530
+ "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
3531
  "operationId": "get_all_topics_for_user",
3604
3532
  "parameters": [
3605
3533
  {
@@ -3652,11 +3580,6 @@
3652
3580
  "ApiKey": [
3653
3581
  "readonly"
3654
3582
  ]
3655
- },
3656
- {
3657
- "Cookie": [
3658
- "readonly"
3659
- ]
3660
3583
  }
3661
3584
  ]
3662
3585
  }
@@ -3666,8 +3589,8 @@
3666
3589
  "tags": [
3667
3590
  "user"
3668
3591
  ],
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.",
3592
+ "summary": "Update User",
3593
+ "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
3594
  "operationId": "update_user",
3672
3595
  "requestBody": {
3673
3596
  "description": "JSON request payload to update user information for the auth'ed user",
@@ -3707,11 +3630,6 @@
3707
3630
  "ApiKey": [
3708
3631
  "readonly"
3709
3632
  ]
3710
- },
3711
- {
3712
- "Cookie": [
3713
- "readonly"
3714
- ]
3715
3633
  }
3716
3634
  ]
3717
3635
  }
@@ -3721,8 +3639,8 @@
3721
3639
  "tags": [
3722
3640
  "user"
3723
3641
  ],
3724
- "summary": "delete_user_api_key",
3725
- "description": "delete_user_api_key\n\nDelete an api key for the auth'ed user.",
3642
+ "summary": "Delete User Api Key",
3643
+ "description": "Delete User Api Key\n\nDelete an api key for the auth'ed user.",
3726
3644
  "operationId": "delete_user_api_key",
3727
3645
  "requestBody": {
3728
3646
  "description": "JSON request payload to delete a user api key",
@@ -3765,11 +3683,6 @@
3765
3683
  "ApiKey": [
3766
3684
  "readonly"
3767
3685
  ]
3768
- },
3769
- {
3770
- "Cookie": [
3771
- "readonly"
3772
- ]
3773
3686
  }
3774
3687
  ]
3775
3688
  }
@@ -3779,8 +3692,8 @@
3779
3692
  "tags": [
3780
3693
  "user"
3781
3694
  ],
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.",
3695
+ "summary": "Set User Api Key",
3696
+ "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
3697
  "operationId": "set_user_api_key",
3785
3698
  "requestBody": {
3786
3699
  "description": "JSON request payload to create a new user api key",
@@ -3820,238 +3733,6 @@
3820
3733
  "ApiKey": [
3821
3734
  "readonly"
3822
3735
  ]
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
3736
  }
4056
3737
  ]
4057
3738
  }
@@ -4068,7 +3749,7 @@
4068
3749
  "chunk_id": {
4069
3750
  "type": "string",
4070
3751
  "format": "uuid",
4071
- "description": "Id of the chunk to make a member of the group. Think of this as \"bookmark\"ing a chunk."
3752
+ "description": "Id of the chunk to make a member of the group."
4072
3753
  }
4073
3754
  }
4074
3755
  },
@@ -4106,6 +3787,14 @@
4106
3787
  "type": "string",
4107
3788
  "format": "uuid"
4108
3789
  }
3790
+ },
3791
+ "example": {
3792
+ "created_at": "2021-01-01T00:00:00",
3793
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
3794
+ "name": "Trieve",
3795
+ "role": 1,
3796
+ "updated_at": "2021-01-01T00:00:00",
3797
+ "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
4109
3798
  }
4110
3799
  },
4111
3800
  "AuthQuery": {
@@ -4128,6 +3817,78 @@
4128
3817
  "description": "URL to redirect to after successful login",
4129
3818
  "nullable": true
4130
3819
  }
3820
+ },
3821
+ "example": {
3822
+ "inv_code": "00000000-0000-0000-0000-000000000000",
3823
+ "organization_id": "00000000-0000-0000-0000-000000000000",
3824
+ "redirect_uri": "https://api.trieve.ai"
3825
+ }
3826
+ },
3827
+ "BatchQueuedChunkResponse": {
3828
+ "type": "object",
3829
+ "required": [
3830
+ "chunk_metadata",
3831
+ "pos_in_queue"
3832
+ ],
3833
+ "properties": {
3834
+ "chunk_metadata": {
3835
+ "type": "array",
3836
+ "items": {
3837
+ "$ref": "#/components/schemas/ChunkMetadata"
3838
+ }
3839
+ },
3840
+ "pos_in_queue": {
3841
+ "type": "integer",
3842
+ "format": "int32",
3843
+ "description": "The current position the last access item is in the queue"
3844
+ }
3845
+ },
3846
+ "example": {
3847
+ "chunk_metadata": [
3848
+ {
3849
+ "chunk_vector": [
3850
+ 0.1,
3851
+ 0.2,
3852
+ 0.3
3853
+ ],
3854
+ "content": "Some content",
3855
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
3856
+ "link": "https://example.com",
3857
+ "metadata": {
3858
+ "key1": "value1",
3859
+ "key2": "value2"
3860
+ },
3861
+ "tag_set": [
3862
+ "tag1",
3863
+ "tag2"
3864
+ ],
3865
+ "time_stamp": "2021-01-01T00:00:00",
3866
+ "tracking_id": "tracking_id",
3867
+ "weight": 0.5
3868
+ },
3869
+ {
3870
+ "chunk_vector": [
3871
+ 0.1,
3872
+ 0.2,
3873
+ 0.3
3874
+ ],
3875
+ "content": "Some content",
3876
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
3877
+ "link": "https://example.com",
3878
+ "metadata": {
3879
+ "key1": "value1",
3880
+ "key2": "value2"
3881
+ },
3882
+ "tag_set": [
3883
+ "tag1",
3884
+ "tag2"
3885
+ ],
3886
+ "time_stamp": "2021-01-01T00:00:00",
3887
+ "tracking_id": "tracking_id",
3888
+ "weight": 0.5
3889
+ }
3890
+ ],
3891
+ "pos_in_queue": 2
4131
3892
  }
4132
3893
  },
4133
3894
  "BookmarkData": {
@@ -4185,6 +3946,124 @@
4185
3946
  "role": {
4186
3947
  "type": "string"
4187
3948
  }
3949
+ },
3950
+ "example": {
3951
+ "content": "Hello, world!",
3952
+ "role": "user"
3953
+ }
3954
+ },
3955
+ "ChunkData": {
3956
+ "type": "object",
3957
+ "properties": {
3958
+ "chunk_html": {
3959
+ "type": "string",
3960
+ "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.",
3961
+ "nullable": true
3962
+ },
3963
+ "chunk_vector": {
3964
+ "type": "array",
3965
+ "items": {
3966
+ "type": "number",
3967
+ "format": "float"
3968
+ },
3969
+ "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.",
3970
+ "nullable": true
3971
+ },
3972
+ "file_id": {
3973
+ "type": "string",
3974
+ "format": "uuid",
3975
+ "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.",
3976
+ "nullable": true
3977
+ },
3978
+ "group_ids": {
3979
+ "type": "array",
3980
+ "items": {
3981
+ "type": "string",
3982
+ "format": "uuid"
3983
+ },
3984
+ "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.",
3985
+ "nullable": true
3986
+ },
3987
+ "group_tracking_ids": {
3988
+ "type": "array",
3989
+ "items": {
3990
+ "type": "string"
3991
+ },
3992
+ "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.",
3993
+ "nullable": true
3994
+ },
3995
+ "link": {
3996
+ "type": "string",
3997
+ "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.",
3998
+ "nullable": true
3999
+ },
4000
+ "metadata": {
4001
+ "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.",
4002
+ "nullable": true
4003
+ },
4004
+ "split_avg": {
4005
+ "type": "boolean",
4006
+ "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.",
4007
+ "nullable": true
4008
+ },
4009
+ "tag_set": {
4010
+ "type": "array",
4011
+ "items": {
4012
+ "type": "string"
4013
+ },
4014
+ "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.",
4015
+ "nullable": true
4016
+ },
4017
+ "time_stamp": {
4018
+ "type": "string",
4019
+ "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.",
4020
+ "nullable": true
4021
+ },
4022
+ "tracking_id": {
4023
+ "type": "string",
4024
+ "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.",
4025
+ "nullable": true
4026
+ },
4027
+ "upsert_by_tracking_id": {
4028
+ "type": "boolean",
4029
+ "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.",
4030
+ "nullable": true
4031
+ },
4032
+ "weight": {
4033
+ "type": "number",
4034
+ "format": "double",
4035
+ "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.",
4036
+ "nullable": true
4037
+ }
4038
+ },
4039
+ "example": {
4040
+ "chunk_html": "<p>Some HTML content</p>",
4041
+ "chunk_vector": [
4042
+ 0.1,
4043
+ 0.2,
4044
+ 0.3
4045
+ ],
4046
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
4047
+ "group_ids": [
4048
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
4049
+ ],
4050
+ "group_tracking_ids": [
4051
+ "group_tracking_id"
4052
+ ],
4053
+ "link": "https://example.com",
4054
+ "metadata": {
4055
+ "key1": "value1",
4056
+ "key2": "value2"
4057
+ },
4058
+ "split_avg": false,
4059
+ "tag_set": [
4060
+ "tag1",
4061
+ "tag2"
4062
+ ],
4063
+ "time_stamp": "2021-01-01T00:00:00",
4064
+ "tracking_id": "tracking_id",
4065
+ "upsert_by_tracking_id": true,
4066
+ "weight": 0.5
4188
4067
  }
4189
4068
  },
4190
4069
  "ChunkFilter": {
@@ -4214,6 +4093,53 @@
4214
4093
  "description": "Only one of these field conditions has to match for the chunk to be included in the result set.",
4215
4094
  "nullable": true
4216
4095
  }
4096
+ },
4097
+ "example": {
4098
+ "must": [
4099
+ {
4100
+ "field": "metadata.key2",
4101
+ "match": [
4102
+ "value3",
4103
+ "value4"
4104
+ ],
4105
+ "range": {
4106
+ "gt": 0.0,
4107
+ "gte": 0.0,
4108
+ "lt": 1.0,
4109
+ "lte": 1.0
4110
+ }
4111
+ }
4112
+ ],
4113
+ "must_not": [
4114
+ {
4115
+ "field": "metadata.key3",
4116
+ "match": [
4117
+ "value5",
4118
+ "value6"
4119
+ ],
4120
+ "range": {
4121
+ "gt": 0.0,
4122
+ "gte": 0.0,
4123
+ "lt": 1.0,
4124
+ "lte": 1.0
4125
+ }
4126
+ }
4127
+ ],
4128
+ "should": [
4129
+ {
4130
+ "field": "metadata.key1",
4131
+ "match": [
4132
+ "value1",
4133
+ "value2"
4134
+ ],
4135
+ "range": {
4136
+ "gt": 0.0,
4137
+ "gte": 0.0,
4138
+ "lt": 1.0,
4139
+ "lte": 1.0
4140
+ }
4141
+ }
4142
+ ]
4217
4143
  }
4218
4144
  },
4219
4145
  "ChunkGroup": {
@@ -4253,6 +4179,14 @@
4253
4179
  "type": "string",
4254
4180
  "format": "date-time"
4255
4181
  }
4182
+ },
4183
+ "example": {
4184
+ "created_at": "2021-01-01T00:00:00",
4185
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4186
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4187
+ "name": "Trieve",
4188
+ "tracking_id": "3",
4189
+ "updated_at": "2021-01-01T00:00:00"
4256
4190
  }
4257
4191
  },
4258
4192
  "ChunkGroupAndFile": {
@@ -4297,6 +4231,16 @@
4297
4231
  "type": "string",
4298
4232
  "format": "date-time"
4299
4233
  }
4234
+ },
4235
+ "example": {
4236
+ "created_at": "2021-01-01T00:00:00",
4237
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4238
+ "description": "A group of chunks",
4239
+ "file_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4240
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4241
+ "name": "Trieve",
4242
+ "tracking_id": "3",
4243
+ "updated_at": "2021-01-01T00:00:00"
4300
4244
  }
4301
4245
  },
4302
4246
  "ChunkMetadata": {
@@ -4362,6 +4306,23 @@
4362
4306
  "type": "number",
4363
4307
  "format": "double"
4364
4308
  }
4309
+ },
4310
+ "example": {
4311
+ "chunk_html": "<p>Hello, world!</p>",
4312
+ "content": "Hello, world!",
4313
+ "created_at": "2021-01-01T00:00:00",
4314
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4315
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4316
+ "link": "https://trieve.ai",
4317
+ "metadata": {
4318
+ "key": "value"
4319
+ },
4320
+ "qdrant_point_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4321
+ "tag_set": "tag1,tag2",
4322
+ "time_stamp": "2021-01-01T00:00:00",
4323
+ "tracking_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4324
+ "updated_at": "2021-01-01T00:00:00",
4325
+ "weight": 0.5
4365
4326
  }
4366
4327
  },
4367
4328
  "ChunkMetadataWithFileData": {
@@ -4431,6 +4392,24 @@
4431
4392
  "type": "number",
4432
4393
  "format": "double"
4433
4394
  }
4395
+ },
4396
+ "example": {
4397
+ "chunk_html": "<p>Hello, world!</p>",
4398
+ "content": "Hello, world!",
4399
+ "created_at": "2021-01-01T00:00:00",
4400
+ "file_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4401
+ "file_name": "file.txt",
4402
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4403
+ "link": "https://trieve.ai",
4404
+ "metadata": {
4405
+ "key": "value"
4406
+ },
4407
+ "qdrant_point_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4408
+ "tag_set": "tag1,tag2",
4409
+ "time_stamp": "2021-01-01T00:00:00",
4410
+ "tracking_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4411
+ "updated_at": "2021-01-01T00:00:00",
4412
+ "weight": 0.5
4434
4413
  }
4435
4414
  },
4436
4415
  "ClientDatasetConfiguration": {
@@ -4482,92 +4461,96 @@
4482
4461
  "type": "string",
4483
4462
  "nullable": true
4484
4463
  }
4464
+ },
4465
+ "example": {
4466
+ "CREATE_CHUNK_FEATURE": true,
4467
+ "DATE_RANGE_VALUE": "date range value",
4468
+ "DOCUMENT_UPLOAD_FEATURE": true,
4469
+ "FILE_NAME_KEY": "file_name_key",
4470
+ "FILTER_ITEMS": [],
4471
+ "FRONTMATTER_VALS": "frontmatter vals",
4472
+ "IMAGE_RANGE_END_KEY": "image range end key",
4473
+ "IMAGE_RANGE_START_KEY": "image range start key",
4474
+ "LINES_BEFORE_SHOW_MORE": 10,
4475
+ "SEARCH_QUERIES": "search queries",
4476
+ "SUGGESTED_QUERIES": "suggested queries"
4485
4477
  }
4486
4478
  },
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"
4479
+ "CreateBatchChunkData": {
4480
+ "type": "array",
4481
+ "items": {
4482
+ "$ref": "#/components/schemas/ChunkData"
4483
+ },
4484
+ "example": [
4485
+ {
4486
+ "chunk_html": "<p>Some HTML content</p>",
4487
+ "chunk_vector": [
4488
+ 0.1,
4489
+ 0.2,
4490
+ 0.3
4491
+ ],
4492
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
4493
+ "group_ids": [
4494
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
4495
+ ],
4496
+ "group_tracking_ids": [
4497
+ "group_tracking_id"
4498
+ ],
4499
+ "link": "https://example.com",
4500
+ "metadata": {
4501
+ "key1": "value1",
4502
+ "key2": "value2"
4523
4503
  },
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
4504
+ "split_avg": false,
4505
+ "tag_set": [
4506
+ "tag1",
4507
+ "tag2"
4508
+ ],
4509
+ "time_stamp": "2021-01-01T00:00:00",
4510
+ "tracking_id": "tracking_id",
4511
+ "upsert_by_tracking_id": true,
4512
+ "weight": 0.5
4540
4513
  },
4541
- "tag_set": {
4542
- "type": "array",
4543
- "items": {
4544
- "type": "string"
4514
+ {
4515
+ "chunk_html": "<p>Some more HTML content</p>",
4516
+ "chunk_vector": [
4517
+ 0.1,
4518
+ 0.2,
4519
+ 0.3
4520
+ ],
4521
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
4522
+ "group_ids": [
4523
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
4524
+ ],
4525
+ "group_tracking_ids": [
4526
+ "group_tracking_id"
4527
+ ],
4528
+ "link": "https://explain.com",
4529
+ "metadata": {
4530
+ "key1": "value1",
4531
+ "key2": "value2"
4545
4532
  },
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
4533
+ "split_avg": false,
4534
+ "tag_set": [
4535
+ "tag3",
4536
+ "tag4"
4537
+ ],
4538
+ "time_stamp": "2021-01-01T00:00:00",
4539
+ "tracking_id": "tracking_id",
4540
+ "upsert_by_tracking_id": true,
4541
+ "weight": 0.5
4542
+ }
4543
+ ]
4544
+ },
4545
+ "CreateChunkData": {
4546
+ "oneOf": [
4547
+ {
4548
+ "$ref": "#/components/schemas/CreateSingleChunkData"
4563
4549
  },
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
4550
+ {
4551
+ "$ref": "#/components/schemas/CreateBatchChunkData"
4569
4552
  }
4570
- }
4553
+ ]
4571
4554
  },
4572
4555
  "CreateChunkGroupData": {
4573
4556
  "type": "object",
@@ -4615,6 +4598,12 @@
4615
4598
  "server_configuration": {
4616
4599
  "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
4600
  }
4601
+ },
4602
+ "example": {
4603
+ "client_configuration": {},
4604
+ "dataset_name": "My Dataset",
4605
+ "organization_id": "00000000-0000-0000-0000-000000000000",
4606
+ "server_configuration": {}
4618
4607
  }
4619
4608
  },
4620
4609
  "CreateMessageData": {
@@ -4670,6 +4659,9 @@
4670
4659
  }
4671
4660
  }
4672
4661
  },
4662
+ "CreateSingleChunkData": {
4663
+ "$ref": "#/components/schemas/ChunkData"
4664
+ },
4673
4665
  "CreateTopicData": {
4674
4666
  "type": "object",
4675
4667
  "properties": {
@@ -4723,6 +4715,19 @@
4723
4715
  "type": "string",
4724
4716
  "format": "date-time"
4725
4717
  }
4718
+ },
4719
+ "example": {
4720
+ "client_configuration": {
4721
+ "key": "value"
4722
+ },
4723
+ "created_at": "2021-01-01T00:00:00",
4724
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4725
+ "name": "Trieve",
4726
+ "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4727
+ "server_configuration": {
4728
+ "key": "value"
4729
+ },
4730
+ "updated_at": "2021-01-01T00:00:00"
4726
4731
  }
4727
4732
  },
4728
4733
  "DatasetAndUsage": {
@@ -4738,6 +4743,23 @@
4738
4743
  "dataset_usage": {
4739
4744
  "$ref": "#/components/schemas/DatasetUsageCount"
4740
4745
  }
4746
+ },
4747
+ "example": {
4748
+ "dataset": {
4749
+ "client_configuration": {
4750
+ "key": "value"
4751
+ },
4752
+ "created_at": "2021-01-01T00:00:00",
4753
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4754
+ "name": "Trieve",
4755
+ "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4756
+ "updated_at": "2021-01-01T00:00:00"
4757
+ },
4758
+ "dataset_usage": {
4759
+ "chunk_count": 100,
4760
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4761
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
4762
+ }
4741
4763
  }
4742
4764
  },
4743
4765
  "DatasetDTO": {
@@ -4771,6 +4793,16 @@
4771
4793
  "type": "string",
4772
4794
  "format": "date-time"
4773
4795
  }
4796
+ },
4797
+ "example": {
4798
+ "client_configuration": {
4799
+ "key": "value"
4800
+ },
4801
+ "created_at": "2021-01-01T00:00:00",
4802
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4803
+ "name": "Trieve",
4804
+ "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4805
+ "updated_at": "2021-01-01T00:00:00"
4774
4806
  }
4775
4807
  },
4776
4808
  "DatasetUsageCount": {
@@ -4793,6 +4825,11 @@
4793
4825
  "type": "string",
4794
4826
  "format": "uuid"
4795
4827
  }
4828
+ },
4829
+ "example": {
4830
+ "chunk_count": 100,
4831
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4832
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
4796
4833
  }
4797
4834
  },
4798
4835
  "DeleteDatasetRequest": {
@@ -4890,6 +4927,9 @@
4890
4927
  "message": {
4891
4928
  "type": "string"
4892
4929
  }
4930
+ },
4931
+ "example": {
4932
+ "message": "Bad Request"
4893
4933
  }
4894
4934
  },
4895
4935
  "Event": {
@@ -4923,6 +4963,17 @@
4923
4963
  "type": "string",
4924
4964
  "format": "date-time"
4925
4965
  }
4966
+ },
4967
+ "example": {
4968
+ "created_at": "2021-01-01T00:00:00",
4969
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4970
+ "event_data": {
4971
+ "file_name": "file.txt",
4972
+ "group_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
4973
+ },
4974
+ "event_type": "file_uploaded",
4975
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4976
+ "updated_at": "2021-01-01T00:00:00"
4926
4977
  }
4927
4978
  },
4928
4979
  "EventReturn": {
@@ -4970,6 +5021,19 @@
4970
5021
  ],
4971
5022
  "nullable": true
4972
5023
  }
5024
+ },
5025
+ "example": {
5026
+ "field": "metadata.key1",
5027
+ "match": [
5028
+ "value1",
5029
+ "value2"
5030
+ ],
5031
+ "range": {
5032
+ "gt": 0.0,
5033
+ "gte": 0.0,
5034
+ "lt": 1.0,
5035
+ "lte": 1.0
5036
+ }
4973
5037
  }
4974
5038
  },
4975
5039
  "File": {
@@ -5022,6 +5086,20 @@
5022
5086
  "type": "string",
5023
5087
  "format": "date-time"
5024
5088
  }
5089
+ },
5090
+ "example": {
5091
+ "created_at": "2021-01-01T00:00:00",
5092
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5093
+ "file_name": "file.txt",
5094
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5095
+ "link": "https://trieve.ai",
5096
+ "metadata": {
5097
+ "key": "value"
5098
+ },
5099
+ "size": 1000,
5100
+ "tag_set": "tag1,tag2",
5101
+ "time_stamp": "2021-01-01T00:00:00",
5102
+ "updated_at": "2021-01-01T00:00:00"
5025
5103
  }
5026
5104
  },
5027
5105
  "FileDTO": {
@@ -5064,6 +5142,18 @@
5064
5142
  "type": "string",
5065
5143
  "format": "date-time"
5066
5144
  }
5145
+ },
5146
+ "example": {
5147
+ "created_at": "2021-01-01T00:00:00",
5148
+ "file_name": "file.txt",
5149
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5150
+ "link": "https://trieve.ai",
5151
+ "metadata": {
5152
+ "key": "value"
5153
+ },
5154
+ "s3_url": "https://trieve.ai",
5155
+ "size": 1000,
5156
+ "updated_at": "2021-01-01T00:00:00"
5067
5157
  }
5068
5158
  },
5069
5159
  "GenerateChunksRequest": {
@@ -5103,6 +5193,52 @@
5103
5193
  "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
5194
  "nullable": true
5105
5195
  }
5196
+ },
5197
+ "example": {
5198
+ "chunk_ids": [
5199
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
5200
+ ],
5201
+ "model": "text-embedding-small",
5202
+ "prev_messages": [
5203
+ {
5204
+ "content": "I am going to provide several pieces of information (docs) for you to use in response to a request or question.",
5205
+ "role": "user"
5206
+ }
5207
+ ],
5208
+ "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:",
5209
+ "stream_response": true
5210
+ }
5211
+ },
5212
+ "GetEventsData": {
5213
+ "type": "object",
5214
+ "properties": {
5215
+ "event_types": {
5216
+ "type": "array",
5217
+ "items": {
5218
+ "type": "string"
5219
+ },
5220
+ "description": "The types of events to get. Any combination of file_uploaded, card_uploaded, card_action_failed, or card_updated. Leave undefined to get all events.",
5221
+ "nullable": true
5222
+ },
5223
+ "page": {
5224
+ "type": "integer",
5225
+ "format": "int64",
5226
+ "description": "The page number to get. Default is 1.",
5227
+ "nullable": true
5228
+ },
5229
+ "page_size": {
5230
+ "type": "integer",
5231
+ "format": "int64",
5232
+ "description": "The number of items per page. Default is 10.",
5233
+ "nullable": true
5234
+ }
5235
+ },
5236
+ "example": {
5237
+ "page": 1,
5238
+ "page_size": 10,
5239
+ "type": [
5240
+ "card_action_failed"
5241
+ ]
5106
5242
  }
5107
5243
  },
5108
5244
  "GetGroupsForChunksData": {
@@ -5260,6 +5396,19 @@
5260
5396
  "type": "string",
5261
5397
  "format": "date-time"
5262
5398
  }
5399
+ },
5400
+ "example": {
5401
+ "completion_tokens": 300,
5402
+ "content": "Hello, world!",
5403
+ "created_at": "2021-01-01T00:00:00",
5404
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5405
+ "deleted": false,
5406
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5407
+ "prompt_tokens": 300,
5408
+ "role": "user",
5409
+ "sort_order": 1,
5410
+ "topic_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5411
+ "updated_at": "2021-01-01T00:00:00"
5263
5412
  }
5264
5413
  },
5265
5414
  "Organization": {
@@ -5290,6 +5439,13 @@
5290
5439
  "type": "string",
5291
5440
  "format": "date-time"
5292
5441
  }
5442
+ },
5443
+ "example": {
5444
+ "created_at": "2021-01-01T00:00:00",
5445
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5446
+ "name": "Trieve",
5447
+ "registerable": true,
5448
+ "updated_at": "2021-01-01T00:00:00"
5293
5449
  }
5294
5450
  },
5295
5451
  "OrganizationUsageCount": {
@@ -5327,6 +5483,14 @@
5327
5483
  "type": "integer",
5328
5484
  "format": "int32"
5329
5485
  }
5486
+ },
5487
+ "example": {
5488
+ "dataset_count": 1,
5489
+ "file_storage": 512,
5490
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5491
+ "message_count": 1000,
5492
+ "org_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
5493
+ "user_count": 5
5330
5494
  }
5331
5495
  },
5332
5496
  "Range": {
@@ -5352,6 +5516,12 @@
5352
5516
  "format": "double",
5353
5517
  "nullable": true
5354
5518
  }
5519
+ },
5520
+ "example": {
5521
+ "gt": 0.0,
5522
+ "gte": 0.0,
5523
+ "lt": 1.0,
5524
+ "lte": 1.0
5355
5525
  }
5356
5526
  },
5357
5527
  "ReccomendGroupChunksRequest": {
@@ -5506,20 +5676,14 @@
5506
5676
  }
5507
5677
  },
5508
5678
  "ReturnQueuedChunk": {
5509
- "type": "object",
5510
- "required": [
5511
- "chunk_metadata",
5512
- "pos_in_queue"
5513
- ],
5514
- "properties": {
5515
- "chunk_metadata": {
5516
- "$ref": "#/components/schemas/ChunkMetadata"
5679
+ "oneOf": [
5680
+ {
5681
+ "$ref": "#/components/schemas/SingleQueuedChunkResponse"
5517
5682
  },
5518
- "pos_in_queue": {
5519
- "type": "integer",
5520
- "format": "int32"
5683
+ {
5684
+ "$ref": "#/components/schemas/BatchQueuedChunkResponse"
5521
5685
  }
5522
- }
5686
+ ]
5523
5687
  },
5524
5688
  "ScoreChunkDTO": {
5525
5689
  "type": "object",
@@ -5538,6 +5702,23 @@
5538
5702
  "type": "number",
5539
5703
  "format": "double"
5540
5704
  }
5705
+ },
5706
+ "example": {
5707
+ "metadata": [
5708
+ {
5709
+ "chunk_html": "<p>Some HTML content</p>",
5710
+ "content": "Some content",
5711
+ "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
5712
+ "link": "https://example.com",
5713
+ "metadata": {
5714
+ "key1": "value1",
5715
+ "key2": "value2"
5716
+ },
5717
+ "time_stamp": "2021-01-01T00:00:00",
5718
+ "weight": 0.5
5719
+ }
5720
+ ],
5721
+ "score": 0.5
5541
5722
  }
5542
5723
  },
5543
5724
  "SearchChunkData": {
@@ -5611,6 +5792,70 @@
5611
5792
  "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
5793
  "nullable": true
5613
5794
  }
5795
+ },
5796
+ "example": {
5797
+ "date_bias": true,
5798
+ "filters": {
5799
+ "must": [
5800
+ {
5801
+ "field": "metadata.key2",
5802
+ "match": [
5803
+ "value3",
5804
+ "value4"
5805
+ ],
5806
+ "range": {
5807
+ "gt": 0.0,
5808
+ "gte": 0.0,
5809
+ "lt": 1.0,
5810
+ "lte": 1.0
5811
+ }
5812
+ }
5813
+ ],
5814
+ "must_not": [
5815
+ {
5816
+ "field": "metadata.key3",
5817
+ "match": [
5818
+ "value5",
5819
+ "value6"
5820
+ ],
5821
+ "range": {
5822
+ "gt": 0.0,
5823
+ "gte": 0.0,
5824
+ "lt": 1.0,
5825
+ "lte": 1.0
5826
+ }
5827
+ }
5828
+ ],
5829
+ "should": [
5830
+ {
5831
+ "field": "metadata.key1",
5832
+ "match": [
5833
+ "value1",
5834
+ "value2"
5835
+ ],
5836
+ "range": {
5837
+ "gt": 0.0,
5838
+ "gte": 0.0,
5839
+ "lt": 1.0,
5840
+ "lte": 1.0
5841
+ }
5842
+ }
5843
+ ]
5844
+ },
5845
+ "get_collisions": true,
5846
+ "highlight_delimiters": [
5847
+ "?",
5848
+ ",",
5849
+ ".",
5850
+ "!"
5851
+ ],
5852
+ "highlight_results": true,
5853
+ "page": 1,
5854
+ "page_size": 10,
5855
+ "query": "Some search query",
5856
+ "score_threshold": 0.5,
5857
+ "search_type": "semantic",
5858
+ "use_weights": true
5614
5859
  }
5615
5860
  },
5616
5861
  "SearchChunkQueryResponseBody": {
@@ -5852,6 +6097,49 @@
5852
6097
  }
5853
6098
  }
5854
6099
  },
6100
+ "SingleQueuedChunkResponse": {
6101
+ "type": "object",
6102
+ "required": [
6103
+ "chunk_metadata",
6104
+ "pos_in_queue"
6105
+ ],
6106
+ "properties": {
6107
+ "chunk_metadata": {
6108
+ "$ref": "#/components/schemas/ChunkMetadata"
6109
+ },
6110
+ "pos_in_queue": {
6111
+ "type": "integer",
6112
+ "format": "int32",
6113
+ "description": "The current position the last access item is in the queue"
6114
+ }
6115
+ },
6116
+ "example": {
6117
+ "chunk_metadata": [
6118
+ {
6119
+ "chunk_vector": [
6120
+ 0.1,
6121
+ 0.2,
6122
+ 0.3
6123
+ ],
6124
+ "content": "Some content",
6125
+ "file_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
6126
+ "link": "https://example.com",
6127
+ "metadata": {
6128
+ "key1": "value1",
6129
+ "key2": "value2"
6130
+ },
6131
+ "tag_set": [
6132
+ "tag1",
6133
+ "tag2"
6134
+ ],
6135
+ "time_stamp": "2021-01-01T00:00:00",
6136
+ "tracking_id": "tracking_id",
6137
+ "weight": 0.5
6138
+ }
6139
+ ],
6140
+ "pos_in_queue": 1
6141
+ }
6142
+ },
5855
6143
  "SlimGroup": {
5856
6144
  "type": "object",
5857
6145
  "required": [
@@ -5875,6 +6163,12 @@
5875
6163
  "of_current_dataset": {
5876
6164
  "type": "boolean"
5877
6165
  }
6166
+ },
6167
+ "example": {
6168
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6169
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6170
+ "name": "Trieve",
6171
+ "of_current_dataset": true
5878
6172
  }
5879
6173
  },
5880
6174
  "SlimUser": {
@@ -5921,6 +6215,33 @@
5921
6215
  "type": "string",
5922
6216
  "nullable": true
5923
6217
  }
6218
+ },
6219
+ "example": {
6220
+ "email": "developers@trieve.ai",
6221
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6222
+ "name": "Trieve",
6223
+ "orgs": [
6224
+ {
6225
+ "created_at": "2021-01-01T00:00:00",
6226
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6227
+ "name": "Trieve",
6228
+ "registerable": true,
6229
+ "updated_at": "2021-01-01T00:00:00"
6230
+ }
6231
+ ],
6232
+ "user_orgs": [
6233
+ {
6234
+ "created_at": "2021-01-01T00:00:00",
6235
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6236
+ "org_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6237
+ "role": 0,
6238
+ "updated_at": "2021-01-01T00:00:00",
6239
+ "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
6240
+ }
6241
+ ],
6242
+ "username": "trieve",
6243
+ "visible_email": true,
6244
+ "website": "https://trieve.ai"
5924
6245
  }
5925
6246
  },
5926
6247
  "StripePlan": {
@@ -5981,47 +6302,19 @@
5981
6302
  "type": "integer",
5982
6303
  "format": "int32"
5983
6304
  }
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
- }
6305
+ },
6306
+ "example": {
6307
+ "amount": 1000,
6308
+ "chunk_count": 1000,
6309
+ "created_at": "2021-01-01T00:00:00",
6310
+ "dataset_count": 1,
6311
+ "file_storage": 512,
6312
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6313
+ "message_count": 1000,
6314
+ "name": "Free",
6315
+ "stripe_id": "plan_123",
6316
+ "updated_at": "2021-01-01T00:00:00",
6317
+ "user_count": 5
6025
6318
  }
6026
6319
  },
6027
6320
  "SuggestedQueriesRequest": {
@@ -6088,6 +6381,15 @@
6088
6381
  "type": "string",
6089
6382
  "format": "uuid"
6090
6383
  }
6384
+ },
6385
+ "example": {
6386
+ "created_at": "2021-01-01T00:00:00",
6387
+ "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6388
+ "deleted": false,
6389
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6390
+ "name": "Trieve",
6391
+ "updated_at": "2021-01-01T00:00:00",
6392
+ "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
6091
6393
  }
6092
6394
  },
6093
6395
  "UpdateChunkByTrackingIdData": {
@@ -6200,6 +6502,20 @@
6200
6502
  "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
6503
  "nullable": true
6202
6504
  }
6505
+ },
6506
+ "example": {
6507
+ "chunk_html": "<p>Some HTML content</p>",
6508
+ "chunk_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
6509
+ "group_ids": [
6510
+ "d290f1ee-6c54-4b01-90e6-d701748f0851"
6511
+ ],
6512
+ "link": "https://example.com",
6513
+ "metadata": {
6514
+ "key1": "value1",
6515
+ "key2": "value2"
6516
+ },
6517
+ "time_stamp": "2021-01-01T00:00:00",
6518
+ "weight": 0.5
6203
6519
  }
6204
6520
  },
6205
6521
  "UpdateChunkGroupData": {
@@ -6252,6 +6568,12 @@
6252
6568
  "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
6569
  "nullable": true
6254
6570
  }
6571
+ },
6572
+ "example": {
6573
+ "client_configuration": {},
6574
+ "dataset_id": "00000000-0000-0000-0000-000000000000",
6575
+ "dataset_name": "My Dataset",
6576
+ "server_configuration": {}
6255
6577
  }
6256
6578
  },
6257
6579
  "UpdateGroupByTrackingIDData": {
@@ -6409,6 +6731,23 @@
6409
6731
  "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
6732
  "nullable": true
6411
6733
  }
6734
+ },
6735
+ "example": {
6736
+ "base64_file": "base64_encoded_file",
6737
+ "create_chunks": true,
6738
+ "description": "This is an example file",
6739
+ "file_mime_type": "application/pdf",
6740
+ "file_name": "example.pdf",
6741
+ "link": "https://example.com",
6742
+ "metadata": {
6743
+ "key1": "value1",
6744
+ "key2": "value2"
6745
+ },
6746
+ "tag_set": [
6747
+ "tag1",
6748
+ "tag2"
6749
+ ],
6750
+ "time_stamp": "2021-01-01T00:00:00Z"
6412
6751
  }
6413
6752
  },
6414
6753
  "UploadFileResult": {
@@ -6457,6 +6796,14 @@
6457
6796
  "type": "string",
6458
6797
  "format": "uuid"
6459
6798
  }
6799
+ },
6800
+ "example": {
6801
+ "created_at": "2021-01-01T00:00:00",
6802
+ "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6803
+ "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6804
+ "role": 2,
6805
+ "updated_at": "2021-01-01T00:00:00",
6806
+ "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
6460
6807
  }
6461
6808
  }
6462
6809
  },
@@ -6522,4 +6869,4 @@
6522
6869
  "description": "Health check endpoint. Used to check if the server is up and running."
6523
6870
  }
6524
6871
  ]
6525
- }
6872
+ }