trieve_ruby_client 0.10.7 → 0.11.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 (424) hide show
  1. checksums.yaml +4 -4
  2. data/GENERATE_COMMAND.txt +2 -0
  3. data/README.md +119 -16
  4. data/docs/APIVersion.md +15 -0
  5. data/docs/AnalyticsApi.md +303 -0
  6. data/docs/AuthApi.md +4 -4
  7. data/docs/AutocompleteReqPayload.md +6 -2
  8. data/docs/BookmarkGroupResponse.md +49 -0
  9. data/docs/BookmarkGroupResult.md +1 -1
  10. data/docs/ChatMessageProxy.md +1 -1
  11. data/docs/ChunkApi.md +165 -63
  12. data/docs/ChunkFilter.md +2 -0
  13. data/docs/ChunkGroupAndFileId.md +36 -0
  14. data/docs/ChunkGroupApi.md +110 -90
  15. data/docs/ChunkMetadata.md +1 -1
  16. data/docs/ChunkMetadataStringTagSet.md +1 -1
  17. data/docs/ChunkMetadataWithScore.md +1 -1
  18. data/docs/ChunkReqPayload.md +2 -2
  19. data/docs/ChunkReturnTypes.md +49 -0
  20. data/docs/ClusterAnalytics.md +63 -0
  21. data/docs/ClusterAnalyticsFilter.md +18 -0
  22. data/docs/ClusterAnalyticsResponse.md +49 -0
  23. data/docs/ClusterQueries.md +22 -0
  24. data/docs/ClusterTopics.md +20 -0
  25. data/docs/ContentChunkMetadata.md +1 -1
  26. data/docs/CountChunkQueryResponseBody.md +18 -0
  27. data/docs/CountChunksReqPayload.md +26 -0
  28. data/docs/CountQueries.md +20 -0
  29. data/docs/CreateMessageReqPayload.md +11 -1
  30. data/docs/CreateSetupCheckoutSessionResPayload.md +18 -0
  31. data/docs/Dataset.md +0 -2
  32. data/docs/DatasetAnalytics.md +28 -0
  33. data/docs/DatasetApi.md +8 -80
  34. data/docs/DatasetDTO.md +0 -2
  35. data/docs/DeprecatedSearchOverGroupsResponseBody.md +20 -0
  36. data/docs/DistancePhrase.md +20 -0
  37. data/docs/EditMessageReqPayload.md +11 -1
  38. data/docs/Event.md +3 -5
  39. data/docs/EventTypeRequest.md +15 -0
  40. data/docs/EventsApi.md +1 -1
  41. data/docs/FileApi.md +4 -4
  42. data/docs/GenerateChunksRequest.md +11 -1
  43. data/docs/GeoInfoWithBias.md +20 -0
  44. data/docs/GetChunksForGroupsResponse.md +22 -0
  45. data/docs/GetEventsData.md +1 -1
  46. data/docs/Granularity.md +15 -0
  47. data/docs/GroupData.md +1 -1
  48. data/docs/GroupScoreChunk.md +14 -0
  49. data/docs/GroupsBookmarkQueryResult.md +22 -0
  50. data/docs/HeadQueries.md +20 -0
  51. data/docs/HeadQueries1.md +22 -0
  52. data/docs/HeadQueryResponse.md +18 -0
  53. data/docs/HealthApi.md +1 -1
  54. data/docs/InvitationApi.md +1 -1
  55. data/docs/LatencyGraph.md +22 -0
  56. data/docs/LatencyGraphResponse.md +18 -0
  57. data/docs/LowConfidenceQueries.md +24 -0
  58. data/docs/LowConfidenceRecommendations.md +24 -0
  59. data/docs/MessageApi.md +4 -4
  60. data/docs/MetricsApi.md +76 -0
  61. data/docs/NewChunkMetadataTypes.md +51 -0
  62. data/docs/NoResultQueries.md +22 -0
  63. data/docs/OrganizationApi.md +6 -6
  64. data/docs/QueryCountResponse.md +18 -0
  65. data/docs/QueryDetails.md +20 -0
  66. data/docs/RAGAnalytics.md +63 -0
  67. data/docs/RAGAnalyticsFilter.md +20 -0
  68. data/docs/RAGAnalyticsResponse.md +49 -0
  69. data/docs/RAGQueries.md +26 -0
  70. data/docs/RAGUsage.md +20 -0
  71. data/docs/RAGUsageResponse.md +18 -0
  72. data/docs/RPSGraph.md +22 -0
  73. data/docs/RPSGraphResponse.md +18 -0
  74. data/docs/RagQueryEvent.md +30 -0
  75. data/docs/RagQueryResponse.md +18 -0
  76. data/docs/RagTypes.md +15 -0
  77. data/docs/RecommendChunksRequest.md +2 -2
  78. data/docs/RecommendChunksResponseBody.md +18 -0
  79. data/docs/RecommendGroupChunksRequest.md +2 -2
  80. data/docs/RecommendGroupsResponse.md +49 -0
  81. data/docs/RecommendGroupsResponseBody.md +18 -0
  82. data/docs/RecommendResponseTypes.md +49 -0
  83. data/docs/RecommendType.md +15 -0
  84. data/docs/RecommendationAnalytics.md +63 -0
  85. data/docs/RecommendationAnalyticsFilter.md +20 -0
  86. data/docs/RecommendationAnalyticsResponse.md +47 -0
  87. data/docs/RecommendationEvent.md +38 -0
  88. data/docs/RecommendationQueries.md +26 -0
  89. data/docs/RecommendationStrategy.md +15 -0
  90. data/docs/RecommendationType.md +15 -0
  91. data/docs/RecommendationsEventResponse.md +18 -0
  92. data/docs/RegenerateMessageReqPayload.md +9 -1
  93. data/docs/RoleProxy.md +15 -0
  94. data/docs/ScoreChunk.md +22 -0
  95. data/docs/SearchAnalytics.md +77 -0
  96. data/docs/SearchAnalyticsFilter.md +22 -0
  97. data/docs/SearchAnalyticsResponse.md +59 -0
  98. data/docs/SearchChunksReqPayload.md +6 -4
  99. data/docs/SearchClusterResponse.md +18 -0
  100. data/docs/SearchClusterTopics.md +28 -0
  101. data/docs/SearchGroupResponseTypes.md +49 -0
  102. data/docs/SearchLatencyGraph.md +20 -0
  103. data/docs/SearchMethod.md +15 -0
  104. data/docs/SearchMetrics.md +20 -0
  105. data/docs/SearchOverGroupsData.md +2 -4
  106. data/docs/SearchOverGroupsResponseBody.md +4 -4
  107. data/docs/SearchOverGroupsResponseTypes.md +4 -4
  108. data/docs/SearchOverGroupsResults.md +6 -4
  109. data/docs/SearchQueries.md +26 -0
  110. data/docs/SearchQueryEvent.md +34 -0
  111. data/docs/SearchQueryResponse.md +18 -0
  112. data/docs/SearchRPSGraph.md +20 -0
  113. data/docs/SearchResponseBody.md +20 -0
  114. data/docs/SearchResponseTypes.md +49 -0
  115. data/docs/SearchResultType.md +49 -0
  116. data/docs/SearchType.md +15 -0
  117. data/docs/SearchTypeCount.md +22 -0
  118. data/docs/SearchWithinGroupData.md +6 -2
  119. data/docs/SearchWithinGroupResponseBody.md +20 -0
  120. data/docs/SearchWithinGroupResults.md +1 -1
  121. data/docs/SlimChunkMetadata.md +1 -1
  122. data/docs/SlimChunkMetadataWithArrayTagSet.md +44 -0
  123. data/docs/SlimChunkMetadataWithScore.md +1 -1
  124. data/docs/SortBy.md +15 -0
  125. data/docs/SortOrder.md +15 -0
  126. data/docs/StripeApi.md +134 -4
  127. data/docs/StripeInvoice.md +28 -0
  128. data/docs/TopicApi.md +4 -4
  129. data/docs/UpdateChunkGroupData.md +3 -1
  130. data/docs/UpdateChunkReqPayload.md +2 -0
  131. data/docs/UserApi.md +3 -3
  132. data/lib/trieve_ruby_client/api/analytics_api.rb +322 -0
  133. data/lib/trieve_ruby_client/api/auth_api.rb +9 -9
  134. data/lib/trieve_ruby_client/api/chunk_api.rb +148 -52
  135. data/lib/trieve_ruby_client/api/chunk_group_api.rb +122 -107
  136. data/lib/trieve_ruby_client/api/dataset_api.rb +17 -81
  137. data/lib/trieve_ruby_client/api/events_api.rb +3 -3
  138. data/lib/trieve_ruby_client/api/file_api.rb +9 -9
  139. data/lib/trieve_ruby_client/api/health_api.rb +3 -3
  140. data/lib/trieve_ruby_client/api/invitation_api.rb +3 -3
  141. data/lib/trieve_ruby_client/api/message_api.rb +9 -9
  142. data/lib/trieve_ruby_client/api/metrics_api.rb +79 -0
  143. data/lib/trieve_ruby_client/api/organization_api.rb +13 -13
  144. data/lib/trieve_ruby_client/api/stripe_api.rb +135 -9
  145. data/lib/trieve_ruby_client/api/topic_api.rb +9 -9
  146. data/lib/trieve_ruby_client/api/user_api.rb +7 -7
  147. data/lib/trieve_ruby_client/api_client.rb +1 -1
  148. data/lib/trieve_ruby_client/api_error.rb +1 -1
  149. data/lib/trieve_ruby_client/configuration.rb +8 -1
  150. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  151. data/lib/trieve_ruby_client/models/api_key_resp_body.rb +1 -1
  152. data/lib/trieve_ruby_client/models/api_version.rb +40 -0
  153. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  154. data/lib/trieve_ruby_client/models/autocomplete_req_payload.rb +47 -5
  155. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  156. data/lib/trieve_ruby_client/models/bookmark_group_response.rb +105 -0
  157. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +2 -2
  158. data/lib/trieve_ruby_client/models/boost_phrase.rb +1 -1
  159. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +24 -2
  160. data/lib/trieve_ruby_client/models/chunk_filter.rb +13 -2
  161. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  162. data/lib/trieve_ruby_client/models/chunk_group_and_file_id.rb +343 -0
  163. data/lib/trieve_ruby_client/models/chunk_metadata.rb +8 -2
  164. data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +8 -2
  165. data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +1 -1
  166. data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +8 -2
  167. data/lib/trieve_ruby_client/models/chunk_req_payload.rb +12 -15
  168. data/lib/trieve_ruby_client/models/chunk_return_types.rb +105 -0
  169. data/lib/trieve_ruby_client/models/cluster_analytics.rb +43 -0
  170. data/lib/trieve_ruby_client/models/cluster_analytics_filter.rb +215 -0
  171. data/lib/trieve_ruby_client/models/cluster_analytics_response.rb +105 -0
  172. data/lib/trieve_ruby_client/models/cluster_queries.rb +296 -0
  173. data/lib/trieve_ruby_client/models/cluster_topics.rb +265 -0
  174. data/lib/trieve_ruby_client/models/condition_type.rb +1 -1
  175. data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +8 -2
  176. data/lib/trieve_ruby_client/models/count_chunk_query_response_body.rb +240 -0
  177. data/lib/trieve_ruby_client/models/count_chunks_req_payload.rb +307 -0
  178. data/lib/trieve_ruby_client/models/count_queries.rb +265 -0
  179. data/lib/trieve_ruby_client/models/create_chunk_group_req_payload.rb +1 -1
  180. data/lib/trieve_ruby_client/models/create_chunk_req_payload_enum.rb +1 -1
  181. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  182. data/lib/trieve_ruby_client/models/create_message_req_payload.rb +95 -4
  183. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  184. data/lib/trieve_ruby_client/models/create_setup_checkout_session_res_payload.rb +221 -0
  185. data/lib/trieve_ruby_client/models/create_topic_req_payload.rb +1 -1
  186. data/lib/trieve_ruby_client/models/dataset.rb +2 -14
  187. data/lib/trieve_ruby_client/models/dataset_analytics.rb +301 -0
  188. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  189. data/lib/trieve_ruby_client/models/dataset_dto.rb +2 -14
  190. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  191. data/lib/trieve_ruby_client/models/date_range.rb +1 -1
  192. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  193. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  194. data/lib/trieve_ruby_client/models/deprecated_search_over_groups_response_body.rb +239 -0
  195. data/lib/trieve_ruby_client/models/distance_phrase.rb +240 -0
  196. data/lib/trieve_ruby_client/models/edit_message_req_payload.rb +95 -4
  197. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  198. data/lib/trieve_ruby_client/models/event.rb +12 -24
  199. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  200. data/lib/trieve_ruby_client/models/event_type_request.rb +49 -0
  201. data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
  202. data/lib/trieve_ruby_client/models/file.rb +1 -1
  203. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  204. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +78 -6
  205. data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
  206. data/lib/trieve_ruby_client/models/geo_info_with_bias.rb +237 -0
  207. data/lib/trieve_ruby_client/models/geo_types.rb +1 -1
  208. data/lib/trieve_ruby_client/models/get_chunks_data.rb +1 -1
  209. data/lib/trieve_ruby_client/models/get_chunks_for_groups_response.rb +274 -0
  210. data/lib/trieve_ruby_client/models/get_datasets_pagination.rb +1 -1
  211. data/lib/trieve_ruby_client/models/get_events_data.rb +2 -2
  212. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  213. data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +1 -1
  214. data/lib/trieve_ruby_client/models/granularity.rb +42 -0
  215. data/lib/trieve_ruby_client/models/group_data.rb +2 -2
  216. data/lib/trieve_ruby_client/models/group_score_chunk.rb +92 -2
  217. data/lib/trieve_ruby_client/models/groups_bookmark_query_result.rb +274 -0
  218. data/lib/trieve_ruby_client/models/has_id_condition.rb +1 -1
  219. data/lib/trieve_ruby_client/models/head_queries.rb +237 -0
  220. data/lib/trieve_ruby_client/models/head_queries1.rb +290 -0
  221. data/lib/trieve_ruby_client/models/head_query_response.rb +223 -0
  222. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  223. data/lib/trieve_ruby_client/models/latency_graph.rb +275 -0
  224. data/lib/trieve_ruby_client/models/latency_graph_response.rb +223 -0
  225. data/lib/trieve_ruby_client/models/location_bounding_box.rb +1 -1
  226. data/lib/trieve_ruby_client/models/location_polygon.rb +1 -1
  227. data/lib/trieve_ruby_client/models/location_radius.rb +1 -1
  228. data/lib/trieve_ruby_client/models/low_confidence_queries.rb +300 -0
  229. data/lib/trieve_ruby_client/models/low_confidence_recommendations.rb +300 -0
  230. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  231. data/lib/trieve_ruby_client/models/message.rb +1 -1
  232. data/lib/trieve_ruby_client/models/new_chunk_metadata_types.rb +106 -0
  233. data/lib/trieve_ruby_client/models/no_result_queries.rb +290 -0
  234. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  235. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  236. data/lib/trieve_ruby_client/models/query_count_response.rb +223 -0
  237. data/lib/trieve_ruby_client/models/query_details.rb +271 -0
  238. data/lib/trieve_ruby_client/models/rag_analytics.rb +43 -0
  239. data/lib/trieve_ruby_client/models/rag_analytics_filter.rb +247 -0
  240. data/lib/trieve_ruby_client/models/rag_analytics_response.rb +105 -0
  241. data/lib/trieve_ruby_client/models/rag_queries.rb +310 -0
  242. data/lib/trieve_ruby_client/models/rag_query_event.rb +319 -0
  243. data/lib/trieve_ruby_client/models/rag_query_response.rb +223 -0
  244. data/lib/trieve_ruby_client/models/rag_types.rb +40 -0
  245. data/lib/trieve_ruby_client/models/rag_usage.rb +265 -0
  246. data/lib/trieve_ruby_client/models/rag_usage_response.rb +240 -0
  247. data/lib/trieve_ruby_client/models/range.rb +1 -1
  248. data/lib/trieve_ruby_client/models/range_condition.rb +1 -1
  249. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +25 -5
  250. data/lib/trieve_ruby_client/models/recommend_chunks_response_body.rb +223 -0
  251. data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +25 -5
  252. data/lib/trieve_ruby_client/models/recommend_groups_response.rb +105 -0
  253. data/lib/trieve_ruby_client/models/recommend_groups_response_body.rb +223 -0
  254. data/lib/trieve_ruby_client/models/recommend_response_types.rb +105 -0
  255. data/lib/trieve_ruby_client/models/recommend_type.rb +40 -0
  256. data/lib/trieve_ruby_client/models/recommendation_analytics.rb +43 -0
  257. data/lib/trieve_ruby_client/models/recommendation_analytics_filter.rb +247 -0
  258. data/lib/trieve_ruby_client/models/recommendation_analytics_response.rb +104 -0
  259. data/lib/trieve_ruby_client/models/recommendation_event.rb +391 -0
  260. data/lib/trieve_ruby_client/models/recommendation_queries.rb +310 -0
  261. data/lib/trieve_ruby_client/models/recommendation_strategy.rb +40 -0
  262. data/lib/trieve_ruby_client/models/recommendation_type.rb +40 -0
  263. data/lib/trieve_ruby_client/models/recommendations_event_response.rb +223 -0
  264. data/lib/trieve_ruby_client/models/regenerate_message_req_payload.rb +84 -4
  265. data/lib/trieve_ruby_client/models/remove_chunk_from_group_req_payload.rb +1 -1
  266. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  267. data/lib/trieve_ruby_client/models/role_proxy.rb +41 -0
  268. data/lib/trieve_ruby_client/models/rps_graph.rb +275 -0
  269. data/lib/trieve_ruby_client/models/rps_graph_response.rb +223 -0
  270. data/lib/trieve_ruby_client/models/score_chunk.rb +249 -0
  271. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  272. data/lib/trieve_ruby_client/models/search_analytics.rb +50 -0
  273. data/lib/trieve_ruby_client/models/search_analytics_filter.rb +257 -0
  274. data/lib/trieve_ruby_client/models/search_analytics_response.rb +110 -0
  275. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  276. data/lib/trieve_ruby_client/models/search_chunks_req_payload.rb +47 -16
  277. data/lib/trieve_ruby_client/models/search_cluster_response.rb +223 -0
  278. data/lib/trieve_ruby_client/models/search_cluster_topics.rb +301 -0
  279. data/lib/trieve_ruby_client/models/search_group_response_types.rb +105 -0
  280. data/lib/trieve_ruby_client/models/search_latency_graph.rb +237 -0
  281. data/lib/trieve_ruby_client/models/search_method.rb +42 -0
  282. data/lib/trieve_ruby_client/models/search_metrics.rb +265 -0
  283. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +26 -16
  284. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +23 -23
  285. data/lib/trieve_ruby_client/models/search_over_groups_response_types.rb +3 -3
  286. data/lib/trieve_ruby_client/models/search_over_groups_results.rb +33 -23
  287. data/lib/trieve_ruby_client/models/search_queries.rb +310 -0
  288. data/lib/trieve_ruby_client/models/search_query_event.rb +351 -0
  289. data/lib/trieve_ruby_client/models/search_query_response.rb +223 -0
  290. data/lib/trieve_ruby_client/models/search_response_body.rb +239 -0
  291. data/lib/trieve_ruby_client/models/search_response_types.rb +105 -0
  292. data/lib/trieve_ruby_client/models/search_result_type.rb +105 -0
  293. data/lib/trieve_ruby_client/models/search_rps_graph.rb +237 -0
  294. data/lib/trieve_ruby_client/models/search_type.rb +42 -0
  295. data/lib/trieve_ruby_client/models/search_type_count.rb +253 -0
  296. data/lib/trieve_ruby_client/models/search_within_group_data.rb +47 -5
  297. data/lib/trieve_ruby_client/models/search_within_group_response_body.rb +239 -0
  298. data/lib/trieve_ruby_client/models/search_within_group_results.rb +2 -2
  299. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  300. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  301. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  302. data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +8 -2
  303. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_array_tag_set.rb +385 -0
  304. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +8 -2
  305. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  306. data/lib/trieve_ruby_client/models/sort_by.rb +41 -0
  307. data/lib/trieve_ruby_client/models/sort_order.rb +40 -0
  308. data/lib/trieve_ruby_client/models/stripe_invoice.rb +301 -0
  309. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  310. data/lib/trieve_ruby_client/models/suggested_queries_req_payload.rb +1 -1
  311. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  312. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  313. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  314. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +17 -6
  315. data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +12 -2
  316. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  317. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_req_payload.rb +1 -1
  318. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  319. data/lib/trieve_ruby_client/models/update_topic_req_payload.rb +1 -1
  320. data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +1 -1
  321. data/lib/trieve_ruby_client/models/upload_file_req_payload.rb +1 -1
  322. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  323. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  324. data/lib/trieve_ruby_client/version.rb +2 -2
  325. data/lib/trieve_ruby_client.rb +86 -5
  326. data/openapi-generator.yaml +2 -2
  327. data/openapi.json +11050 -1
  328. data/spec/api/analytics_api_spec.rb +87 -0
  329. data/spec/api/metrics_api_spec.rb +46 -0
  330. data/spec/models/api_version_spec.rb +30 -0
  331. data/spec/models/bookmark_group_response_spec.rb +32 -0
  332. data/spec/models/chunk_group_and_file_id_spec.rb +90 -0
  333. data/spec/models/chunk_return_types_spec.rb +32 -0
  334. data/spec/models/cluster_analytics_filter_spec.rb +36 -0
  335. data/spec/models/cluster_analytics_response_spec.rb +32 -0
  336. data/spec/models/cluster_analytics_spec.rb +38 -0
  337. data/spec/models/cluster_queries_spec.rb +52 -0
  338. data/spec/models/cluster_topics_spec.rb +46 -0
  339. data/spec/models/count_chunk_query_response_body_spec.rb +36 -0
  340. data/spec/models/count_chunks_req_payload_spec.rb +60 -0
  341. data/spec/models/count_queries_spec.rb +46 -0
  342. data/spec/models/create_setup_checkout_session_res_payload_spec.rb +36 -0
  343. data/spec/models/dataset_analytics_spec.rb +66 -0
  344. data/spec/models/deprecated_search_over_groups_response_body_spec.rb +42 -0
  345. data/spec/models/distance_phrase_spec.rb +42 -0
  346. data/spec/models/event_type_request_spec.rb +30 -0
  347. data/spec/models/geo_info_with_bias_spec.rb +42 -0
  348. data/spec/models/get_chunks_for_groups_response_spec.rb +48 -0
  349. data/spec/models/granularity_spec.rb +30 -0
  350. data/spec/models/groups_bookmark_query_result_spec.rb +48 -0
  351. data/spec/models/head_queries1_spec.rb +52 -0
  352. data/spec/models/head_queries_spec.rb +42 -0
  353. data/spec/models/head_query_response_spec.rb +36 -0
  354. data/spec/models/latency_graph_response_spec.rb +36 -0
  355. data/spec/models/latency_graph_spec.rb +52 -0
  356. data/spec/models/low_confidence_queries_spec.rb +58 -0
  357. data/spec/models/low_confidence_recommendations_spec.rb +58 -0
  358. data/spec/models/new_chunk_metadata_types_spec.rb +32 -0
  359. data/spec/models/no_result_queries_spec.rb +52 -0
  360. data/spec/models/query_count_response_spec.rb +36 -0
  361. data/spec/models/query_details_spec.rb +46 -0
  362. data/spec/models/rag_analytics_filter_spec.rb +42 -0
  363. data/spec/models/rag_analytics_response_spec.rb +32 -0
  364. data/spec/models/rag_analytics_spec.rb +38 -0
  365. data/spec/models/rag_queries_spec.rb +64 -0
  366. data/spec/models/rag_query_event_spec.rb +72 -0
  367. data/spec/models/rag_query_response_spec.rb +36 -0
  368. data/spec/models/rag_types_spec.rb +30 -0
  369. data/spec/models/rag_usage_response_spec.rb +36 -0
  370. data/spec/models/rag_usage_spec.rb +46 -0
  371. data/spec/models/recommend_chunks_response_body_spec.rb +36 -0
  372. data/spec/models/recommend_groups_response_body_spec.rb +36 -0
  373. data/spec/models/recommend_groups_response_spec.rb +32 -0
  374. data/spec/models/recommend_response_types_spec.rb +32 -0
  375. data/spec/models/recommend_type_spec.rb +30 -0
  376. data/spec/models/recommendation_analytics_filter_spec.rb +42 -0
  377. data/spec/models/recommendation_analytics_response_spec.rb +32 -0
  378. data/spec/models/recommendation_analytics_spec.rb +38 -0
  379. data/spec/models/recommendation_event_spec.rb +96 -0
  380. data/spec/models/recommendation_queries_spec.rb +64 -0
  381. data/spec/models/recommendation_strategy_spec.rb +30 -0
  382. data/spec/models/recommendation_type_spec.rb +30 -0
  383. data/spec/models/recommendations_event_response_spec.rb +36 -0
  384. data/spec/models/role_proxy_spec.rb +30 -0
  385. data/spec/models/rps_graph_response_spec.rb +36 -0
  386. data/spec/models/rps_graph_spec.rb +52 -0
  387. data/spec/models/score_chunk_spec.rb +48 -0
  388. data/spec/models/search_analytics_filter_spec.rb +48 -0
  389. data/spec/models/search_analytics_response_spec.rb +32 -0
  390. data/spec/models/search_analytics_spec.rb +38 -0
  391. data/spec/models/search_cluster_response_spec.rb +36 -0
  392. data/spec/models/search_cluster_topics_spec.rb +66 -0
  393. data/spec/models/search_group_response_types_spec.rb +32 -0
  394. data/spec/models/search_latency_graph_spec.rb +42 -0
  395. data/spec/models/search_method_spec.rb +30 -0
  396. data/spec/models/search_metrics_spec.rb +46 -0
  397. data/spec/models/search_queries_spec.rb +64 -0
  398. data/spec/models/search_query_event_spec.rb +84 -0
  399. data/spec/models/search_query_response_spec.rb +36 -0
  400. data/spec/models/search_response_body_spec.rb +42 -0
  401. data/spec/models/search_response_types_spec.rb +32 -0
  402. data/spec/models/search_result_type_spec.rb +32 -0
  403. data/spec/models/search_rps_graph_spec.rb +42 -0
  404. data/spec/models/search_type_count_spec.rb +48 -0
  405. data/spec/models/search_type_spec.rb +30 -0
  406. data/spec/models/search_within_group_response_body_spec.rb +42 -0
  407. data/spec/models/slim_chunk_metadata_with_array_tag_set_spec.rb +114 -0
  408. data/spec/models/sort_by_spec.rb +30 -0
  409. data/spec/models/sort_order_spec.rb +30 -0
  410. data/spec/models/stripe_invoice_spec.rb +66 -0
  411. data/spec/spec_helper.rb +1 -1
  412. data/trieve_ruby_client.gemspec +1 -1
  413. metadata +456 -135
  414. data/trieve_ruby_client-0.5.0.gem +0 -0
  415. data/trieve_ruby_client-0.5.7.gem +0 -0
  416. data/trieve_ruby_client-0.6.0.gem +0 -0
  417. data/trieve_ruby_client-0.6.2.gem +0 -0
  418. data/trieve_ruby_client-0.6.7.gem +0 -0
  419. data/trieve_ruby_client-0.6.9.gem +0 -0
  420. data/trieve_ruby_client-0.7.2.gem +0 -0
  421. data/trieve_ruby_client-0.7.6.gem +0 -0
  422. data/trieve_ruby_client-0.8.0.gem +0 -0
  423. data/trieve_ruby_client-0.8.2.gem +0 -0
  424. data/trieve_ruby_client-0.8.5.gem +0 -0
data/docs/ChunkApi.md CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.trieve.ai*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**autocomplete**](ChunkApi.md#autocomplete) | **POST** /api/chunk/autocomplete | Autocomplete |
8
+ | [**count_chunks**](ChunkApi.md#count_chunks) | **POST** /api/chunk/count | Count chunks above threshold |
8
9
  | [**create_chunk**](ChunkApi.md#create_chunk) | **POST** /api/chunk | Create or Upsert Chunk or Chunks |
9
10
  | [**delete_chunk**](ChunkApi.md#delete_chunk) | **DELETE** /api/chunk/{chunk_id} | Delete Chunk |
10
11
  | [**delete_chunk_by_tracking_id**](ChunkApi.md#delete_chunk_by_tracking_id) | **DELETE** /api/chunk/tracking_id/{tracking_id} | Delete Chunk By Tracking Id |
@@ -12,7 +13,7 @@ All URIs are relative to *https://api.trieve.ai*
12
13
  | [**get_chunk_by_id**](ChunkApi.md#get_chunk_by_id) | **GET** /api/chunk/{chunk_id} | Get Chunk By Id |
13
14
  | [**get_chunk_by_tracking_id**](ChunkApi.md#get_chunk_by_tracking_id) | **GET** /api/chunk/tracking_id/{tracking_id} | Get Chunk By Tracking Id |
14
15
  | [**get_chunks_by_ids**](ChunkApi.md#get_chunks_by_ids) | **POST** /api/chunks | Get Chunks By Ids |
15
- | [**get_chunks_by_tracking_ids**](ChunkApi.md#get_chunks_by_tracking_ids) | **POST** /api/chunks/tracking | Get Chunks By TrackingIds |
16
+ | [**get_chunks_by_tracking_ids**](ChunkApi.md#get_chunks_by_tracking_ids) | **POST** /api/chunks/tracking | Get Chunks By Tracking Ids |
16
17
  | [**get_recommended_chunks**](ChunkApi.md#get_recommended_chunks) | **POST** /api/chunk/recommend | Get Recommended Chunks |
17
18
  | [**get_suggested_queries**](ChunkApi.md#get_suggested_queries) | **POST** /api/chunk/gen_suggestions | Generate suggested queries |
18
19
  | [**search_chunks**](ChunkApi.md#search_chunks) | **POST** /api/chunk/search | Search |
@@ -22,11 +23,11 @@ All URIs are relative to *https://api.trieve.ai*
22
23
 
23
24
  ## autocomplete
24
25
 
25
- > <SearchChunkQueryResponseBody> autocomplete(tr_dataset, autocomplete_req_payload)
26
+ > <SearchResponseTypes> autocomplete(tr_dataset, autocomplete_req_payload, opts)
26
27
 
27
28
  Autocomplete
28
29
 
29
- Autocomplete This route provides the primary autocomplete functionality for the API. This prioritize prefix matching with semantic or full-text search.
30
+ This route provides the primary autocomplete functionality for the API. This prioritize prefix matching with semantic or full-text search.
30
31
 
31
32
  ### Examples
32
33
 
@@ -43,11 +44,14 @@ end
43
44
 
44
45
  api_instance = TrieveRubyClient::ChunkApi.new
45
46
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
46
- autocomplete_req_payload = TrieveRubyClient::AutocompleteReqPayload.new({query: 'query_example', search_type: 'search_type_example'}) # AutocompleteReqPayload | JSON request payload to semantically search for chunks (chunks)
47
+ autocomplete_req_payload = TrieveRubyClient::AutocompleteReqPayload.new({query: 'query_example', search_type: TrieveRubyClient::SearchMethod::FULL_TEXT}) # AutocompleteReqPayload | JSON request payload to semantically search for chunks (chunks)
48
+ opts = {
49
+ x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
50
+ }
47
51
 
48
52
  begin
49
53
  # Autocomplete
50
- result = api_instance.autocomplete(tr_dataset, autocomplete_req_payload)
54
+ result = api_instance.autocomplete(tr_dataset, autocomplete_req_payload, opts)
51
55
  p result
52
56
  rescue TrieveRubyClient::ApiError => e
53
57
  puts "Error when calling ChunkApi->autocomplete: #{e}"
@@ -58,15 +62,15 @@ end
58
62
 
59
63
  This returns an Array which contains the response data, status code and headers.
60
64
 
61
- > <Array(<SearchChunkQueryResponseBody>, Integer, Hash)> autocomplete_with_http_info(tr_dataset, autocomplete_req_payload)
65
+ > <Array(<SearchResponseTypes>, Integer, Hash)> autocomplete_with_http_info(tr_dataset, autocomplete_req_payload, opts)
62
66
 
63
67
  ```ruby
64
68
  begin
65
69
  # Autocomplete
66
- data, status_code, headers = api_instance.autocomplete_with_http_info(tr_dataset, autocomplete_req_payload)
70
+ data, status_code, headers = api_instance.autocomplete_with_http_info(tr_dataset, autocomplete_req_payload, opts)
67
71
  p status_code # => 2xx
68
72
  p headers # => { ... }
69
- p data # => <SearchChunkQueryResponseBody>
73
+ p data # => <SearchResponseTypes>
70
74
  rescue TrieveRubyClient::ApiError => e
71
75
  puts "Error when calling ChunkApi->autocomplete_with_http_info: #{e}"
72
76
  end
@@ -78,10 +82,84 @@ end
78
82
  | ---- | ---- | ----------- | ----- |
79
83
  | **tr_dataset** | **String** | The dataset id to use for the request | |
80
84
  | **autocomplete_req_payload** | [**AutocompleteReqPayload**](AutocompleteReqPayload.md) | JSON request payload to semantically search for chunks (chunks) | |
85
+ | **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
81
86
 
82
87
  ### Return type
83
88
 
84
- [**SearchChunkQueryResponseBody**](SearchChunkQueryResponseBody.md)
89
+ [**SearchResponseTypes**](SearchResponseTypes.md)
90
+
91
+ ### Authorization
92
+
93
+ [ApiKey](../README.md#ApiKey)
94
+
95
+ ### HTTP request headers
96
+
97
+ - **Content-Type**: application/json
98
+ - **Accept**: application/json
99
+
100
+
101
+ ## count_chunks
102
+
103
+ > <CountChunkQueryResponseBody> count_chunks(tr_dataset, count_chunks_req_payload)
104
+
105
+ Count chunks above threshold
106
+
107
+ This route can be used to determine the number of chunks that match a given search criteria including filters and score threshold. It may be high latency for large datasets. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization. There is a dataset configuration imposed restriction on the maximum limit value (default 10,000) which is used to prevent DDOS attacks.
108
+
109
+ ### Examples
110
+
111
+ ```ruby
112
+ require 'time'
113
+ require 'trieve_ruby_client'
114
+ # setup authorization
115
+ TrieveRubyClient.configure do |config|
116
+ # Configure API key authorization: ApiKey
117
+ config.api_key['ApiKey'] = 'YOUR API KEY'
118
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
119
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
120
+ end
121
+
122
+ api_instance = TrieveRubyClient::ChunkApi.new
123
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
124
+ count_chunks_req_payload = TrieveRubyClient::CountChunksReqPayload.new({query: 'query_example', search_type: TrieveRubyClient::SearchMethod::FULL_TEXT}) # CountChunksReqPayload |
125
+
126
+ begin
127
+ # Count chunks above threshold
128
+ result = api_instance.count_chunks(tr_dataset, count_chunks_req_payload)
129
+ p result
130
+ rescue TrieveRubyClient::ApiError => e
131
+ puts "Error when calling ChunkApi->count_chunks: #{e}"
132
+ end
133
+ ```
134
+
135
+ #### Using the count_chunks_with_http_info variant
136
+
137
+ This returns an Array which contains the response data, status code and headers.
138
+
139
+ > <Array(<CountChunkQueryResponseBody>, Integer, Hash)> count_chunks_with_http_info(tr_dataset, count_chunks_req_payload)
140
+
141
+ ```ruby
142
+ begin
143
+ # Count chunks above threshold
144
+ data, status_code, headers = api_instance.count_chunks_with_http_info(tr_dataset, count_chunks_req_payload)
145
+ p status_code # => 2xx
146
+ p headers # => { ... }
147
+ p data # => <CountChunkQueryResponseBody>
148
+ rescue TrieveRubyClient::ApiError => e
149
+ puts "Error when calling ChunkApi->count_chunks_with_http_info: #{e}"
150
+ end
151
+ ```
152
+
153
+ ### Parameters
154
+
155
+ | Name | Type | Description | Notes |
156
+ | ---- | ---- | ----------- | ----- |
157
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
158
+ | **count_chunks_req_payload** | [**CountChunksReqPayload**](CountChunksReqPayload.md) | | |
159
+
160
+ ### Return type
161
+
162
+ [**CountChunkQueryResponseBody**](CountChunkQueryResponseBody.md)
85
163
 
86
164
  ### Authorization
87
165
 
@@ -99,7 +177,7 @@ end
99
177
 
100
178
  Create or Upsert Chunk or Chunks
101
179
 
102
- 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. If uploading in bulk, the maximum amount of chunks that can be uploaded at once is 120 chunks. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
180
+ 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. If uploading in bulk, the maximum amount of chunks that can be uploaded at once is 120 chunks. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
103
181
 
104
182
  ### Examples
105
183
 
@@ -172,7 +250,7 @@ end
172
250
 
173
251
  Delete Chunk
174
252
 
175
- 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. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
253
+ 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. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
176
254
 
177
255
  ### Examples
178
256
 
@@ -244,7 +322,7 @@ nil (empty response body)
244
322
 
245
323
  Delete Chunk By Tracking Id
246
324
 
247
- Delete Chunk By Tracking Id Delete 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. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
325
+ Delete 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. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
248
326
 
249
327
  ### Examples
250
328
 
@@ -316,7 +394,7 @@ nil (empty response body)
316
394
 
317
395
  RAG on Specified Chunks
318
396
 
319
- 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.
397
+ 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.
320
398
 
321
399
  ### Examples
322
400
 
@@ -333,7 +411,7 @@ end
333
411
 
334
412
  api_instance = TrieveRubyClient::ChunkApi.new
335
413
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
336
- generate_chunks_request = TrieveRubyClient::GenerateChunksRequest.new({chunk_ids: ['chunk_ids_example'], prev_messages: [TrieveRubyClient::ChatMessageProxy.new({content: 'content_example', role: 'role_example'})]}) # GenerateChunksRequest | JSON request payload to perform RAG on some chunks (chunks)
414
+ generate_chunks_request = TrieveRubyClient::GenerateChunksRequest.new({chunk_ids: ['chunk_ids_example'], prev_messages: [TrieveRubyClient::ChatMessageProxy.new({content: 'content_example', role: TrieveRubyClient::RoleProxy::SYSTEM})]}) # GenerateChunksRequest | JSON request payload to perform RAG on some chunks (chunks)
337
415
 
338
416
  begin
339
417
  # RAG on Specified Chunks
@@ -385,11 +463,11 @@ end
385
463
 
386
464
  ## get_chunk_by_id
387
465
 
388
- > <ChunkMetadataStringTagSet> get_chunk_by_id(tr_dataset, chunk_id)
466
+ > <ChunkReturnTypes> get_chunk_by_id(tr_dataset, chunk_id, opts)
389
467
 
390
468
  Get Chunk By Id
391
469
 
392
- Get Chunk By Id Get a singular chunk by id.
470
+ Get a singular chunk by id.
393
471
 
394
472
  ### Examples
395
473
 
@@ -407,10 +485,13 @@ end
407
485
  api_instance = TrieveRubyClient::ChunkApi.new
408
486
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
409
487
  chunk_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Id of the chunk you want to fetch.
488
+ opts = {
489
+ x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
490
+ }
410
491
 
411
492
  begin
412
493
  # Get Chunk By Id
413
- result = api_instance.get_chunk_by_id(tr_dataset, chunk_id)
494
+ result = api_instance.get_chunk_by_id(tr_dataset, chunk_id, opts)
414
495
  p result
415
496
  rescue TrieveRubyClient::ApiError => e
416
497
  puts "Error when calling ChunkApi->get_chunk_by_id: #{e}"
@@ -421,15 +502,15 @@ end
421
502
 
422
503
  This returns an Array which contains the response data, status code and headers.
423
504
 
424
- > <Array(<ChunkMetadataStringTagSet>, Integer, Hash)> get_chunk_by_id_with_http_info(tr_dataset, chunk_id)
505
+ > <Array(<ChunkReturnTypes>, Integer, Hash)> get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts)
425
506
 
426
507
  ```ruby
427
508
  begin
428
509
  # Get Chunk By Id
429
- data, status_code, headers = api_instance.get_chunk_by_id_with_http_info(tr_dataset, chunk_id)
510
+ data, status_code, headers = api_instance.get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts)
430
511
  p status_code # => 2xx
431
512
  p headers # => { ... }
432
- p data # => <ChunkMetadataStringTagSet>
513
+ p data # => <ChunkReturnTypes>
433
514
  rescue TrieveRubyClient::ApiError => e
434
515
  puts "Error when calling ChunkApi->get_chunk_by_id_with_http_info: #{e}"
435
516
  end
@@ -441,10 +522,11 @@ end
441
522
  | ---- | ---- | ----------- | ----- |
442
523
  | **tr_dataset** | **String** | The dataset id to use for the request | |
443
524
  | **chunk_id** | **String** | Id of the chunk you want to fetch. | |
525
+ | **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
444
526
 
445
527
  ### Return type
446
528
 
447
- [**ChunkMetadataStringTagSet**](ChunkMetadataStringTagSet.md)
529
+ [**ChunkReturnTypes**](ChunkReturnTypes.md)
448
530
 
449
531
  ### Authorization
450
532
 
@@ -458,11 +540,11 @@ end
458
540
 
459
541
  ## get_chunk_by_tracking_id
460
542
 
461
- > <ChunkMetadataStringTagSet> get_chunk_by_tracking_id(tr_dataset, tracking_id)
543
+ > <ChunkReturnTypes> get_chunk_by_tracking_id(tr_dataset, tracking_id, opts)
462
544
 
463
545
  Get Chunk By Tracking Id
464
546
 
465
- Get Chunk By Tracking Id Get 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.
547
+ Get 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.
466
548
 
467
549
  ### Examples
468
550
 
@@ -480,10 +562,13 @@ end
480
562
  api_instance = TrieveRubyClient::ChunkApi.new
481
563
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
482
564
  tracking_id = 'tracking_id_example' # String | tracking_id of the chunk you want to fetch
565
+ opts = {
566
+ x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
567
+ }
483
568
 
484
569
  begin
485
570
  # Get Chunk By Tracking Id
486
- result = api_instance.get_chunk_by_tracking_id(tr_dataset, tracking_id)
571
+ result = api_instance.get_chunk_by_tracking_id(tr_dataset, tracking_id, opts)
487
572
  p result
488
573
  rescue TrieveRubyClient::ApiError => e
489
574
  puts "Error when calling ChunkApi->get_chunk_by_tracking_id: #{e}"
@@ -494,15 +579,15 @@ end
494
579
 
495
580
  This returns an Array which contains the response data, status code and headers.
496
581
 
497
- > <Array(<ChunkMetadataStringTagSet>, Integer, Hash)> get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id)
582
+ > <Array(<ChunkReturnTypes>, Integer, Hash)> get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
498
583
 
499
584
  ```ruby
500
585
  begin
501
586
  # Get Chunk By Tracking Id
502
- data, status_code, headers = api_instance.get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id)
587
+ data, status_code, headers = api_instance.get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
503
588
  p status_code # => 2xx
504
589
  p headers # => { ... }
505
- p data # => <ChunkMetadataStringTagSet>
590
+ p data # => <ChunkReturnTypes>
506
591
  rescue TrieveRubyClient::ApiError => e
507
592
  puts "Error when calling ChunkApi->get_chunk_by_tracking_id_with_http_info: #{e}"
508
593
  end
@@ -514,10 +599,11 @@ end
514
599
  | ---- | ---- | ----------- | ----- |
515
600
  | **tr_dataset** | **String** | The dataset id to use for the request | |
516
601
  | **tracking_id** | **String** | tracking_id of the chunk you want to fetch | |
602
+ | **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
517
603
 
518
604
  ### Return type
519
605
 
520
- [**ChunkMetadataStringTagSet**](ChunkMetadataStringTagSet.md)
606
+ [**ChunkReturnTypes**](ChunkReturnTypes.md)
521
607
 
522
608
  ### Authorization
523
609
 
@@ -531,11 +617,11 @@ end
531
617
 
532
618
  ## get_chunks_by_ids
533
619
 
534
- > <Array<ChunkMetadataStringTagSet>> get_chunks_by_ids(tr_dataset, get_chunks_data)
620
+ > <Array<ChunkReturnTypes>> get_chunks_by_ids(tr_dataset, get_chunks_data, opts)
535
621
 
536
622
  Get Chunks By Ids
537
623
 
538
- Get Chunks By Ids Get multiple chunks by multiple ids.
624
+ Get multiple chunks by multiple ids.
539
625
 
540
626
  ### Examples
541
627
 
@@ -553,10 +639,13 @@ end
553
639
  api_instance = TrieveRubyClient::ChunkApi.new
554
640
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
555
641
  get_chunks_data = TrieveRubyClient::GetChunksData.new({ids: ['ids_example']}) # GetChunksData | JSON request payload to get the chunks in the request
642
+ opts = {
643
+ x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
644
+ }
556
645
 
557
646
  begin
558
647
  # Get Chunks By Ids
559
- result = api_instance.get_chunks_by_ids(tr_dataset, get_chunks_data)
648
+ result = api_instance.get_chunks_by_ids(tr_dataset, get_chunks_data, opts)
560
649
  p result
561
650
  rescue TrieveRubyClient::ApiError => e
562
651
  puts "Error when calling ChunkApi->get_chunks_by_ids: #{e}"
@@ -567,15 +656,15 @@ end
567
656
 
568
657
  This returns an Array which contains the response data, status code and headers.
569
658
 
570
- > <Array(<Array<ChunkMetadataStringTagSet>>, Integer, Hash)> get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data)
659
+ > <Array(<Array<ChunkReturnTypes>>, Integer, Hash)> get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data, opts)
571
660
 
572
661
  ```ruby
573
662
  begin
574
663
  # Get Chunks By Ids
575
- data, status_code, headers = api_instance.get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data)
664
+ data, status_code, headers = api_instance.get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data, opts)
576
665
  p status_code # => 2xx
577
666
  p headers # => { ... }
578
- p data # => <Array<ChunkMetadataStringTagSet>>
667
+ p data # => <Array<ChunkReturnTypes>>
579
668
  rescue TrieveRubyClient::ApiError => e
580
669
  puts "Error when calling ChunkApi->get_chunks_by_ids_with_http_info: #{e}"
581
670
  end
@@ -587,10 +676,11 @@ end
587
676
  | ---- | ---- | ----------- | ----- |
588
677
  | **tr_dataset** | **String** | The dataset id to use for the request | |
589
678
  | **get_chunks_data** | [**GetChunksData**](GetChunksData.md) | JSON request payload to get the chunks in the request | |
679
+ | **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
590
680
 
591
681
  ### Return type
592
682
 
593
- [**Array&lt;ChunkMetadataStringTagSet&gt;**](ChunkMetadataStringTagSet.md)
683
+ [**Array&lt;ChunkReturnTypes&gt;**](ChunkReturnTypes.md)
594
684
 
595
685
  ### Authorization
596
686
 
@@ -604,11 +694,11 @@ end
604
694
 
605
695
  ## get_chunks_by_tracking_ids
606
696
 
607
- > <Array<ChunkMetadataStringTagSet>> get_chunks_by_tracking_ids(tr_dataset, get_tracking_chunks_data)
697
+ > <Array<ChunkReturnTypes>> get_chunks_by_tracking_ids(tr_dataset, get_tracking_chunks_data, opts)
608
698
 
609
- Get Chunks By TrackingIds
699
+ Get Chunks By Tracking Ids
610
700
 
611
- Get Chunks By TrackingIds Get multiple chunks by ids.
701
+ Get multiple chunks by ids.
612
702
 
613
703
  ### Examples
614
704
 
@@ -626,10 +716,13 @@ end
626
716
  api_instance = TrieveRubyClient::ChunkApi.new
627
717
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
628
718
  get_tracking_chunks_data = TrieveRubyClient::GetTrackingChunksData.new({tracking_ids: ['tracking_ids_example']}) # GetTrackingChunksData | JSON request payload to get the chunks in the request
719
+ opts = {
720
+ x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
721
+ }
629
722
 
630
723
  begin
631
- # Get Chunks By TrackingIds
632
- result = api_instance.get_chunks_by_tracking_ids(tr_dataset, get_tracking_chunks_data)
724
+ # Get Chunks By Tracking Ids
725
+ result = api_instance.get_chunks_by_tracking_ids(tr_dataset, get_tracking_chunks_data, opts)
633
726
  p result
634
727
  rescue TrieveRubyClient::ApiError => e
635
728
  puts "Error when calling ChunkApi->get_chunks_by_tracking_ids: #{e}"
@@ -640,15 +733,15 @@ end
640
733
 
641
734
  This returns an Array which contains the response data, status code and headers.
642
735
 
643
- > <Array(<Array<ChunkMetadataStringTagSet>>, Integer, Hash)> get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data)
736
+ > <Array(<Array<ChunkReturnTypes>>, Integer, Hash)> get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data, opts)
644
737
 
645
738
  ```ruby
646
739
  begin
647
- # Get Chunks By TrackingIds
648
- data, status_code, headers = api_instance.get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data)
740
+ # Get Chunks By Tracking Ids
741
+ data, status_code, headers = api_instance.get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data, opts)
649
742
  p status_code # => 2xx
650
743
  p headers # => { ... }
651
- p data # => <Array<ChunkMetadataStringTagSet>>
744
+ p data # => <Array<ChunkReturnTypes>>
652
745
  rescue TrieveRubyClient::ApiError => e
653
746
  puts "Error when calling ChunkApi->get_chunks_by_tracking_ids_with_http_info: #{e}"
654
747
  end
@@ -660,10 +753,11 @@ end
660
753
  | ---- | ---- | ----------- | ----- |
661
754
  | **tr_dataset** | **String** | The dataset id to use for the request | |
662
755
  | **get_tracking_chunks_data** | [**GetTrackingChunksData**](GetTrackingChunksData.md) | JSON request payload to get the chunks in the request | |
756
+ | **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
663
757
 
664
758
  ### Return type
665
759
 
666
- [**Array&lt;ChunkMetadataStringTagSet&gt;**](ChunkMetadataStringTagSet.md)
760
+ [**Array&lt;ChunkReturnTypes&gt;**](ChunkReturnTypes.md)
667
761
 
668
762
  ### Authorization
669
763
 
@@ -677,11 +771,11 @@ end
677
771
 
678
772
  ## get_recommended_chunks
679
773
 
680
- > <Array<ChunkMetadataWithScore>> get_recommended_chunks(tr_dataset, recommend_chunks_request)
774
+ > <RecommendResponseTypes> get_recommended_chunks(tr_dataset, recommend_chunks_request, opts)
681
775
 
682
776
  Get Recommended Chunks
683
777
 
684
- Get Recommended Chunks Get recommendations of chunks similar to the positive samples in the request and dissimilar to the negative. You must provide at least one of either positive_chunk_ids or positive_tracking_ids.
778
+ Get recommendations of chunks similar to the positive samples in the request and dissimilar to the negative. You must provide at least one of either positive_chunk_ids or positive_tracking_ids.
685
779
 
686
780
  ### Examples
687
781
 
@@ -699,10 +793,13 @@ end
699
793
  api_instance = TrieveRubyClient::ChunkApi.new
700
794
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
701
795
  recommend_chunks_request = TrieveRubyClient::RecommendChunksRequest.new # RecommendChunksRequest | JSON request payload to get recommendations of chunks similar to the chunks in the request
796
+ opts = {
797
+ x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
798
+ }
702
799
 
703
800
  begin
704
801
  # Get Recommended Chunks
705
- result = api_instance.get_recommended_chunks(tr_dataset, recommend_chunks_request)
802
+ result = api_instance.get_recommended_chunks(tr_dataset, recommend_chunks_request, opts)
706
803
  p result
707
804
  rescue TrieveRubyClient::ApiError => e
708
805
  puts "Error when calling ChunkApi->get_recommended_chunks: #{e}"
@@ -713,15 +810,15 @@ end
713
810
 
714
811
  This returns an Array which contains the response data, status code and headers.
715
812
 
716
- > <Array(<Array<ChunkMetadataWithScore>>, Integer, Hash)> get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request)
813
+ > <Array(<RecommendResponseTypes>, Integer, Hash)> get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts)
717
814
 
718
815
  ```ruby
719
816
  begin
720
817
  # Get Recommended Chunks
721
- data, status_code, headers = api_instance.get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request)
818
+ data, status_code, headers = api_instance.get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts)
722
819
  p status_code # => 2xx
723
820
  p headers # => { ... }
724
- p data # => <Array<ChunkMetadataWithScore>>
821
+ p data # => <RecommendResponseTypes>
725
822
  rescue TrieveRubyClient::ApiError => e
726
823
  puts "Error when calling ChunkApi->get_recommended_chunks_with_http_info: #{e}"
727
824
  end
@@ -733,10 +830,11 @@ end
733
830
  | ---- | ---- | ----------- | ----- |
734
831
  | **tr_dataset** | **String** | The dataset id to use for the request | |
735
832
  | **recommend_chunks_request** | [**RecommendChunksRequest**](RecommendChunksRequest.md) | JSON request payload to get recommendations of chunks similar to the chunks in the request | |
833
+ | **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
736
834
 
737
835
  ### Return type
738
836
 
739
- [**Array&lt;ChunkMetadataWithScore&gt;**](ChunkMetadataWithScore.md)
837
+ [**RecommendResponseTypes**](RecommendResponseTypes.md)
740
838
 
741
839
  ### Authorization
742
840
 
@@ -754,7 +852,7 @@ end
754
852
 
755
853
  Generate suggested queries
756
854
 
757
- Generate suggested queries This endpoint will generate 3 suggested queries based off a hybrid search using RAG with the query provided in the request body and return them as a JSON object.
855
+ This endpoint will generate 3 suggested queries based off a hybrid search using RAG with the query provided in the request body and return them as a JSON object.
758
856
 
759
857
  ### Examples
760
858
 
@@ -823,11 +921,11 @@ end
823
921
 
824
922
  ## search_chunks
825
923
 
826
- > <SearchChunkQueryResponseBody> search_chunks(tr_dataset, search_chunks_req_payload)
924
+ > <SearchResponseTypes> search_chunks(tr_dataset, search_chunks_req_payload, opts)
827
925
 
828
926
  Search
829
927
 
830
- Search This 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><mark>` tags for sub-sentence highlighting.
928
+ This 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><mark>` tags for sub-sentence highlighting.
831
929
 
832
930
  ### Examples
833
931
 
@@ -844,11 +942,14 @@ end
844
942
 
845
943
  api_instance = TrieveRubyClient::ChunkApi.new
846
944
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
847
- search_chunks_req_payload = TrieveRubyClient::SearchChunksReqPayload.new({query: 'query_example', search_type: 'search_type_example'}) # SearchChunksReqPayload | JSON request payload to semantically search for chunks (chunks)
945
+ search_chunks_req_payload = TrieveRubyClient::SearchChunksReqPayload.new({query: 'query_example', search_type: TrieveRubyClient::SearchMethod::FULL_TEXT}) # SearchChunksReqPayload | JSON request payload to semantically search for chunks (chunks)
946
+ opts = {
947
+ x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
948
+ }
848
949
 
849
950
  begin
850
951
  # Search
851
- result = api_instance.search_chunks(tr_dataset, search_chunks_req_payload)
952
+ result = api_instance.search_chunks(tr_dataset, search_chunks_req_payload, opts)
852
953
  p result
853
954
  rescue TrieveRubyClient::ApiError => e
854
955
  puts "Error when calling ChunkApi->search_chunks: #{e}"
@@ -859,15 +960,15 @@ end
859
960
 
860
961
  This returns an Array which contains the response data, status code and headers.
861
962
 
862
- > <Array(<SearchChunkQueryResponseBody>, Integer, Hash)> search_chunks_with_http_info(tr_dataset, search_chunks_req_payload)
963
+ > <Array(<SearchResponseTypes>, Integer, Hash)> search_chunks_with_http_info(tr_dataset, search_chunks_req_payload, opts)
863
964
 
864
965
  ```ruby
865
966
  begin
866
967
  # Search
867
- data, status_code, headers = api_instance.search_chunks_with_http_info(tr_dataset, search_chunks_req_payload)
968
+ data, status_code, headers = api_instance.search_chunks_with_http_info(tr_dataset, search_chunks_req_payload, opts)
868
969
  p status_code # => 2xx
869
970
  p headers # => { ... }
870
- p data # => <SearchChunkQueryResponseBody>
971
+ p data # => <SearchResponseTypes>
871
972
  rescue TrieveRubyClient::ApiError => e
872
973
  puts "Error when calling ChunkApi->search_chunks_with_http_info: #{e}"
873
974
  end
@@ -879,10 +980,11 @@ end
879
980
  | ---- | ---- | ----------- | ----- |
880
981
  | **tr_dataset** | **String** | The dataset id to use for the request | |
881
982
  | **search_chunks_req_payload** | [**SearchChunksReqPayload**](SearchChunksReqPayload.md) | JSON request payload to semantically search for chunks (chunks) | |
983
+ | **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
882
984
 
883
985
  ### Return type
884
986
 
885
- [**SearchChunkQueryResponseBody**](SearchChunkQueryResponseBody.md)
987
+ [**SearchResponseTypes**](SearchResponseTypes.md)
886
988
 
887
989
  ### Authorization
888
990
 
@@ -900,7 +1002,7 @@ end
900
1002
 
901
1003
  Update Chunk
902
1004
 
903
- Update Chunk Update 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. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
1005
+ Update 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. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
904
1006
 
905
1007
  ### Examples
906
1008
 
@@ -972,7 +1074,7 @@ nil (empty response body)
972
1074
 
973
1075
  Update Chunk By Tracking Id
974
1076
 
975
- Update Chunk By Tracking Id Update 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. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
1077
+ Update 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. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
976
1078
 
977
1079
  ### Examples
978
1080
 
data/docs/ChunkFilter.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **jsonb_prefilter** | **Boolean** | JOSNB prefilter tells the server to perform a full scan over the metadata JSONB column instead of using the filtered HNSW. Datasets on the enterprise plan with custom metadata indices will perform better with the filtered HNSW instead. When false, the server will use the filtered HNSW index to filter chunks. When true, the server will perform a full scan over the metadata JSONB column to filter chunks. Default is true. | [optional] |
7
8
  | **must** | [**Array&lt;ConditionType&gt;**](ConditionType.md) | All of these field conditions have to match for the chunk to be included in the result set. | [optional] |
8
9
  | **must_not** | [**Array&lt;ConditionType&gt;**](ConditionType.md) | None of these field conditions can match for the chunk to be included in the result set. | [optional] |
9
10
  | **should** | [**Array&lt;ConditionType&gt;**](ConditionType.md) | Only one of these field conditions has to match for the chunk to be included in the result set. | [optional] |
@@ -14,6 +15,7 @@
14
15
  require 'trieve_ruby_client'
15
16
 
16
17
  instance = TrieveRubyClient::ChunkFilter.new(
18
+ jsonb_prefilter: null,
17
19
  must: null,
18
20
  must_not: null,
19
21
  should: null
@@ -0,0 +1,36 @@
1
+ # TrieveRubyClient::ChunkGroupAndFileId
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **created_at** | **Time** | | |
8
+ | **dataset_id** | **String** | | |
9
+ | **description** | **String** | | |
10
+ | **file_id** | **String** | | [optional] |
11
+ | **id** | **String** | | |
12
+ | **metadata** | **Object** | | [optional] |
13
+ | **name** | **String** | | |
14
+ | **tag_set** | **Array&lt;String&gt;** | | [optional] |
15
+ | **tracking_id** | **String** | | [optional] |
16
+ | **updated_at** | **Time** | | |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'trieve_ruby_client'
22
+
23
+ instance = TrieveRubyClient::ChunkGroupAndFileId.new(
24
+ created_at: null,
25
+ dataset_id: null,
26
+ description: null,
27
+ file_id: null,
28
+ id: null,
29
+ metadata: null,
30
+ name: null,
31
+ tag_set: null,
32
+ tracking_id: null,
33
+ updated_at: null
34
+ )
35
+ ```
36
+