trieve_ruby_client 0.4.0 → 0.5.7

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 (255) hide show
  1. checksums.yaml +4 -4
  2. data/GENERATE_COMMAND.txt +1 -0
  3. data/README.md +29 -18
  4. data/docs/AddChunkToGroupData.md +1 -1
  5. data/docs/AuthApi.md +1 -1
  6. data/docs/ChunkApi.md +34 -38
  7. data/docs/ChunkGroupApi.md +51 -48
  8. data/docs/DatasetApi.md +9 -9
  9. data/docs/EventsApi.md +1 -1
  10. data/docs/FileApi.md +1 -1
  11. data/docs/GetEventsData.md +1 -1
  12. data/docs/GroupScoreChunkDTO.md +2 -0
  13. data/docs/GroupSlimChunksDTO.md +20 -0
  14. data/docs/HealthApi.md +1 -1
  15. data/docs/InvitationApi.md +1 -1
  16. data/docs/MessageApi.md +1 -1
  17. data/docs/OrganizationApi.md +1 -1
  18. data/docs/Range.md +4 -4
  19. data/docs/RangeCondition.md +49 -0
  20. data/docs/ReccomendGroupChunksRequest.md +3 -1
  21. data/docs/RecommendChunksRequest.md +3 -1
  22. data/docs/RecommendChunksResponseTypes.md +49 -0
  23. data/docs/RecommendGroupChunkResponseTypes.md +49 -0
  24. data/docs/ScoreSlimChunks.md +20 -0
  25. data/docs/SearchChunkData.md +4 -0
  26. data/docs/SearchChunkResponseTypes.md +49 -0
  27. data/docs/SearchGroupSlimChunksResult.md +22 -0
  28. data/docs/SearchOverGroupsData.md +5 -1
  29. data/docs/SearchOverGroupsResponseTypes.md +49 -0
  30. data/docs/SearchOverGroupsSlimChunksResponseBody.md +20 -0
  31. data/docs/SearchSlimChunkQueryResponseBody.md +20 -0
  32. data/docs/SearchWithinGroupData.md +4 -0
  33. data/docs/SearchWithinGroupResponseTypes.md +49 -0
  34. data/docs/SlimChunkMetadata.md +36 -0
  35. data/docs/SlimUser.md +1 -7
  36. data/docs/StripeApi.md +1 -1
  37. data/docs/TopicApi.md +9 -9
  38. data/docs/UpdateChunkData.md +2 -0
  39. data/docs/UpdateUserData.md +1 -7
  40. data/docs/UserApi.md +9 -9
  41. data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
  42. data/lib/trieve_ruby_client/api/chunk_api.rb +34 -38
  43. data/lib/trieve_ruby_client/api/chunk_group_api.rb +56 -59
  44. data/lib/trieve_ruby_client/api/dataset_api.rb +11 -16
  45. data/lib/trieve_ruby_client/api/events_api.rb +1 -1
  46. data/lib/trieve_ruby_client/api/file_api.rb +1 -1
  47. data/lib/trieve_ruby_client/api/health_api.rb +1 -1
  48. data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
  49. data/lib/trieve_ruby_client/api/message_api.rb +1 -1
  50. data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
  51. data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
  52. data/lib/trieve_ruby_client/api/topic_api.rb +11 -16
  53. data/lib/trieve_ruby_client/api/user_api.rb +11 -16
  54. data/lib/trieve_ruby_client/api_client.rb +1 -1
  55. data/lib/trieve_ruby_client/api_error.rb +1 -1
  56. data/lib/trieve_ruby_client/configuration.rb +7 -7
  57. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +2 -2
  58. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  59. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  60. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  61. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  62. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  63. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  64. data/lib/trieve_ruby_client/models/chunk_data.rb +1 -1
  65. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  66. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  67. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  68. data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
  69. data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
  70. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
  71. data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
  72. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  73. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  74. data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
  75. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  76. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  77. data/lib/trieve_ruby_client/models/dataset.rb +1 -1
  78. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  79. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  80. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  81. data/lib/trieve_ruby_client/models/delete_dataset_request.rb +1 -1
  82. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  83. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  84. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  85. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  86. data/lib/trieve_ruby_client/models/event.rb +1 -1
  87. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  88. data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
  89. data/lib/trieve_ruby_client/models/file.rb +1 -1
  90. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  91. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
  92. data/lib/trieve_ruby_client/models/get_events_data.rb +2 -2
  93. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  94. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  95. data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +12 -2
  96. data/lib/trieve_ruby_client/models/group_slim_chunks_dto.rb +239 -0
  97. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  98. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  99. data/lib/trieve_ruby_client/models/message.rb +1 -1
  100. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  101. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  102. data/lib/trieve_ruby_client/models/range.rb +5 -5
  103. data/lib/trieve_ruby_client/models/range_condition.rb +105 -0
  104. data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +17 -6
  105. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +17 -6
  106. data/lib/trieve_ruby_client/models/recommend_chunks_response_types.rb +105 -0
  107. data/lib/trieve_ruby_client/models/recommend_group_chunk_response_types.rb +105 -0
  108. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  109. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  110. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  111. data/lib/trieve_ruby_client/models/score_slim_chunks.rb +239 -0
  112. data/lib/trieve_ruby_client/models/search_chunk_data.rb +24 -2
  113. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  114. data/lib/trieve_ruby_client/models/search_chunk_response_types.rb +105 -0
  115. data/lib/trieve_ruby_client/models/search_group_slim_chunks_result.rb +255 -0
  116. data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
  117. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +27 -5
  118. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
  119. data/lib/trieve_ruby_client/models/search_over_groups_response_types.rb +105 -0
  120. data/lib/trieve_ruby_client/models/search_over_groups_slim_chunks_response_body.rb +239 -0
  121. data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +239 -0
  122. data/lib/trieve_ruby_client/models/search_within_group_data.rb +24 -2
  123. data/lib/trieve_ruby_client/models/search_within_group_response_types.rb +105 -0
  124. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  125. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  126. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  127. data/lib/trieve_ruby_client/models/{stripe_subscription.rb → slim_chunk_metadata.rb} +75 -57
  128. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  129. data/lib/trieve_ruby_client/models/slim_user.rb +5 -41
  130. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  131. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  132. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  133. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  134. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  135. data/lib/trieve_ruby_client/models/update_chunk_data.rb +15 -2
  136. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  137. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  138. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  139. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  140. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  141. data/lib/trieve_ruby_client/models/update_user_data.rb +6 -39
  142. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  143. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  144. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  145. data/lib/trieve_ruby_client/version.rb +2 -2
  146. data/lib/trieve_ruby_client.rb +13 -2
  147. data/openapi-generator.yaml +1 -1
  148. data/openapi.json +692 -335
  149. data/spec/api/auth_api_spec.rb +16 -18
  150. data/spec/api/chunk_api_spec.rb +30 -43
  151. data/spec/api/chunk_group_api_spec.rb +54 -33
  152. data/spec/api/dataset_api_spec.rb +19 -19
  153. data/spec/api/events_api_spec.rb +10 -10
  154. data/spec/api/file_api_spec.rb +15 -15
  155. data/spec/api/health_api_spec.rb +9 -7
  156. data/spec/api/invitation_api_spec.rb +9 -9
  157. data/spec/api/message_api_spec.rb +15 -15
  158. data/spec/api/organization_api_spec.rb +19 -19
  159. data/spec/api/stripe_api_spec.rb +15 -7
  160. data/spec/api/topic_api_spec.rb +15 -15
  161. data/spec/api/user_api_spec.rb +13 -13
  162. data/spec/models/add_chunk_to_group_data_spec.rb +8 -8
  163. data/spec/models/api_key_dto_spec.rb +8 -8
  164. data/spec/models/auth_query_spec.rb +1 -1
  165. data/spec/models/batch_queued_chunk_response_spec.rb +1 -1
  166. data/spec/models/bookmark_data_spec.rb +8 -8
  167. data/spec/models/bookmark_group_result_spec.rb +8 -8
  168. data/spec/models/chat_message_proxy_spec.rb +8 -8
  169. data/spec/models/chunk_data_spec.rb +1 -1
  170. data/spec/models/chunk_filter_spec.rb +8 -8
  171. data/spec/models/chunk_group_and_file_spec.rb +8 -8
  172. data/spec/models/chunk_group_spec.rb +8 -8
  173. data/spec/models/chunk_metadata_spec.rb +8 -8
  174. data/spec/models/chunk_metadata_with_file_data_spec.rb +8 -8
  175. data/spec/models/client_dataset_configuration_spec.rb +8 -8
  176. data/spec/models/create_chunk_data_spec.rb +11 -87
  177. data/spec/models/create_chunk_group_data_spec.rb +8 -8
  178. data/spec/models/create_dataset_request_spec.rb +8 -8
  179. data/spec/models/create_message_data_spec.rb +8 -8
  180. data/spec/models/create_organization_data_spec.rb +8 -8
  181. data/spec/models/create_topic_data_spec.rb +8 -8
  182. data/spec/models/dataset_and_usage_spec.rb +8 -8
  183. data/spec/models/dataset_dto_spec.rb +8 -8
  184. data/spec/models/dataset_spec.rb +8 -8
  185. data/spec/models/dataset_usage_count_spec.rb +8 -8
  186. data/spec/models/delete_dataset_request_spec.rb +8 -8
  187. data/spec/models/delete_topic_data_spec.rb +8 -8
  188. data/spec/models/delete_user_api_key_request_spec.rb +8 -8
  189. data/spec/models/edit_message_data_spec.rb +8 -8
  190. data/spec/models/error_response_body_spec.rb +8 -8
  191. data/spec/models/event_return_spec.rb +8 -8
  192. data/spec/models/event_spec.rb +8 -8
  193. data/spec/models/field_condition_spec.rb +8 -8
  194. data/spec/models/file_dto_spec.rb +8 -8
  195. data/spec/models/file_spec.rb +8 -8
  196. data/spec/models/generate_chunks_request_spec.rb +8 -8
  197. data/spec/models/get_events_data_spec.rb +1 -1
  198. data/spec/models/get_groups_for_chunks_data_spec.rb +8 -8
  199. data/spec/models/group_data_spec.rb +8 -8
  200. data/spec/models/group_score_chunk_dto_spec.rb +8 -8
  201. data/spec/models/group_slim_chunks_dto_spec.rb +42 -0
  202. data/spec/models/invitation_data_spec.rb +8 -8
  203. data/spec/models/match_condition_spec.rb +6 -6
  204. data/spec/models/message_spec.rb +8 -8
  205. data/spec/models/organization_spec.rb +8 -8
  206. data/spec/models/organization_usage_count_spec.rb +8 -8
  207. data/spec/models/range_condition_spec.rb +32 -0
  208. data/spec/models/range_spec.rb +8 -8
  209. data/spec/models/reccomend_group_chunks_request_spec.rb +8 -8
  210. data/spec/models/recommend_chunks_request_spec.rb +8 -8
  211. data/spec/models/recommend_chunks_response_types_spec.rb +32 -0
  212. data/spec/models/recommend_group_chunk_response_types_spec.rb +32 -0
  213. data/spec/models/regenerate_message_data_spec.rb +8 -8
  214. data/spec/models/return_queued_chunk_spec.rb +11 -21
  215. data/spec/models/score_chunk_dto_spec.rb +8 -8
  216. data/spec/models/score_slim_chunks_spec.rb +42 -0
  217. data/spec/models/search_chunk_data_spec.rb +8 -8
  218. data/spec/models/search_chunk_query_response_body_spec.rb +8 -8
  219. data/spec/models/search_chunk_response_types_spec.rb +32 -0
  220. data/spec/models/search_group_slim_chunks_result_spec.rb +48 -0
  221. data/spec/models/search_groups_result_spec.rb +8 -8
  222. data/spec/models/search_over_groups_data_spec.rb +8 -8
  223. data/spec/models/search_over_groups_response_body_spec.rb +8 -8
  224. data/spec/models/search_over_groups_response_types_spec.rb +32 -0
  225. data/spec/models/search_over_groups_slim_chunks_response_body_spec.rb +42 -0
  226. data/spec/models/search_slim_chunk_query_response_body_spec.rb +42 -0
  227. data/spec/models/search_within_group_data_spec.rb +8 -8
  228. data/spec/models/search_within_group_response_types_spec.rb +32 -0
  229. data/spec/models/set_user_api_key_request_spec.rb +8 -8
  230. data/spec/models/set_user_api_key_response_spec.rb +8 -8
  231. data/spec/models/single_queued_chunk_response_spec.rb +1 -1
  232. data/spec/models/{stripe_subscription_spec.rb → slim_chunk_metadata_spec.rb} +33 -15
  233. data/spec/models/slim_group_spec.rb +8 -8
  234. data/spec/models/slim_user_spec.rb +8 -8
  235. data/spec/models/stripe_plan_spec.rb +8 -8
  236. data/spec/models/suggested_queries_request_spec.rb +8 -8
  237. data/spec/models/suggested_queries_response_spec.rb +8 -8
  238. data/spec/models/topic_spec.rb +8 -8
  239. data/spec/models/update_chunk_by_tracking_id_data_spec.rb +20 -8
  240. data/spec/models/update_chunk_data_spec.rb +20 -8
  241. data/spec/models/update_chunk_group_data_spec.rb +14 -8
  242. data/spec/models/update_dataset_request_spec.rb +8 -8
  243. data/spec/models/update_group_by_tracking_id_data_spec.rb +8 -8
  244. data/spec/models/update_organization_data_spec.rb +8 -8
  245. data/spec/models/update_topic_data_spec.rb +8 -8
  246. data/spec/models/update_user_data_spec.rb +8 -8
  247. data/spec/models/upload_file_data_spec.rb +8 -8
  248. data/spec/models/upload_file_result_spec.rb +8 -8
  249. data/spec/models/user_organization_spec.rb +8 -8
  250. data/spec/spec_helper.rb +1 -1
  251. data/trieve_ruby_client-0.5.0.gem +0 -0
  252. data/trieve_ruby_client.gemspec +1 -1
  253. metadata +52 -7
  254. data/docs/StripeSubscription.md +0 -30
  255. data/trieve_ruby_client-0.3.5.gem +0 -0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5
5
 
6
- The version of the OpenAPI document: 0.4.0
6
+ The version of the OpenAPI document: 0.5.7
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -19,8 +19,8 @@ module TrieveRubyClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create Chunk
23
- # Create Chunk Create 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.
22
+ # Create or Upsert Chunk or Chunks
23
+ # Create or Upsert Chunk or Chunks Create 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.
24
24
  # @param tr_dataset [String] The dataset id to use for the request
25
25
  # @param create_chunk_data [CreateChunkData] JSON request payload to create a new chunk (chunk)
26
26
  # @param [Hash] opts the optional parameters
@@ -30,8 +30,8 @@ module TrieveRubyClient
30
30
  data
31
31
  end
32
32
 
33
- # Create Chunk
34
- # Create Chunk Create 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.
33
+ # Create or Upsert Chunk or Chunks
34
+ # Create or Upsert Chunk or Chunks Create 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.
35
35
  # @param tr_dataset [String] The dataset id to use for the request
36
36
  # @param create_chunk_data [CreateChunkData] JSON request payload to create a new chunk (chunk)
37
37
  # @param [Hash] opts the optional parameters
@@ -172,23 +172,21 @@ module TrieveRubyClient
172
172
  # Delete Chunk
173
173
  # Delete Chunk Delete 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.
174
174
  # @param tr_dataset [String] The dataset id to use for the request
175
- # @param tracking_or_chunk [String] The type of id you are using to search for the chunk. This can be either 'chunk' or 'tracking_id'
176
- # @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
175
+ # @param chunk_id [String] Id of the chunk you want to fetch.
177
176
  # @param [Hash] opts the optional parameters
178
177
  # @return [nil]
179
- def delete_chunk(tr_dataset, tracking_or_chunk, chunk_id, opts = {})
180
- delete_chunk_with_http_info(tr_dataset, tracking_or_chunk, chunk_id, opts)
178
+ def delete_chunk(tr_dataset, chunk_id, opts = {})
179
+ delete_chunk_with_http_info(tr_dataset, chunk_id, opts)
181
180
  nil
182
181
  end
183
182
 
184
183
  # Delete Chunk
185
184
  # Delete Chunk Delete 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.
186
185
  # @param tr_dataset [String] The dataset id to use for the request
187
- # @param tracking_or_chunk [String] The type of id you are using to search for the chunk. This can be either 'chunk' or 'tracking_id'
188
- # @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
186
+ # @param chunk_id [String] Id of the chunk you want to fetch.
189
187
  # @param [Hash] opts the optional parameters
190
188
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
191
- def delete_chunk_with_http_info(tr_dataset, tracking_or_chunk, chunk_id, opts = {})
189
+ def delete_chunk_with_http_info(tr_dataset, chunk_id, opts = {})
192
190
  if @api_client.config.debugging
193
191
  @api_client.config.logger.debug 'Calling API: ChunkApi.delete_chunk ...'
194
192
  end
@@ -196,12 +194,12 @@ module TrieveRubyClient
196
194
  if @api_client.config.client_side_validation && tr_dataset.nil?
197
195
  fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.delete_chunk"
198
196
  end
199
- # verify the required parameter 'tracking_or_chunk' is set
200
- if @api_client.config.client_side_validation && tracking_or_chunk.nil?
201
- fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkApi.delete_chunk"
197
+ # verify the required parameter 'chunk_id' is set
198
+ if @api_client.config.client_side_validation && chunk_id.nil?
199
+ fail ArgumentError, "Missing the required parameter 'chunk_id' when calling ChunkApi.delete_chunk"
202
200
  end
203
201
  # resource path
204
- local_var_path = '/api/chunk/{tracking_or_chunk}/{chunk_id}'.sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s)).sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s))
202
+ local_var_path = '/api/chunk/{chunk_id}'.sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s))
205
203
 
206
204
  # query parameters
207
205
  query_params = opts[:query_params] || {}
@@ -311,8 +309,8 @@ module TrieveRubyClient
311
309
  return data, status_code, headers
312
310
  end
313
311
 
314
- # RAG on User Defined Chunks
315
- # RAG on User Defined Chunks This 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.
312
+ # RAG on Specified Chunks
313
+ # RAG on Specified Chunks This 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.
316
314
  # @param tr_dataset [String] The dataset id to use for the request
317
315
  # @param generate_chunks_request [GenerateChunksRequest] JSON request payload to perform RAG on some chunks (chunks)
318
316
  # @param [Hash] opts the optional parameters
@@ -322,8 +320,8 @@ module TrieveRubyClient
322
320
  data
323
321
  end
324
322
 
325
- # RAG on User Defined Chunks
326
- # RAG on User Defined Chunks This 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 \&quot;search before generate\&quot; page at docs.trieve.ai.
323
+ # RAG on Specified Chunks
324
+ # RAG on Specified Chunks This 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 \&quot;search before generate\&quot; page at docs.trieve.ai.
327
325
  # @param tr_dataset [String] The dataset id to use for the request
328
326
  # @param generate_chunks_request [GenerateChunksRequest] JSON request payload to perform RAG on some chunks (chunks)
329
327
  # @param [Hash] opts the optional parameters
@@ -389,23 +387,21 @@ module TrieveRubyClient
389
387
  # Get Chunk By Id
390
388
  # Get Chunk By Id Get a singular chunk by id.
391
389
  # @param tr_dataset [String] The dataset id to use for the request
392
- # @param tracking_or_chunk [String] The type of id you are using to search for the chunk. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
393
- # @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
390
+ # @param chunk_id [String] Id of the chunk you want to fetch.
394
391
  # @param [Hash] opts the optional parameters
395
392
  # @return [ChunkMetadata]
396
- def get_chunk_by_id(tr_dataset, tracking_or_chunk, chunk_id, opts = {})
397
- data, _status_code, _headers = get_chunk_by_id_with_http_info(tr_dataset, tracking_or_chunk, chunk_id, opts)
393
+ def get_chunk_by_id(tr_dataset, chunk_id, opts = {})
394
+ data, _status_code, _headers = get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts)
398
395
  data
399
396
  end
400
397
 
401
398
  # Get Chunk By Id
402
399
  # Get Chunk By Id Get a singular chunk by id.
403
400
  # @param tr_dataset [String] The dataset id to use for the request
404
- # @param tracking_or_chunk [String] The type of id you are using to search for the chunk. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
405
- # @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
401
+ # @param chunk_id [String] Id of the chunk you want to fetch.
406
402
  # @param [Hash] opts the optional parameters
407
403
  # @return [Array<(ChunkMetadata, Integer, Hash)>] ChunkMetadata data, response status code and response headers
408
- def get_chunk_by_id_with_http_info(tr_dataset, tracking_or_chunk, chunk_id, opts = {})
404
+ def get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts = {})
409
405
  if @api_client.config.debugging
410
406
  @api_client.config.logger.debug 'Calling API: ChunkApi.get_chunk_by_id ...'
411
407
  end
@@ -413,12 +409,12 @@ module TrieveRubyClient
413
409
  if @api_client.config.client_side_validation && tr_dataset.nil?
414
410
  fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.get_chunk_by_id"
415
411
  end
416
- # verify the required parameter 'tracking_or_chunk' is set
417
- if @api_client.config.client_side_validation && tracking_or_chunk.nil?
418
- fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkApi.get_chunk_by_id"
412
+ # verify the required parameter 'chunk_id' is set
413
+ if @api_client.config.client_side_validation && chunk_id.nil?
414
+ fail ArgumentError, "Missing the required parameter 'chunk_id' when calling ChunkApi.get_chunk_by_id"
419
415
  end
420
416
  # resource path
421
- local_var_path = '/api/chunk/{tracking_or_chunk}/{chunk_id}'.sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s)).sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s))
417
+ local_var_path = '/api/chunk/{chunk_id}'.sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s))
422
418
 
423
419
  # query parameters
424
420
  query_params = opts[:query_params] || {}
@@ -533,7 +529,7 @@ module TrieveRubyClient
533
529
  # @param tr_dataset [String] The dataset id to use for the request
534
530
  # @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
535
531
  # @param [Hash] opts the optional parameters
536
- # @return [Array<ChunkMetadataWithFileData>]
532
+ # @return [RecommendChunksResponseTypes]
537
533
  def get_recommended_chunks(tr_dataset, recommend_chunks_request, opts = {})
538
534
  data, _status_code, _headers = get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts)
539
535
  data
@@ -544,7 +540,7 @@ module TrieveRubyClient
544
540
  # @param tr_dataset [String] The dataset id to use for the request
545
541
  # @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
546
542
  # @param [Hash] opts the optional parameters
547
- # @return [Array<(Array<ChunkMetadataWithFileData>, Integer, Hash)>] Array<ChunkMetadataWithFileData> data, response status code and response headers
543
+ # @return [Array<(RecommendChunksResponseTypes, Integer, Hash)>] RecommendChunksResponseTypes data, response status code and response headers
548
544
  def get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts = {})
549
545
  if @api_client.config.debugging
550
546
  @api_client.config.logger.debug 'Calling API: ChunkApi.get_recommended_chunks ...'
@@ -581,7 +577,7 @@ module TrieveRubyClient
581
577
  post_body = opts[:debug_body] || @api_client.object_to_http_body(recommend_chunks_request)
582
578
 
583
579
  # return_type
584
- return_type = opts[:debug_return_type] || 'Array<ChunkMetadataWithFileData>'
580
+ return_type = opts[:debug_return_type] || 'RecommendChunksResponseTypes'
585
581
 
586
582
  # auth_names
587
583
  auth_names = opts[:debug_auth_names] || ['ApiKey']
@@ -608,7 +604,7 @@ module TrieveRubyClient
608
604
  # @param tr_dataset [String] The dataset id to use for the request
609
605
  # @param search_chunk_data [SearchChunkData] JSON request payload to semantically search for chunks (chunks)
610
606
  # @param [Hash] opts the optional parameters
611
- # @return [SearchChunkQueryResponseBody]
607
+ # @return [SearchChunkResponseTypes]
612
608
  def search_chunk(tr_dataset, search_chunk_data, opts = {})
613
609
  data, _status_code, _headers = search_chunk_with_http_info(tr_dataset, search_chunk_data, opts)
614
610
  data
@@ -619,7 +615,7 @@ module TrieveRubyClient
619
615
  # @param tr_dataset [String] The dataset id to use for the request
620
616
  # @param search_chunk_data [SearchChunkData] JSON request payload to semantically search for chunks (chunks)
621
617
  # @param [Hash] opts the optional parameters
622
- # @return [Array<(SearchChunkQueryResponseBody, Integer, Hash)>] SearchChunkQueryResponseBody data, response status code and response headers
618
+ # @return [Array<(SearchChunkResponseTypes, Integer, Hash)>] SearchChunkResponseTypes data, response status code and response headers
623
619
  def search_chunk_with_http_info(tr_dataset, search_chunk_data, opts = {})
624
620
  if @api_client.config.debugging
625
621
  @api_client.config.logger.debug 'Calling API: ChunkApi.search_chunk ...'
@@ -656,7 +652,7 @@ module TrieveRubyClient
656
652
  post_body = opts[:debug_body] || @api_client.object_to_http_body(search_chunk_data)
657
653
 
658
654
  # return_type
659
- return_type = opts[:debug_return_type] || 'SearchChunkQueryResponseBody'
655
+ return_type = opts[:debug_return_type] || 'SearchChunkResponseTypes'
660
656
 
661
657
  # auth_names
662
658
  auth_names = opts[:debug_auth_names] || ['ApiKey']
@@ -708,7 +704,7 @@ module TrieveRubyClient
708
704
  fail ArgumentError, "Missing the required parameter 'update_chunk_data' when calling ChunkApi.update_chunk"
709
705
  end
710
706
  # resource path
711
- local_var_path = '/api/chunk/update'
707
+ local_var_path = '/api/chunk'
712
708
 
713
709
  # query parameters
714
710
  query_params = opts[:query_params] || {}
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5
5
 
6
- The version of the OpenAPI document: 0.4.0
6
+ The version of the OpenAPI document: 0.5.7
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -20,7 +20,7 @@ module TrieveRubyClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Add Chunk to Group
23
- # Add Chunk to Group Route to add a chunk to a group
23
+ # Add Chunk to Group Route to add a chunk to a group.
24
24
  # @param tr_dataset [String] The dataset id to use for the request
25
25
  # @param group_id [String] Id of the group to add the chunk to as a bookmark
26
26
  # @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
@@ -32,7 +32,7 @@ module TrieveRubyClient
32
32
  end
33
33
 
34
34
  # Add Chunk to Group
35
- # Add Chunk to Group Route to add a chunk to a group
35
+ # Add Chunk to Group Route to add a chunk to a group.
36
36
  # @param tr_dataset [String] The dataset id to use for the request
37
37
  # @param group_id [String] Id of the group to add the chunk to as a bookmark
38
38
  # @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
@@ -101,7 +101,7 @@ module TrieveRubyClient
101
101
  end
102
102
 
103
103
  # Add Chunk to Group by Tracking ID
104
- # Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id. Think of a bookmark as a chunk which is a member of a group.
104
+ # Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
105
105
  # @param tr_dataset [String] The dataset id to use for the request
106
106
  # @param tracking_id [String] Id of the group to add the chunk to as a bookmark
107
107
  # @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
@@ -113,7 +113,7 @@ module TrieveRubyClient
113
113
  end
114
114
 
115
115
  # Add Chunk to Group by Tracking ID
116
- # Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id. Think of a bookmark as a chunk which is a member of a group.
116
+ # Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
117
117
  # @param tr_dataset [String] The dataset id to use for the request
118
118
  # @param tracking_id [String] Id of the group to add the chunk to as a bookmark
119
119
  # @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
@@ -182,7 +182,7 @@ module TrieveRubyClient
182
182
  end
183
183
 
184
184
  # Create Chunk Group
185
- # Create Chunk Group Create a new chunk_group.
185
+ # Create Chunk Group Create 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.
186
186
  # @param tr_dataset [String] The dataset id to use for the request
187
187
  # @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
188
188
  # @param [Hash] opts the optional parameters
@@ -193,7 +193,7 @@ module TrieveRubyClient
193
193
  end
194
194
 
195
195
  # Create Chunk Group
196
- # Create Chunk Group Create a new chunk_group.
196
+ # Create Chunk Group Create 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.
197
197
  # @param tr_dataset [String] The dataset id to use for the request
198
198
  # @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
199
199
  # @param [Hash] opts the optional parameters
@@ -259,25 +259,23 @@ module TrieveRubyClient
259
259
  # Delete Group
260
260
  # Delete Group This 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.
261
261
  # @param tr_dataset [String] The dataset id to use for the request
262
- # @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
263
- # @param group_id [String] 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.
262
+ # @param group_id [String] Id of the group you want to fetch.
264
263
  # @param delete_chunks [Boolean] Delete the chunks within the group
265
264
  # @param [Hash] opts the optional parameters
266
265
  # @return [nil]
267
- def delete_chunk_group(tr_dataset, tracking_or_chunk, group_id, delete_chunks, opts = {})
268
- delete_chunk_group_with_http_info(tr_dataset, tracking_or_chunk, group_id, delete_chunks, opts)
266
+ def delete_chunk_group(tr_dataset, group_id, delete_chunks, opts = {})
267
+ delete_chunk_group_with_http_info(tr_dataset, group_id, delete_chunks, opts)
269
268
  nil
270
269
  end
271
270
 
272
271
  # Delete Group
273
272
  # Delete Group This 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.
274
273
  # @param tr_dataset [String] The dataset id to use for the request
275
- # @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
276
- # @param group_id [String] 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.
274
+ # @param group_id [String] Id of the group you want to fetch.
277
275
  # @param delete_chunks [Boolean] Delete the chunks within the group
278
276
  # @param [Hash] opts the optional parameters
279
277
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
280
- def delete_chunk_group_with_http_info(tr_dataset, tracking_or_chunk, group_id, delete_chunks, opts = {})
278
+ def delete_chunk_group_with_http_info(tr_dataset, group_id, delete_chunks, opts = {})
281
279
  if @api_client.config.debugging
282
280
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.delete_chunk_group ...'
283
281
  end
@@ -285,16 +283,16 @@ module TrieveRubyClient
285
283
  if @api_client.config.client_side_validation && tr_dataset.nil?
286
284
  fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.delete_chunk_group"
287
285
  end
288
- # verify the required parameter 'tracking_or_chunk' is set
289
- if @api_client.config.client_side_validation && tracking_or_chunk.nil?
290
- fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkGroupApi.delete_chunk_group"
286
+ # verify the required parameter 'group_id' is set
287
+ if @api_client.config.client_side_validation && group_id.nil?
288
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.delete_chunk_group"
291
289
  end
292
290
  # verify the required parameter 'delete_chunks' is set
293
291
  if @api_client.config.client_side_validation && delete_chunks.nil?
294
292
  fail ArgumentError, "Missing the required parameter 'delete_chunks' when calling ChunkGroupApi.delete_chunk_group"
295
293
  end
296
294
  # resource path
297
- local_var_path = '/api/chunk_group/{tracking_or_chunk}/{group_id}'.sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s)).sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
295
+ local_var_path = '/api/chunk_group/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
298
296
 
299
297
  # query parameters
300
298
  query_params = opts[:query_params] || {}
@@ -408,23 +406,21 @@ module TrieveRubyClient
408
406
  # Get Group
409
407
  # Get Group Fetch the group with the given id. get_group
410
408
  # @param tr_dataset [String] The dataset id to use for the request
411
- # @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
412
- # @param group_id [String] Id of the group you want to fetch. This can be either the group_id or the tracking_id.
409
+ # @param group_id [String] Id of the group you want to fetch.
413
410
  # @param [Hash] opts the optional parameters
414
411
  # @return [ChunkGroup]
415
- def get_chunk_group(tr_dataset, tracking_or_chunk, group_id, opts = {})
416
- data, _status_code, _headers = get_chunk_group_with_http_info(tr_dataset, tracking_or_chunk, group_id, opts)
412
+ def get_chunk_group(tr_dataset, group_id, opts = {})
413
+ data, _status_code, _headers = get_chunk_group_with_http_info(tr_dataset, group_id, opts)
417
414
  data
418
415
  end
419
416
 
420
417
  # Get Group
421
418
  # Get Group Fetch the group with the given id. get_group
422
419
  # @param tr_dataset [String] The dataset id to use for the request
423
- # @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
424
- # @param group_id [String] Id of the group you want to fetch. This can be either the group_id or the tracking_id.
420
+ # @param group_id [String] Id of the group you want to fetch.
425
421
  # @param [Hash] opts the optional parameters
426
422
  # @return [Array<(ChunkGroup, Integer, Hash)>] ChunkGroup data, response status code and response headers
427
- def get_chunk_group_with_http_info(tr_dataset, tracking_or_chunk, group_id, opts = {})
423
+ def get_chunk_group_with_http_info(tr_dataset, group_id, opts = {})
428
424
  if @api_client.config.debugging
429
425
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_chunk_group ...'
430
426
  end
@@ -432,12 +428,12 @@ module TrieveRubyClient
432
428
  if @api_client.config.client_side_validation && tr_dataset.nil?
433
429
  fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_chunk_group"
434
430
  end
435
- # verify the required parameter 'tracking_or_chunk' is set
436
- if @api_client.config.client_side_validation && tracking_or_chunk.nil?
437
- fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkGroupApi.get_chunk_group"
431
+ # verify the required parameter 'group_id' is set
432
+ if @api_client.config.client_side_validation && group_id.nil?
433
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.get_chunk_group"
438
434
  end
439
435
  # resource path
440
- local_var_path = '/api/chunk_group/{tracking_or_chunk}/{group_id}'.sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s)).sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
436
+ local_var_path = '/api/chunk_group/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
441
437
 
442
438
  # query parameters
443
439
  query_params = opts[:query_params] || {}
@@ -480,25 +476,23 @@ module TrieveRubyClient
480
476
  # Get Chunks in Group
481
477
  # Get Chunks in Group Route 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.
482
478
  # @param tr_dataset [String] The dataset id to use for the request
483
- # @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
484
- # @param group_id [String] 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.
479
+ # @param group_id [String] Id of the group you want to fetch.
485
480
  # @param page [Integer] The page of chunks to get from the group
486
481
  # @param [Hash] opts the optional parameters
487
482
  # @return [BookmarkData]
488
- def get_chunks_in_group(tr_dataset, tracking_or_chunk, group_id, page, opts = {})
489
- data, _status_code, _headers = get_chunks_in_group_with_http_info(tr_dataset, tracking_or_chunk, group_id, page, opts)
483
+ def get_chunks_in_group(tr_dataset, group_id, page, opts = {})
484
+ data, _status_code, _headers = get_chunks_in_group_with_http_info(tr_dataset, group_id, page, opts)
490
485
  data
491
486
  end
492
487
 
493
488
  # Get Chunks in Group
494
489
  # Get Chunks in Group Route 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.
495
490
  # @param tr_dataset [String] The dataset id to use for the request
496
- # @param tracking_or_chunk [String] The type of id you are using to search for the group. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
497
- # @param group_id [String] 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.
491
+ # @param group_id [String] Id of the group you want to fetch.
498
492
  # @param page [Integer] The page of chunks to get from the group
499
493
  # @param [Hash] opts the optional parameters
500
494
  # @return [Array<(BookmarkData, Integer, Hash)>] BookmarkData data, response status code and response headers
501
- def get_chunks_in_group_with_http_info(tr_dataset, tracking_or_chunk, group_id, page, opts = {})
495
+ def get_chunks_in_group_with_http_info(tr_dataset, group_id, page, opts = {})
502
496
  if @api_client.config.debugging
503
497
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_chunks_in_group ...'
504
498
  end
@@ -506,20 +500,16 @@ module TrieveRubyClient
506
500
  if @api_client.config.client_side_validation && tr_dataset.nil?
507
501
  fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_chunks_in_group"
508
502
  end
509
- # verify the required parameter 'tracking_or_chunk' is set
510
- if @api_client.config.client_side_validation && tracking_or_chunk.nil?
511
- fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkGroupApi.get_chunks_in_group"
512
- end
513
- # verify the required parameter 'page' is set
514
- if @api_client.config.client_side_validation && page.nil?
515
- fail ArgumentError, "Missing the required parameter 'page' when calling ChunkGroupApi.get_chunks_in_group"
503
+ # verify the required parameter 'group_id' is set
504
+ if @api_client.config.client_side_validation && group_id.nil?
505
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.get_chunks_in_group"
516
506
  end
517
507
  if @api_client.config.client_side_validation && page < 0
518
508
  fail ArgumentError, 'invalid value for "page" when calling ChunkGroupApi.get_chunks_in_group, must be greater than or equal to 0.'
519
509
  end
520
510
 
521
511
  # resource path
522
- local_var_path = '/api/chunk_group/{tracking_or_chunk}/{group_id}/{page}'.sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s)).sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'page' + '}', CGI.escape(page.to_s))
512
+ local_var_path = '/api/chunk_group/{group_id}/{page}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'page' + '}', CGI.escape(page.to_s))
523
513
 
524
514
  # query parameters
525
515
  query_params = opts[:query_params] || {}
@@ -789,7 +779,7 @@ module TrieveRubyClient
789
779
  # @param tr_dataset [String] The dataset id to use for the request
790
780
  # @param reccomend_group_chunks_request [ReccomendGroupChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
791
781
  # @param [Hash] opts the optional parameters
792
- # @return [Array<GroupScoreChunkDTO>]
782
+ # @return [RecommendGroupChunkResponseTypes]
793
783
  def get_recommended_groups(tr_dataset, reccomend_group_chunks_request, opts = {})
794
784
  data, _status_code, _headers = get_recommended_groups_with_http_info(tr_dataset, reccomend_group_chunks_request, opts)
795
785
  data
@@ -800,7 +790,7 @@ module TrieveRubyClient
800
790
  # @param tr_dataset [String] The dataset id to use for the request
801
791
  # @param reccomend_group_chunks_request [ReccomendGroupChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
802
792
  # @param [Hash] opts the optional parameters
803
- # @return [Array<(Array<GroupScoreChunkDTO>, Integer, Hash)>] Array<GroupScoreChunkDTO> data, response status code and response headers
793
+ # @return [Array<(RecommendGroupChunkResponseTypes, Integer, Hash)>] RecommendGroupChunkResponseTypes data, response status code and response headers
804
794
  def get_recommended_groups_with_http_info(tr_dataset, reccomend_group_chunks_request, opts = {})
805
795
  if @api_client.config.debugging
806
796
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_recommended_groups ...'
@@ -837,7 +827,7 @@ module TrieveRubyClient
837
827
  post_body = opts[:debug_body] || @api_client.object_to_http_body(reccomend_group_chunks_request)
838
828
 
839
829
  # return_type
840
- return_type = opts[:debug_return_type] || 'Array<GroupScoreChunkDTO>'
830
+ return_type = opts[:debug_return_type] || 'RecommendGroupChunkResponseTypes'
841
831
 
842
832
  # auth_names
843
833
  auth_names = opts[:debug_auth_names] || ['ApiKey']
@@ -1018,23 +1008,29 @@ module TrieveRubyClient
1018
1008
 
1019
1009
  # Search Over Groups
1020
1010
  # Search Over Groups This 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.
1011
+ # @param tr_dataset [String] The dataset id to use for the request
1021
1012
  # @param search_over_groups_data [SearchOverGroupsData] JSON request payload to semantically search over groups
1022
1013
  # @param [Hash] opts the optional parameters
1023
- # @return [SearchOverGroupsResponseBody]
1024
- def search_over_groups(search_over_groups_data, opts = {})
1025
- data, _status_code, _headers = search_over_groups_with_http_info(search_over_groups_data, opts)
1014
+ # @return [SearchOverGroupsResponseTypes]
1015
+ def search_over_groups(tr_dataset, search_over_groups_data, opts = {})
1016
+ data, _status_code, _headers = search_over_groups_with_http_info(tr_dataset, search_over_groups_data, opts)
1026
1017
  data
1027
1018
  end
1028
1019
 
1029
1020
  # Search Over Groups
1030
1021
  # Search Over Groups This 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.
1022
+ # @param tr_dataset [String] The dataset id to use for the request
1031
1023
  # @param search_over_groups_data [SearchOverGroupsData] JSON request payload to semantically search over groups
1032
1024
  # @param [Hash] opts the optional parameters
1033
- # @return [Array<(SearchOverGroupsResponseBody, Integer, Hash)>] SearchOverGroupsResponseBody data, response status code and response headers
1034
- def search_over_groups_with_http_info(search_over_groups_data, opts = {})
1025
+ # @return [Array<(SearchOverGroupsResponseTypes, Integer, Hash)>] SearchOverGroupsResponseTypes data, response status code and response headers
1026
+ def search_over_groups_with_http_info(tr_dataset, search_over_groups_data, opts = {})
1035
1027
  if @api_client.config.debugging
1036
1028
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.search_over_groups ...'
1037
1029
  end
1030
+ # verify the required parameter 'tr_dataset' is set
1031
+ if @api_client.config.client_side_validation && tr_dataset.nil?
1032
+ fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.search_over_groups"
1033
+ end
1038
1034
  # verify the required parameter 'search_over_groups_data' is set
1039
1035
  if @api_client.config.client_side_validation && search_over_groups_data.nil?
1040
1036
  fail ArgumentError, "Missing the required parameter 'search_over_groups_data' when calling ChunkGroupApi.search_over_groups"
@@ -1054,6 +1050,7 @@ module TrieveRubyClient
1054
1050
  if !content_type.nil?
1055
1051
  header_params['Content-Type'] = content_type
1056
1052
  end
1053
+ header_params[:'TR-Dataset'] = tr_dataset
1057
1054
 
1058
1055
  # form parameters
1059
1056
  form_params = opts[:form_params] || {}
@@ -1062,10 +1059,10 @@ module TrieveRubyClient
1062
1059
  post_body = opts[:debug_body] || @api_client.object_to_http_body(search_over_groups_data)
1063
1060
 
1064
1061
  # return_type
1065
- return_type = opts[:debug_return_type] || 'SearchOverGroupsResponseBody'
1062
+ return_type = opts[:debug_return_type] || 'SearchOverGroupsResponseTypes'
1066
1063
 
1067
1064
  # auth_names
1068
- auth_names = opts[:debug_auth_names] || []
1065
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
1069
1066
 
1070
1067
  new_options = opts.merge(
1071
1068
  :operation => :"ChunkGroupApi.search_over_groups",
@@ -1089,7 +1086,7 @@ module TrieveRubyClient
1089
1086
  # @param tr_dataset [String] The dataset id to use for the request
1090
1087
  # @param search_within_group_data [SearchWithinGroupData] JSON request payload to semantically search a group
1091
1088
  # @param [Hash] opts the optional parameters
1092
- # @return [SearchGroupsResult]
1089
+ # @return [SearchWithinGroupResponseTypes]
1093
1090
  def search_within_group(tr_dataset, search_within_group_data, opts = {})
1094
1091
  data, _status_code, _headers = search_within_group_with_http_info(tr_dataset, search_within_group_data, opts)
1095
1092
  data
@@ -1100,7 +1097,7 @@ module TrieveRubyClient
1100
1097
  # @param tr_dataset [String] The dataset id to use for the request
1101
1098
  # @param search_within_group_data [SearchWithinGroupData] JSON request payload to semantically search a group
1102
1099
  # @param [Hash] opts the optional parameters
1103
- # @return [Array<(SearchGroupsResult, Integer, Hash)>] SearchGroupsResult data, response status code and response headers
1100
+ # @return [Array<(SearchWithinGroupResponseTypes, Integer, Hash)>] SearchWithinGroupResponseTypes data, response status code and response headers
1104
1101
  def search_within_group_with_http_info(tr_dataset, search_within_group_data, opts = {})
1105
1102
  if @api_client.config.debugging
1106
1103
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.search_within_group ...'
@@ -1137,7 +1134,7 @@ module TrieveRubyClient
1137
1134
  post_body = opts[:debug_body] || @api_client.object_to_http_body(search_within_group_data)
1138
1135
 
1139
1136
  # return_type
1140
- return_type = opts[:debug_return_type] || 'SearchGroupsResult'
1137
+ return_type = opts[:debug_return_type] || 'SearchWithinGroupResponseTypes'
1141
1138
 
1142
1139
  # auth_names
1143
1140
  auth_names = opts[:debug_auth_names] || ['ApiKey']
@@ -1160,7 +1157,7 @@ module TrieveRubyClient
1160
1157
  end
1161
1158
 
1162
1159
  # Update Group
1163
- # Update Group Update a chunk_group.
1160
+ # Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail.
1164
1161
  # @param tr_dataset [String] The dataset id to use for the request
1165
1162
  # @param update_chunk_group_data [UpdateChunkGroupData] JSON request payload to update a chunkGroup
1166
1163
  # @param [Hash] opts the optional parameters
@@ -1171,7 +1168,7 @@ module TrieveRubyClient
1171
1168
  end
1172
1169
 
1173
1170
  # Update Group
1174
- # Update Group Update a chunk_group.
1171
+ # Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail.
1175
1172
  # @param tr_dataset [String] The dataset id to use for the request
1176
1173
  # @param update_chunk_group_data [UpdateChunkGroupData] JSON request payload to update a chunkGroup
1177
1174
  # @param [Hash] opts the optional parameters
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5
5
 
6
- The version of the OpenAPI document: 0.4.0
6
+ The version of the OpenAPI document: 0.5.7
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -97,21 +97,21 @@ module TrieveRubyClient
97
97
  # Delete Dataset
98
98
  # Delete Dataset Delete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.
99
99
  # @param tr_organization [String] The organization id to use for the request
100
- # @param delete_dataset_request [DeleteDatasetRequest] JSON request payload to delete a dataset
100
+ # @param dataset_id [String] The id of the dataset you want to delete.
101
101
  # @param [Hash] opts the optional parameters
102
102
  # @return [nil]
103
- def delete_dataset(tr_organization, delete_dataset_request, opts = {})
104
- delete_dataset_with_http_info(tr_organization, delete_dataset_request, opts)
103
+ def delete_dataset(tr_organization, dataset_id, opts = {})
104
+ delete_dataset_with_http_info(tr_organization, dataset_id, opts)
105
105
  nil
106
106
  end
107
107
 
108
108
  # Delete Dataset
109
109
  # Delete Dataset Delete a dataset. The auth&#39;ed user must be an owner of the organization to delete a dataset.
110
110
  # @param tr_organization [String] The organization id to use for the request
111
- # @param delete_dataset_request [DeleteDatasetRequest] JSON request payload to delete a dataset
111
+ # @param dataset_id [String] The id of the dataset you want to delete.
112
112
  # @param [Hash] opts the optional parameters
113
113
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
114
- def delete_dataset_with_http_info(tr_organization, delete_dataset_request, opts = {})
114
+ def delete_dataset_with_http_info(tr_organization, dataset_id, opts = {})
115
115
  if @api_client.config.debugging
116
116
  @api_client.config.logger.debug 'Calling API: DatasetApi.delete_dataset ...'
117
117
  end
@@ -119,12 +119,12 @@ module TrieveRubyClient
119
119
  if @api_client.config.client_side_validation && tr_organization.nil?
120
120
  fail ArgumentError, "Missing the required parameter 'tr_organization' when calling DatasetApi.delete_dataset"
121
121
  end
122
- # verify the required parameter 'delete_dataset_request' is set
123
- if @api_client.config.client_side_validation && delete_dataset_request.nil?
124
- fail ArgumentError, "Missing the required parameter 'delete_dataset_request' when calling DatasetApi.delete_dataset"
122
+ # verify the required parameter 'dataset_id' is set
123
+ if @api_client.config.client_side_validation && dataset_id.nil?
124
+ fail ArgumentError, "Missing the required parameter 'dataset_id' when calling DatasetApi.delete_dataset"
125
125
  end
126
126
  # resource path
127
- local_var_path = '/api/dataset'
127
+ local_var_path = '/api/dataset/{dataset_id}'.sub('{' + 'dataset_id' + '}', CGI.escape(dataset_id.to_s))
128
128
 
129
129
  # query parameters
130
130
  query_params = opts[:query_params] || {}
@@ -133,18 +133,13 @@ module TrieveRubyClient
133
133
  header_params = opts[:header_params] || {}
134
134
  # HTTP header 'Accept' (if needed)
135
135
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
136
- # HTTP header 'Content-Type'
137
- content_type = @api_client.select_header_content_type(['application/json'])
138
- if !content_type.nil?
139
- header_params['Content-Type'] = content_type
140
- end
141
136
  header_params[:'TR-Organization'] = tr_organization
142
137
 
143
138
  # form parameters
144
139
  form_params = opts[:form_params] || {}
145
140
 
146
141
  # http body (model)
147
- post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_dataset_request)
142
+ post_body = opts[:debug_body]
148
143
 
149
144
  # return_type
150
145
  return_type = opts[:debug_return_type]
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5
5
 
6
- The version of the OpenAPI document: 0.4.0
6
+ The version of the OpenAPI document: 0.5.7
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0