trieve_ruby_client 0.8.2 → 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 (498) hide show
  1. checksums.yaml +4 -4
  2. data/GENERATE_COMMAND.txt +2 -0
  3. data/README.md +153 -41
  4. data/docs/APIVersion.md +15 -0
  5. data/docs/AnalyticsApi.md +303 -0
  6. data/docs/ApiKeyRespBody.md +32 -0
  7. data/docs/AuthApi.md +4 -4
  8. data/docs/AutocompleteData.md +42 -0
  9. data/docs/AutocompleteReqPayload.md +54 -0
  10. data/docs/BookmarkGroupResponse.md +49 -0
  11. data/docs/BookmarkGroupResult.md +1 -1
  12. data/docs/BoostPhrase.md +20 -0
  13. data/docs/ChatMessageProxy.md +1 -1
  14. data/docs/ChunkApi.md +269 -93
  15. data/docs/ChunkData.md +3 -1
  16. data/docs/ChunkFilter.md +5 -3
  17. data/docs/ChunkGroup.md +1 -1
  18. data/docs/ChunkGroupAndFileId.md +36 -0
  19. data/docs/ChunkGroupApi.md +136 -114
  20. data/docs/ChunkMetadata.md +6 -2
  21. data/docs/ChunkMetadataStringTagSet.md +46 -0
  22. data/docs/ChunkMetadataTypes.md +51 -0
  23. data/docs/ChunkMetadataWithScore.md +1 -1
  24. data/docs/ChunkReqPayload.md +50 -0
  25. data/docs/ChunkReturnTypes.md +49 -0
  26. data/docs/ClientDatasetConfiguration.md +0 -2
  27. data/docs/ClusterAnalytics.md +63 -0
  28. data/docs/ClusterAnalyticsFilter.md +18 -0
  29. data/docs/ClusterAnalyticsResponse.md +49 -0
  30. data/docs/ClusterQueries.md +22 -0
  31. data/docs/ClusterTopics.md +20 -0
  32. data/docs/ConditionType.md +49 -0
  33. data/docs/ContentChunkMetadata.md +32 -0
  34. data/docs/CountChunkQueryResponseBody.md +18 -0
  35. data/docs/CountChunksReqPayload.md +26 -0
  36. data/docs/CountQueries.md +20 -0
  37. data/docs/CreateChunkGroupReqPayload.md +28 -0
  38. data/docs/CreateChunkReqPayloadEnum.md +49 -0
  39. data/docs/CreateDatasetRequest.md +2 -2
  40. data/docs/CreateMessageData.md +2 -2
  41. data/docs/CreateMessageReqPayload.md +52 -0
  42. data/docs/CreateSetupCheckoutSessionResPayload.md +18 -0
  43. data/docs/CreateTopicReqPayload.md +22 -0
  44. data/docs/Dataset.md +2 -2
  45. data/docs/DatasetAnalytics.md +28 -0
  46. data/docs/DatasetApi.md +184 -32
  47. data/docs/DatasetDTO.md +0 -2
  48. data/docs/DateRange.md +24 -0
  49. data/docs/DeprecatedSearchOverGroupsResponseBody.md +20 -0
  50. data/docs/DistancePhrase.md +20 -0
  51. data/docs/EditMessageReqPayload.md +54 -0
  52. data/docs/Event.md +3 -5
  53. data/docs/EventTypeRequest.md +15 -0
  54. data/docs/EventsApi.md +1 -1
  55. data/docs/FieldCondition.md +2 -0
  56. data/docs/File.md +1 -1
  57. data/docs/FileApi.md +10 -10
  58. data/docs/GenerateChunksRequest.md +13 -1
  59. data/docs/GeoInfoWithBias.md +20 -0
  60. data/docs/GetChunksForGroupsResponse.md +22 -0
  61. data/docs/GetDatasetsPagination.md +20 -0
  62. data/docs/GetEventsData.md +1 -1
  63. data/docs/Granularity.md +15 -0
  64. data/docs/GroupData.md +1 -1
  65. data/docs/GroupScoreChunk.md +14 -0
  66. data/docs/GroupsBookmarkQueryResult.md +22 -0
  67. data/docs/HasIDCondition.md +20 -0
  68. data/docs/HeadQueries.md +20 -0
  69. data/docs/HeadQueries1.md +22 -0
  70. data/docs/HeadQueryResponse.md +18 -0
  71. data/docs/HealthApi.md +1 -1
  72. data/docs/InvitationApi.md +1 -1
  73. data/docs/LatencyGraph.md +22 -0
  74. data/docs/LatencyGraphResponse.md +18 -0
  75. data/docs/LowConfidenceQueries.md +24 -0
  76. data/docs/LowConfidenceRecommendations.md +24 -0
  77. data/docs/MatchCondition.md +3 -1
  78. data/docs/MessageApi.md +43 -43
  79. data/docs/MetricsApi.md +76 -0
  80. data/docs/NewChunkMetadataTypes.md +51 -0
  81. data/docs/NoResultQueries.md +22 -0
  82. data/docs/Organization.md +2 -0
  83. data/docs/OrganizationApi.md +27 -28
  84. data/docs/QueryCountResponse.md +18 -0
  85. data/docs/QueryDetails.md +20 -0
  86. data/docs/RAGAnalytics.md +63 -0
  87. data/docs/RAGAnalyticsFilter.md +20 -0
  88. data/docs/RAGAnalyticsResponse.md +49 -0
  89. data/docs/RAGQueries.md +26 -0
  90. data/docs/RAGUsage.md +20 -0
  91. data/docs/RAGUsageResponse.md +18 -0
  92. data/docs/RPSGraph.md +22 -0
  93. data/docs/RPSGraphResponse.md +18 -0
  94. data/docs/RagQueryEvent.md +30 -0
  95. data/docs/RagQueryResponse.md +18 -0
  96. data/docs/RagTypes.md +15 -0
  97. data/docs/RangeCondition.md +1 -3
  98. data/docs/RecommendChunksRequest.md +2 -2
  99. data/docs/RecommendChunksResponseBody.md +18 -0
  100. data/docs/RecommendGroupChunksRequest.md +2 -2
  101. data/docs/RecommendGroupsResponse.md +49 -0
  102. data/docs/RecommendGroupsResponseBody.md +18 -0
  103. data/docs/RecommendResponseTypes.md +49 -0
  104. data/docs/RecommendType.md +15 -0
  105. data/docs/RecommendationAnalytics.md +63 -0
  106. data/docs/RecommendationAnalyticsFilter.md +20 -0
  107. data/docs/RecommendationAnalyticsResponse.md +47 -0
  108. data/docs/RecommendationEvent.md +38 -0
  109. data/docs/RecommendationQueries.md +26 -0
  110. data/docs/RecommendationStrategy.md +15 -0
  111. data/docs/RecommendationType.md +15 -0
  112. data/docs/RecommendationsEventResponse.md +18 -0
  113. data/docs/RegenerateMessageReqPayload.md +48 -0
  114. data/docs/RemoveChunkFromGroupReqPayload.md +18 -0
  115. data/docs/RoleProxy.md +15 -0
  116. data/docs/ScoreChunk.md +22 -0
  117. data/docs/ScoreChunkDTO.md +3 -1
  118. data/docs/SearchAnalytics.md +77 -0
  119. data/docs/SearchAnalyticsFilter.md +22 -0
  120. data/docs/SearchAnalyticsResponse.md +59 -0
  121. data/docs/SearchChunkData.md +9 -3
  122. data/docs/SearchChunksReqPayload.md +56 -0
  123. data/docs/SearchClusterResponse.md +18 -0
  124. data/docs/SearchClusterTopics.md +28 -0
  125. data/docs/SearchGroupResponseTypes.md +49 -0
  126. data/docs/SearchLatencyGraph.md +20 -0
  127. data/docs/SearchMethod.md +15 -0
  128. data/docs/SearchMetrics.md +20 -0
  129. data/docs/SearchOverGroupsData.md +12 -6
  130. data/docs/SearchOverGroupsResponseBody.md +4 -4
  131. data/docs/SearchOverGroupsResponseTypes.md +4 -4
  132. data/docs/SearchOverGroupsResults.md +6 -4
  133. data/docs/SearchQueries.md +26 -0
  134. data/docs/SearchQueryEvent.md +34 -0
  135. data/docs/SearchQueryResponse.md +18 -0
  136. data/docs/SearchRPSGraph.md +20 -0
  137. data/docs/SearchResponseBody.md +20 -0
  138. data/docs/SearchResponseTypes.md +49 -0
  139. data/docs/SearchResultType.md +49 -0
  140. data/docs/SearchType.md +15 -0
  141. data/docs/SearchTypeCount.md +22 -0
  142. data/docs/SearchWithinGroupData.md +18 -4
  143. data/docs/SearchWithinGroupResponseBody.md +20 -0
  144. data/docs/SearchWithinGroupResults.md +1 -1
  145. data/docs/SetUserApiKeyRequest.md +4 -0
  146. data/docs/SlimChunkMetadata.md +5 -1
  147. data/docs/SlimChunkMetadataWithArrayTagSet.md +44 -0
  148. data/docs/SlimChunkMetadataWithScore.md +1 -1
  149. data/docs/SortBy.md +15 -0
  150. data/docs/SortOrder.md +15 -0
  151. data/docs/StripeApi.md +134 -4
  152. data/docs/StripeInvoice.md +28 -0
  153. data/docs/SuggestedQueriesReqPayload.md +18 -0
  154. data/docs/TopicApi.md +16 -16
  155. data/docs/UpdateChunkData.md +2 -0
  156. data/docs/UpdateChunkGroupData.md +3 -1
  157. data/docs/UpdateChunkReqPayload.md +48 -0
  158. data/docs/UpdateDatasetRequest.md +2 -0
  159. data/docs/UpdateGroupByTrackingIDReqPayload.md +26 -0
  160. data/docs/UpdateTopicReqPayload.md +20 -0
  161. data/docs/UpdateUserOrgRoleData.md +1 -1
  162. data/docs/UploadFileReqPayload.md +40 -0
  163. data/docs/UserApi.md +9 -10
  164. data/lib/trieve_ruby_client/api/analytics_api.rb +322 -0
  165. data/lib/trieve_ruby_client/api/auth_api.rb +9 -9
  166. data/lib/trieve_ruby_client/api/chunk_api.rb +274 -103
  167. data/lib/trieve_ruby_client/api/chunk_group_api.rb +161 -139
  168. data/lib/trieve_ruby_client/api/dataset_api.rb +183 -38
  169. data/lib/trieve_ruby_client/api/events_api.rb +3 -3
  170. data/lib/trieve_ruby_client/api/file_api.rb +18 -18
  171. data/lib/trieve_ruby_client/api/health_api.rb +3 -3
  172. data/lib/trieve_ruby_client/api/invitation_api.rb +3 -3
  173. data/lib/trieve_ruby_client/api/message_api.rb +52 -52
  174. data/lib/trieve_ruby_client/api/metrics_api.rb +79 -0
  175. data/lib/trieve_ruby_client/api/organization_api.rb +33 -33
  176. data/lib/trieve_ruby_client/api/stripe_api.rb +135 -9
  177. data/lib/trieve_ruby_client/api/topic_api.rb +27 -27
  178. data/lib/trieve_ruby_client/api/user_api.rb +12 -12
  179. data/lib/trieve_ruby_client/api_client.rb +1 -1
  180. data/lib/trieve_ruby_client/api_error.rb +1 -1
  181. data/lib/trieve_ruby_client/configuration.rb +8 -1
  182. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  183. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  184. data/lib/trieve_ruby_client/models/api_key_resp_body.rb +325 -0
  185. data/lib/trieve_ruby_client/models/api_version.rb +40 -0
  186. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  187. data/lib/trieve_ruby_client/models/autocomplete_data.rb +378 -0
  188. data/lib/trieve_ruby_client/models/autocomplete_req_payload.rb +509 -0
  189. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  190. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  191. data/lib/trieve_ruby_client/models/bookmark_group_response.rb +105 -0
  192. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +2 -2
  193. data/lib/trieve_ruby_client/models/boost_phrase.rb +240 -0
  194. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +24 -2
  195. data/lib/trieve_ruby_client/models/chunk_data.rb +16 -9
  196. data/lib/trieve_ruby_client/models/chunk_filter.rb +16 -5
  197. data/lib/trieve_ruby_client/models/chunk_group.rb +5 -3
  198. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  199. data/lib/trieve_ruby_client/models/chunk_group_and_file_id.rb +343 -0
  200. data/lib/trieve_ruby_client/models/chunk_metadata.rb +35 -5
  201. data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +393 -0
  202. data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +106 -0
  203. data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +8 -2
  204. data/lib/trieve_ruby_client/models/chunk_req_payload.rb +397 -0
  205. data/lib/trieve_ruby_client/models/chunk_return_types.rb +105 -0
  206. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +2 -18
  207. data/lib/trieve_ruby_client/models/cluster_analytics.rb +43 -0
  208. data/lib/trieve_ruby_client/models/cluster_analytics_filter.rb +215 -0
  209. data/lib/trieve_ruby_client/models/cluster_analytics_response.rb +105 -0
  210. data/lib/trieve_ruby_client/models/cluster_queries.rb +296 -0
  211. data/lib/trieve_ruby_client/models/cluster_topics.rb +265 -0
  212. data/lib/trieve_ruby_client/models/condition_type.rb +105 -0
  213. data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +305 -0
  214. data/lib/trieve_ruby_client/models/count_chunk_query_response_body.rb +240 -0
  215. data/lib/trieve_ruby_client/models/count_chunks_req_payload.rb +307 -0
  216. data/lib/trieve_ruby_client/models/count_queries.rb +265 -0
  217. data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
  218. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  219. data/lib/trieve_ruby_client/models/create_chunk_group_req_payload.rb +273 -0
  220. data/lib/trieve_ruby_client/models/create_chunk_req_payload_enum.rb +105 -0
  221. data/lib/trieve_ruby_client/models/create_dataset_request.rb +3 -3
  222. data/lib/trieve_ruby_client/models/create_message_data.rb +13 -13
  223. data/lib/trieve_ruby_client/models/create_message_req_payload.rb +469 -0
  224. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  225. data/lib/trieve_ruby_client/models/create_setup_checkout_session_res_payload.rb +221 -0
  226. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  227. data/lib/trieve_ruby_client/models/create_topic_req_payload.rb +244 -0
  228. data/lib/trieve_ruby_client/models/dataset.rb +18 -14
  229. data/lib/trieve_ruby_client/models/dataset_analytics.rb +301 -0
  230. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  231. data/lib/trieve_ruby_client/models/dataset_dto.rb +2 -14
  232. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  233. data/lib/trieve_ruby_client/models/date_range.rb +245 -0
  234. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  235. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  236. data/lib/trieve_ruby_client/models/deprecated_search_over_groups_response_body.rb +239 -0
  237. data/lib/trieve_ruby_client/models/distance_phrase.rb +240 -0
  238. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  239. data/lib/trieve_ruby_client/models/edit_message_req_payload.rb +486 -0
  240. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  241. data/lib/trieve_ruby_client/models/event.rb +12 -24
  242. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  243. data/lib/trieve_ruby_client/models/event_type_request.rb +49 -0
  244. data/lib/trieve_ruby_client/models/field_condition.rb +12 -2
  245. data/lib/trieve_ruby_client/models/file.rb +5 -3
  246. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  247. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +89 -6
  248. data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
  249. data/lib/trieve_ruby_client/models/geo_info_with_bias.rb +237 -0
  250. data/lib/trieve_ruby_client/models/geo_types.rb +1 -1
  251. data/lib/trieve_ruby_client/models/get_chunks_data.rb +1 -1
  252. data/lib/trieve_ruby_client/models/get_chunks_for_groups_response.rb +274 -0
  253. data/lib/trieve_ruby_client/models/get_datasets_pagination.rb +225 -0
  254. data/lib/trieve_ruby_client/models/get_events_data.rb +2 -2
  255. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  256. data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +1 -1
  257. data/lib/trieve_ruby_client/models/granularity.rb +42 -0
  258. data/lib/trieve_ruby_client/models/group_data.rb +2 -2
  259. data/lib/trieve_ruby_client/models/group_score_chunk.rb +92 -2
  260. data/lib/trieve_ruby_client/models/groups_bookmark_query_result.rb +274 -0
  261. data/lib/trieve_ruby_client/models/has_id_condition.rb +229 -0
  262. data/lib/trieve_ruby_client/models/head_queries.rb +237 -0
  263. data/lib/trieve_ruby_client/models/head_queries1.rb +290 -0
  264. data/lib/trieve_ruby_client/models/head_query_response.rb +223 -0
  265. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  266. data/lib/trieve_ruby_client/models/latency_graph.rb +275 -0
  267. data/lib/trieve_ruby_client/models/latency_graph_response.rb +223 -0
  268. data/lib/trieve_ruby_client/models/location_bounding_box.rb +1 -1
  269. data/lib/trieve_ruby_client/models/location_polygon.rb +1 -1
  270. data/lib/trieve_ruby_client/models/location_radius.rb +1 -1
  271. data/lib/trieve_ruby_client/models/low_confidence_queries.rb +300 -0
  272. data/lib/trieve_ruby_client/models/low_confidence_recommendations.rb +300 -0
  273. data/lib/trieve_ruby_client/models/match_condition.rb +2 -1
  274. data/lib/trieve_ruby_client/models/message.rb +1 -1
  275. data/lib/trieve_ruby_client/models/new_chunk_metadata_types.rb +106 -0
  276. data/lib/trieve_ruby_client/models/no_result_queries.rb +290 -0
  277. data/lib/trieve_ruby_client/models/organization.rb +18 -2
  278. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  279. data/lib/trieve_ruby_client/models/query_count_response.rb +223 -0
  280. data/lib/trieve_ruby_client/models/query_details.rb +271 -0
  281. data/lib/trieve_ruby_client/models/rag_analytics.rb +43 -0
  282. data/lib/trieve_ruby_client/models/rag_analytics_filter.rb +247 -0
  283. data/lib/trieve_ruby_client/models/rag_analytics_response.rb +105 -0
  284. data/lib/trieve_ruby_client/models/rag_queries.rb +310 -0
  285. data/lib/trieve_ruby_client/models/rag_query_event.rb +319 -0
  286. data/lib/trieve_ruby_client/models/rag_query_response.rb +223 -0
  287. data/lib/trieve_ruby_client/models/rag_types.rb +40 -0
  288. data/lib/trieve_ruby_client/models/rag_usage.rb +265 -0
  289. data/lib/trieve_ruby_client/models/rag_usage_response.rb +240 -0
  290. data/lib/trieve_ruby_client/models/range.rb +1 -1
  291. data/lib/trieve_ruby_client/models/range_condition.rb +2 -3
  292. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +25 -5
  293. data/lib/trieve_ruby_client/models/recommend_chunks_response_body.rb +223 -0
  294. data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +25 -5
  295. data/lib/trieve_ruby_client/models/recommend_groups_response.rb +105 -0
  296. data/lib/trieve_ruby_client/models/recommend_groups_response_body.rb +223 -0
  297. data/lib/trieve_ruby_client/models/recommend_response_types.rb +105 -0
  298. data/lib/trieve_ruby_client/models/recommend_type.rb +40 -0
  299. data/lib/trieve_ruby_client/models/recommendation_analytics.rb +43 -0
  300. data/lib/trieve_ruby_client/models/recommendation_analytics_filter.rb +247 -0
  301. data/lib/trieve_ruby_client/models/recommendation_analytics_response.rb +104 -0
  302. data/lib/trieve_ruby_client/models/recommendation_event.rb +391 -0
  303. data/lib/trieve_ruby_client/models/recommendation_queries.rb +310 -0
  304. data/lib/trieve_ruby_client/models/recommendation_strategy.rb +40 -0
  305. data/lib/trieve_ruby_client/models/recommendation_type.rb +40 -0
  306. data/lib/trieve_ruby_client/models/recommendations_event_response.rb +223 -0
  307. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  308. data/lib/trieve_ruby_client/models/regenerate_message_req_payload.rb +441 -0
  309. data/lib/trieve_ruby_client/models/remove_chunk_from_group_req_payload.rb +222 -0
  310. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  311. data/lib/trieve_ruby_client/models/role_proxy.rb +41 -0
  312. data/lib/trieve_ruby_client/models/rps_graph.rb +275 -0
  313. data/lib/trieve_ruby_client/models/rps_graph_response.rb +223 -0
  314. data/lib/trieve_ruby_client/models/score_chunk.rb +249 -0
  315. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +15 -3
  316. data/lib/trieve_ruby_client/models/search_analytics.rb +50 -0
  317. data/lib/trieve_ruby_client/models/search_analytics_filter.rb +257 -0
  318. data/lib/trieve_ruby_client/models/search_analytics_response.rb +110 -0
  319. data/lib/trieve_ruby_client/models/search_chunk_data.rb +40 -5
  320. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  321. data/lib/trieve_ruby_client/models/search_chunks_req_payload.rb +535 -0
  322. data/lib/trieve_ruby_client/models/search_cluster_response.rb +223 -0
  323. data/lib/trieve_ruby_client/models/search_cluster_topics.rb +301 -0
  324. data/lib/trieve_ruby_client/models/search_group_response_types.rb +105 -0
  325. data/lib/trieve_ruby_client/models/search_latency_graph.rb +237 -0
  326. data/lib/trieve_ruby_client/models/search_method.rb +42 -0
  327. data/lib/trieve_ruby_client/models/search_metrics.rb +265 -0
  328. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +117 -18
  329. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +23 -23
  330. data/lib/trieve_ruby_client/models/search_over_groups_response_types.rb +3 -3
  331. data/lib/trieve_ruby_client/models/search_over_groups_results.rb +33 -23
  332. data/lib/trieve_ruby_client/models/search_queries.rb +310 -0
  333. data/lib/trieve_ruby_client/models/search_query_event.rb +351 -0
  334. data/lib/trieve_ruby_client/models/search_query_response.rb +223 -0
  335. data/lib/trieve_ruby_client/models/search_response_body.rb +239 -0
  336. data/lib/trieve_ruby_client/models/search_response_types.rb +105 -0
  337. data/lib/trieve_ruby_client/models/search_result_type.rb +105 -0
  338. data/lib/trieve_ruby_client/models/search_rps_graph.rb +237 -0
  339. data/lib/trieve_ruby_client/models/search_type.rb +42 -0
  340. data/lib/trieve_ruby_client/models/search_type_count.rb +253 -0
  341. data/lib/trieve_ruby_client/models/search_within_group_data.rb +151 -7
  342. data/lib/trieve_ruby_client/models/search_within_group_response_body.rb +239 -0
  343. data/lib/trieve_ruby_client/models/search_within_group_results.rb +2 -2
  344. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +28 -2
  345. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  346. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  347. data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +31 -3
  348. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_array_tag_set.rb +385 -0
  349. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +8 -2
  350. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  351. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  352. data/lib/trieve_ruby_client/models/sort_by.rb +41 -0
  353. data/lib/trieve_ruby_client/models/sort_order.rb +40 -0
  354. data/lib/trieve_ruby_client/models/stripe_invoice.rb +301 -0
  355. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  356. data/lib/trieve_ruby_client/models/suggested_queries_req_payload.rb +222 -0
  357. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  358. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  359. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  360. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  361. data/lib/trieve_ruby_client/models/update_chunk_data.rb +15 -2
  362. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +17 -6
  363. data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +386 -0
  364. data/lib/trieve_ruby_client/models/update_dataset_request.rb +13 -2
  365. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  366. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_req_payload.rb +268 -0
  367. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  368. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  369. data/lib/trieve_ruby_client/models/update_topic_req_payload.rb +239 -0
  370. data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +2 -2
  371. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  372. data/lib/trieve_ruby_client/models/upload_file_req_payload.rb +368 -0
  373. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  374. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  375. data/lib/trieve_ruby_client/version.rb +2 -2
  376. data/lib/trieve_ruby_client.rb +110 -24
  377. data/openapi-generator.yaml +2 -2
  378. data/openapi.json +4491 -1230
  379. data/spec/api/analytics_api_spec.rb +87 -0
  380. data/spec/api/metrics_api_spec.rb +46 -0
  381. data/spec/models/api_key_resp_body_spec.rb +78 -0
  382. data/spec/models/api_version_spec.rb +30 -0
  383. data/spec/models/autocomplete_data_spec.rb +108 -0
  384. data/spec/models/autocomplete_req_payload_spec.rb +132 -0
  385. data/spec/models/bookmark_group_response_spec.rb +32 -0
  386. data/spec/models/boost_phrase_spec.rb +42 -0
  387. data/spec/models/chunk_group_and_file_id_spec.rb +90 -0
  388. data/spec/models/chunk_metadata_string_tag_set_spec.rb +120 -0
  389. data/spec/models/chunk_metadata_types_spec.rb +32 -0
  390. data/spec/models/chunk_req_payload_spec.rb +132 -0
  391. data/spec/models/chunk_return_types_spec.rb +32 -0
  392. data/spec/models/cluster_analytics_filter_spec.rb +36 -0
  393. data/spec/models/cluster_analytics_response_spec.rb +32 -0
  394. data/spec/models/cluster_analytics_spec.rb +38 -0
  395. data/spec/models/cluster_queries_spec.rb +52 -0
  396. data/spec/models/cluster_topics_spec.rb +46 -0
  397. data/spec/models/condition_type_spec.rb +32 -0
  398. data/spec/models/content_chunk_metadata_spec.rb +72 -0
  399. data/spec/models/count_chunk_query_response_body_spec.rb +36 -0
  400. data/spec/models/count_chunks_req_payload_spec.rb +60 -0
  401. data/spec/models/count_queries_spec.rb +46 -0
  402. data/spec/models/create_chunk_group_req_payload_spec.rb +66 -0
  403. data/spec/models/create_chunk_req_payload_enum_spec.rb +32 -0
  404. data/spec/models/create_message_req_payload_spec.rb +108 -0
  405. data/spec/models/create_setup_checkout_session_res_payload_spec.rb +36 -0
  406. data/spec/models/create_topic_req_payload_spec.rb +48 -0
  407. data/spec/models/dataset_analytics_spec.rb +66 -0
  408. data/spec/models/date_range_spec.rb +54 -0
  409. data/spec/models/deprecated_search_over_groups_response_body_spec.rb +42 -0
  410. data/spec/models/distance_phrase_spec.rb +42 -0
  411. data/spec/models/edit_message_req_payload_spec.rb +114 -0
  412. data/spec/models/event_type_request_spec.rb +30 -0
  413. data/spec/models/geo_info_with_bias_spec.rb +42 -0
  414. data/spec/models/get_chunks_for_groups_response_spec.rb +48 -0
  415. data/spec/models/get_datasets_pagination_spec.rb +42 -0
  416. data/spec/models/granularity_spec.rb +30 -0
  417. data/spec/models/groups_bookmark_query_result_spec.rb +48 -0
  418. data/spec/models/has_id_condition_spec.rb +42 -0
  419. data/spec/models/head_queries1_spec.rb +52 -0
  420. data/spec/models/head_queries_spec.rb +42 -0
  421. data/spec/models/head_query_response_spec.rb +36 -0
  422. data/spec/models/latency_graph_response_spec.rb +36 -0
  423. data/spec/models/latency_graph_spec.rb +52 -0
  424. data/spec/models/low_confidence_queries_spec.rb +58 -0
  425. data/spec/models/low_confidence_recommendations_spec.rb +58 -0
  426. data/spec/models/new_chunk_metadata_types_spec.rb +32 -0
  427. data/spec/models/no_result_queries_spec.rb +52 -0
  428. data/spec/models/query_count_response_spec.rb +36 -0
  429. data/spec/models/query_details_spec.rb +46 -0
  430. data/spec/models/rag_analytics_filter_spec.rb +42 -0
  431. data/spec/models/rag_analytics_response_spec.rb +32 -0
  432. data/spec/models/rag_analytics_spec.rb +38 -0
  433. data/spec/models/rag_queries_spec.rb +64 -0
  434. data/spec/models/rag_query_event_spec.rb +72 -0
  435. data/spec/models/rag_query_response_spec.rb +36 -0
  436. data/spec/models/rag_types_spec.rb +30 -0
  437. data/spec/models/rag_usage_response_spec.rb +36 -0
  438. data/spec/models/rag_usage_spec.rb +46 -0
  439. data/spec/models/recommend_chunks_response_body_spec.rb +36 -0
  440. data/spec/models/recommend_groups_response_body_spec.rb +36 -0
  441. data/spec/models/recommend_groups_response_spec.rb +32 -0
  442. data/spec/models/recommend_response_types_spec.rb +32 -0
  443. data/spec/models/recommend_type_spec.rb +30 -0
  444. data/spec/models/recommendation_analytics_filter_spec.rb +42 -0
  445. data/spec/models/recommendation_analytics_response_spec.rb +32 -0
  446. data/spec/models/recommendation_analytics_spec.rb +38 -0
  447. data/spec/models/recommendation_event_spec.rb +96 -0
  448. data/spec/models/recommendation_queries_spec.rb +64 -0
  449. data/spec/models/recommendation_strategy_spec.rb +30 -0
  450. data/spec/models/recommendation_type_spec.rb +30 -0
  451. data/spec/models/recommendations_event_response_spec.rb +36 -0
  452. data/spec/models/regenerate_message_req_payload_spec.rb +102 -0
  453. data/spec/models/remove_chunk_from_group_req_payload_spec.rb +36 -0
  454. data/spec/models/role_proxy_spec.rb +30 -0
  455. data/spec/models/rps_graph_response_spec.rb +36 -0
  456. data/spec/models/rps_graph_spec.rb +52 -0
  457. data/spec/models/score_chunk_spec.rb +48 -0
  458. data/spec/models/search_analytics_filter_spec.rb +48 -0
  459. data/spec/models/search_analytics_response_spec.rb +32 -0
  460. data/spec/models/search_analytics_spec.rb +38 -0
  461. data/spec/models/search_chunks_req_payload_spec.rb +144 -0
  462. data/spec/models/search_cluster_response_spec.rb +36 -0
  463. data/spec/models/search_cluster_topics_spec.rb +66 -0
  464. data/spec/models/search_group_response_types_spec.rb +32 -0
  465. data/spec/models/search_latency_graph_spec.rb +42 -0
  466. data/spec/models/search_method_spec.rb +30 -0
  467. data/spec/models/search_metrics_spec.rb +46 -0
  468. data/spec/models/search_queries_spec.rb +64 -0
  469. data/spec/models/search_query_event_spec.rb +84 -0
  470. data/spec/models/search_query_response_spec.rb +36 -0
  471. data/spec/models/search_response_body_spec.rb +42 -0
  472. data/spec/models/search_response_types_spec.rb +32 -0
  473. data/spec/models/search_result_type_spec.rb +32 -0
  474. data/spec/models/search_rps_graph_spec.rb +42 -0
  475. data/spec/models/search_type_count_spec.rb +48 -0
  476. data/spec/models/search_type_spec.rb +30 -0
  477. data/spec/models/search_within_group_response_body_spec.rb +42 -0
  478. data/spec/models/slim_chunk_metadata_with_array_tag_set_spec.rb +114 -0
  479. data/spec/models/sort_by_spec.rb +30 -0
  480. data/spec/models/sort_order_spec.rb +30 -0
  481. data/spec/models/stripe_invoice_spec.rb +66 -0
  482. data/spec/models/suggested_queries_req_payload_spec.rb +36 -0
  483. data/spec/models/update_chunk_req_payload_spec.rb +120 -0
  484. data/spec/models/update_group_by_tracking_id_req_payload_spec.rb +60 -0
  485. data/spec/models/update_topic_req_payload_spec.rb +42 -0
  486. data/spec/models/upload_file_req_payload_spec.rb +102 -0
  487. data/spec/spec_helper.rb +1 -1
  488. data/trieve_ruby_client.gemspec +1 -1
  489. metadata +534 -111
  490. data/trieve_ruby_client-0.5.0.gem +0 -0
  491. data/trieve_ruby_client-0.5.7.gem +0 -0
  492. data/trieve_ruby_client-0.6.0.gem +0 -0
  493. data/trieve_ruby_client-0.6.2.gem +0 -0
  494. data/trieve_ruby_client-0.6.7.gem +0 -0
  495. data/trieve_ruby_client-0.6.9.gem +0 -0
  496. data/trieve_ruby_client-0.7.2.gem +0 -0
  497. data/trieve_ruby_client-0.7.6.gem +0 -0
  498. data/trieve_ruby_client-0.8.0.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.8.2
6
+ The version of the OpenAPI document: 0.11.0
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -26,12 +26,26 @@ module TrieveRubyClient
26
26
  # Group_tracking_id specifies the group to search within by tracking id. Results will only consist of chunks which are bookmarks within the specified group. If both group_id and group_tracking_id are provided, group_id will be used.
27
27
  attr_accessor :group_tracking_id
28
28
 
29
- # Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"].
29
+ # Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"]. These are the characters that will be used to split the chunk_html into splits for highlighting.
30
30
  attr_accessor :highlight_delimiters
31
31
 
32
- # Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add <b><mark> tags to the chunk_html of the chunks to highlight matching sub-sentences.
32
+ # Set highlight_max_length to control the maximum number of tokens (typically whitespace separated strings, but sometimes also word stems) which can be present within a single highlight. If not specified, this defaults to 8. This is useful to shorten large splits which may have low scores due to length compared to the query. Set to something very large like 100 to highlight entire splits.
33
+ attr_accessor :highlight_max_length
34
+
35
+ # Set highlight_max_num to control the maximum number of highlights per chunk. If not specified, this defaults to 3. It may be less than 3 if no snippets score above the highlight_threshold.
36
+ attr_accessor :highlight_max_num
37
+
38
+ # Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response.
33
39
  attr_accessor :highlight_results
34
40
 
41
+ # Set highlight_threshold to a lower or higher value to adjust the sensitivity of the highlights applied to the chunk html. If not specified, this defaults to 0.8. The range is 0.0 to 1.0.
42
+ attr_accessor :highlight_threshold
43
+
44
+ # Set highlight_window to a number to control the amount of words that are returned around the matched phrases. If not specified, this defaults to 0. This is useful for when you want to show more context around the matched words. When specified, window/2 whitespace separated words are added before and after each highlight in the response's highlights array. If an extended highlight overlaps with another highlight, the overlapping words are only included once.
45
+ attr_accessor :highlight_window
46
+
47
+ attr_accessor :location_bias
48
+
35
49
  # The page of chunks to fetch. Page is 1-indexed.
36
50
  attr_accessor :page
37
51
 
@@ -44,18 +58,45 @@ module TrieveRubyClient
44
58
  # Recency Bias lets you determine how much of an effect the recency of chunks will have on the search results. If not specified, this defaults to 0.0.
45
59
  attr_accessor :recency_bias
46
60
 
47
- # Set score_threshold to a float to filter out chunks with a score below the threshold.
61
+ # Set score_threshold to a float to filter out chunks with a score below the threshold. This threshold applies before weight and bias modifications. If not specified, this defaults to 0.0.
48
62
  attr_accessor :score_threshold
49
63
 
50
- # Search_type can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\" will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \"semantic\" will pull in one page (10 chunks) of the nearest cosine distant vectors. \"fulltext\" will pull in one page (10 chunks) of full-text results based on SPLADE.
51
64
  attr_accessor :search_type
52
65
 
53
66
  # Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typicall 10-50ms). Default is false.
54
67
  attr_accessor :slim_chunks
55
68
 
69
+ # Tag weights is a JSON object which can be used to boost the ranking of chunks with certain tags. This is useful for when you want to be able to bias towards chunks with a certain tag on the fly. The keys are the tag names and the values are the weights.
70
+ attr_accessor :tag_weights
71
+
72
+ # If true, chunks will be reranked using scores from a cross encoder model. \"hybrid\" search will always use the reranker regardless of this setting.
73
+ attr_accessor :use_reranker
74
+
56
75
  # Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true.
57
76
  attr_accessor :use_weights
58
77
 
78
+ class EnumAttributeValidator
79
+ attr_reader :datatype
80
+ attr_reader :allowable_values
81
+
82
+ def initialize(datatype, allowable_values)
83
+ @allowable_values = allowable_values.map do |value|
84
+ case datatype.to_s
85
+ when /Integer/i
86
+ value.to_i
87
+ when /Float/i
88
+ value.to_f
89
+ else
90
+ value
91
+ end
92
+ end
93
+ end
94
+
95
+ def valid?(value)
96
+ !value || allowable_values.include?(value)
97
+ end
98
+ end
99
+
59
100
  # Attribute mapping from ruby-style variable name to JSON key.
60
101
  def self.attribute_map
61
102
  {
@@ -64,7 +105,12 @@ module TrieveRubyClient
64
105
  :'group_id' => :'group_id',
65
106
  :'group_tracking_id' => :'group_tracking_id',
66
107
  :'highlight_delimiters' => :'highlight_delimiters',
108
+ :'highlight_max_length' => :'highlight_max_length',
109
+ :'highlight_max_num' => :'highlight_max_num',
67
110
  :'highlight_results' => :'highlight_results',
111
+ :'highlight_threshold' => :'highlight_threshold',
112
+ :'highlight_window' => :'highlight_window',
113
+ :'location_bias' => :'location_bias',
68
114
  :'page' => :'page',
69
115
  :'page_size' => :'page_size',
70
116
  :'query' => :'query',
@@ -72,6 +118,8 @@ module TrieveRubyClient
72
118
  :'score_threshold' => :'score_threshold',
73
119
  :'search_type' => :'search_type',
74
120
  :'slim_chunks' => :'slim_chunks',
121
+ :'tag_weights' => :'tag_weights',
122
+ :'use_reranker' => :'use_reranker',
75
123
  :'use_weights' => :'use_weights'
76
124
  }
77
125
  end
@@ -89,14 +137,21 @@ module TrieveRubyClient
89
137
  :'group_id' => :'String',
90
138
  :'group_tracking_id' => :'String',
91
139
  :'highlight_delimiters' => :'Array<String>',
140
+ :'highlight_max_length' => :'Integer',
141
+ :'highlight_max_num' => :'Integer',
92
142
  :'highlight_results' => :'Boolean',
143
+ :'highlight_threshold' => :'Float',
144
+ :'highlight_window' => :'Integer',
145
+ :'location_bias' => :'GeoInfoWithBias',
93
146
  :'page' => :'Integer',
94
147
  :'page_size' => :'Integer',
95
148
  :'query' => :'String',
96
149
  :'recency_bias' => :'Float',
97
150
  :'score_threshold' => :'Float',
98
- :'search_type' => :'String',
151
+ :'search_type' => :'SearchMethod',
99
152
  :'slim_chunks' => :'Boolean',
153
+ :'tag_weights' => :'Hash<String, Float>',
154
+ :'use_reranker' => :'Boolean',
100
155
  :'use_weights' => :'Boolean'
101
156
  }
102
157
  end
@@ -109,12 +164,19 @@ module TrieveRubyClient
109
164
  :'group_id',
110
165
  :'group_tracking_id',
111
166
  :'highlight_delimiters',
167
+ :'highlight_max_length',
168
+ :'highlight_max_num',
112
169
  :'highlight_results',
170
+ :'highlight_threshold',
171
+ :'highlight_window',
172
+ :'location_bias',
113
173
  :'page',
114
174
  :'page_size',
115
175
  :'recency_bias',
116
176
  :'score_threshold',
117
177
  :'slim_chunks',
178
+ :'tag_weights',
179
+ :'use_reranker',
118
180
  :'use_weights'
119
181
  ])
120
182
  end
@@ -156,10 +218,30 @@ module TrieveRubyClient
156
218
  end
157
219
  end
158
220
 
221
+ if attributes.key?(:'highlight_max_length')
222
+ self.highlight_max_length = attributes[:'highlight_max_length']
223
+ end
224
+
225
+ if attributes.key?(:'highlight_max_num')
226
+ self.highlight_max_num = attributes[:'highlight_max_num']
227
+ end
228
+
159
229
  if attributes.key?(:'highlight_results')
160
230
  self.highlight_results = attributes[:'highlight_results']
161
231
  end
162
232
 
233
+ if attributes.key?(:'highlight_threshold')
234
+ self.highlight_threshold = attributes[:'highlight_threshold']
235
+ end
236
+
237
+ if attributes.key?(:'highlight_window')
238
+ self.highlight_window = attributes[:'highlight_window']
239
+ end
240
+
241
+ if attributes.key?(:'location_bias')
242
+ self.location_bias = attributes[:'location_bias']
243
+ end
244
+
163
245
  if attributes.key?(:'page')
164
246
  self.page = attributes[:'page']
165
247
  end
@@ -192,6 +274,16 @@ module TrieveRubyClient
192
274
  self.slim_chunks = attributes[:'slim_chunks']
193
275
  end
194
276
 
277
+ if attributes.key?(:'tag_weights')
278
+ if (value = attributes[:'tag_weights']).is_a?(Hash)
279
+ self.tag_weights = value
280
+ end
281
+ end
282
+
283
+ if attributes.key?(:'use_reranker')
284
+ self.use_reranker = attributes[:'use_reranker']
285
+ end
286
+
195
287
  if attributes.key?(:'use_weights')
196
288
  self.use_weights = attributes[:'use_weights']
197
289
  end
@@ -202,6 +294,18 @@ module TrieveRubyClient
202
294
  def list_invalid_properties
203
295
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
204
296
  invalid_properties = Array.new
297
+ if !@highlight_max_length.nil? && @highlight_max_length < 0
298
+ invalid_properties.push('invalid value for "highlight_max_length", must be greater than or equal to 0.')
299
+ end
300
+
301
+ if !@highlight_max_num.nil? && @highlight_max_num < 0
302
+ invalid_properties.push('invalid value for "highlight_max_num", must be greater than or equal to 0.')
303
+ end
304
+
305
+ if !@highlight_window.nil? && @highlight_window < 0
306
+ invalid_properties.push('invalid value for "highlight_window", must be greater than or equal to 0.')
307
+ end
308
+
205
309
  if !@page.nil? && @page < 0
206
310
  invalid_properties.push('invalid value for "page", must be greater than or equal to 0.')
207
311
  end
@@ -225,6 +329,9 @@ module TrieveRubyClient
225
329
  # @return true if the model is valid
226
330
  def valid?
227
331
  warn '[DEPRECATED] the `valid?` method is obsolete'
332
+ return false if !@highlight_max_length.nil? && @highlight_max_length < 0
333
+ return false if !@highlight_max_num.nil? && @highlight_max_num < 0
334
+ return false if !@highlight_window.nil? && @highlight_window < 0
228
335
  return false if !@page.nil? && @page < 0
229
336
  return false if !@page_size.nil? && @page_size < 0
230
337
  return false if @query.nil?
@@ -232,6 +339,36 @@ module TrieveRubyClient
232
339
  true
233
340
  end
234
341
 
342
+ # Custom attribute writer method with validation
343
+ # @param [Object] highlight_max_length Value to be assigned
344
+ def highlight_max_length=(highlight_max_length)
345
+ if !highlight_max_length.nil? && highlight_max_length < 0
346
+ fail ArgumentError, 'invalid value for "highlight_max_length", must be greater than or equal to 0.'
347
+ end
348
+
349
+ @highlight_max_length = highlight_max_length
350
+ end
351
+
352
+ # Custom attribute writer method with validation
353
+ # @param [Object] highlight_max_num Value to be assigned
354
+ def highlight_max_num=(highlight_max_num)
355
+ if !highlight_max_num.nil? && highlight_max_num < 0
356
+ fail ArgumentError, 'invalid value for "highlight_max_num", must be greater than or equal to 0.'
357
+ end
358
+
359
+ @highlight_max_num = highlight_max_num
360
+ end
361
+
362
+ # Custom attribute writer method with validation
363
+ # @param [Object] highlight_window Value to be assigned
364
+ def highlight_window=(highlight_window)
365
+ if !highlight_window.nil? && highlight_window < 0
366
+ fail ArgumentError, 'invalid value for "highlight_window", must be greater than or equal to 0.'
367
+ end
368
+
369
+ @highlight_window = highlight_window
370
+ end
371
+
235
372
  # Custom attribute writer method with validation
236
373
  # @param [Object] page Value to be assigned
237
374
  def page=(page)
@@ -262,7 +399,12 @@ module TrieveRubyClient
262
399
  group_id == o.group_id &&
263
400
  group_tracking_id == o.group_tracking_id &&
264
401
  highlight_delimiters == o.highlight_delimiters &&
402
+ highlight_max_length == o.highlight_max_length &&
403
+ highlight_max_num == o.highlight_max_num &&
265
404
  highlight_results == o.highlight_results &&
405
+ highlight_threshold == o.highlight_threshold &&
406
+ highlight_window == o.highlight_window &&
407
+ location_bias == o.location_bias &&
266
408
  page == o.page &&
267
409
  page_size == o.page_size &&
268
410
  query == o.query &&
@@ -270,6 +412,8 @@ module TrieveRubyClient
270
412
  score_threshold == o.score_threshold &&
271
413
  search_type == o.search_type &&
272
414
  slim_chunks == o.slim_chunks &&
415
+ tag_weights == o.tag_weights &&
416
+ use_reranker == o.use_reranker &&
273
417
  use_weights == o.use_weights
274
418
  end
275
419
 
@@ -282,7 +426,7 @@ module TrieveRubyClient
282
426
  # Calculates hash code according to all attributes.
283
427
  # @return [Integer] Hash code
284
428
  def hash
285
- [filters, get_total_pages, group_id, group_tracking_id, highlight_delimiters, highlight_results, page, page_size, query, recency_bias, score_threshold, search_type, slim_chunks, use_weights].hash
429
+ [filters, get_total_pages, group_id, group_tracking_id, highlight_delimiters, highlight_max_length, highlight_max_num, highlight_results, highlight_threshold, highlight_window, location_bias, page, page_size, query, recency_bias, score_threshold, search_type, slim_chunks, tag_weights, use_reranker, use_weights].hash
286
430
  end
287
431
 
288
432
  # Builds the object from hash
@@ -0,0 +1,239 @@
1
+ =begin
2
+ #Trieve API
3
+
4
+ #Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5
+
6
+ The version of the OpenAPI document: 0.11.0
7
+ Contact: developers@trieve.ai
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrieveRubyClient
17
+ class SearchWithinGroupResponseBody
18
+ attr_accessor :chunks
19
+
20
+ attr_accessor :total_pages
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'chunks' => :'chunks',
26
+ :'total_pages' => :'total_pages'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'chunks' => :'Array<ScoreChunk>',
39
+ :'total_pages' => :'Integer'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::SearchWithinGroupResponseBody` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::SearchWithinGroupResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'chunks')
65
+ if (value = attributes[:'chunks']).is_a?(Array)
66
+ self.chunks = value
67
+ end
68
+ else
69
+ self.chunks = nil
70
+ end
71
+
72
+ if attributes.key?(:'total_pages')
73
+ self.total_pages = attributes[:'total_pages']
74
+ else
75
+ self.total_pages = nil
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ if @chunks.nil?
85
+ invalid_properties.push('invalid value for "chunks", chunks cannot be nil.')
86
+ end
87
+
88
+ if @total_pages.nil?
89
+ invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ return false if @chunks.nil?
100
+ return false if @total_pages.nil?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ chunks == o.chunks &&
110
+ total_pages == o.total_pages
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [chunks, total_pages].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def self._deserialize(type, value)
153
+ case type.to_sym
154
+ when :Time
155
+ Time.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :Boolean
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
+ end
183
+ end
184
+ else # model
185
+ # models (e.g. Pet) or oneOf
186
+ klass = TrieveRubyClient.const_get(type)
187
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+
239
+ end
@@ -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.8.2
6
+ The version of the OpenAPI document: 0.11.0
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -39,7 +39,7 @@ module TrieveRubyClient
39
39
  def self.openapi_types
40
40
  {
41
41
  :'bookmarks' => :'Array<ScoreChunkDTO>',
42
- :'group' => :'ChunkGroup',
42
+ :'group' => :'ChunkGroupAndFileId',
43
43
  :'total_pages' => :'Integer'
44
44
  }
45
45
  end
@@ -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.8.2
6
+ The version of the OpenAPI document: 0.11.0
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -15,16 +15,24 @@ require 'time'
15
15
 
16
16
  module TrieveRubyClient
17
17
  class SetUserApiKeyRequest
18
+ # The dataset ids which the api key will have access to. If not provided or empty, the api key will have access to all datasets the auth'ed user has access to. If both dataset_ids and organization_ids are provided, the api key will have access to the intersection of the datasets and organizations.
19
+ attr_accessor :dataset_ids
20
+
18
21
  # The name which will be assigned to the new api key.
19
22
  attr_accessor :name
20
23
 
24
+ # The organization ids which the api key will have access to. If not provided or empty, the api key will have access to all organizations the auth'ed user has access to.
25
+ attr_accessor :organization_ids
26
+
21
27
  # The role which will be assigned to the new api key. Either 0 (read), 1 (read and write at the level of the currently auth'ed user). The auth'ed user must have a role greater than or equal to the role being assigned which means they must be an admin (1) or owner (2) of the organization to assign write permissions with a role of 1.
22
28
  attr_accessor :role
23
29
 
24
30
  # Attribute mapping from ruby-style variable name to JSON key.
25
31
  def self.attribute_map
26
32
  {
33
+ :'dataset_ids' => :'dataset_ids',
27
34
  :'name' => :'name',
35
+ :'organization_ids' => :'organization_ids',
28
36
  :'role' => :'role'
29
37
  }
30
38
  end
@@ -37,7 +45,9 @@ module TrieveRubyClient
37
45
  # Attribute type mapping.
38
46
  def self.openapi_types
39
47
  {
48
+ :'dataset_ids' => :'Array<String>',
40
49
  :'name' => :'String',
50
+ :'organization_ids' => :'Array<String>',
41
51
  :'role' => :'Integer'
42
52
  }
43
53
  end
@@ -45,6 +55,8 @@ module TrieveRubyClient
45
55
  # List of attributes with nullable: true
46
56
  def self.openapi_nullable
47
57
  Set.new([
58
+ :'dataset_ids',
59
+ :'organization_ids',
48
60
  ])
49
61
  end
50
62
 
@@ -63,12 +75,24 @@ module TrieveRubyClient
63
75
  h[k.to_sym] = v
64
76
  }
65
77
 
78
+ if attributes.key?(:'dataset_ids')
79
+ if (value = attributes[:'dataset_ids']).is_a?(Array)
80
+ self.dataset_ids = value
81
+ end
82
+ end
83
+
66
84
  if attributes.key?(:'name')
67
85
  self.name = attributes[:'name']
68
86
  else
69
87
  self.name = nil
70
88
  end
71
89
 
90
+ if attributes.key?(:'organization_ids')
91
+ if (value = attributes[:'organization_ids']).is_a?(Array)
92
+ self.organization_ids = value
93
+ end
94
+ end
95
+
72
96
  if attributes.key?(:'role')
73
97
  self.role = attributes[:'role']
74
98
  else
@@ -106,7 +130,9 @@ module TrieveRubyClient
106
130
  def ==(o)
107
131
  return true if self.equal?(o)
108
132
  self.class == o.class &&
133
+ dataset_ids == o.dataset_ids &&
109
134
  name == o.name &&
135
+ organization_ids == o.organization_ids &&
110
136
  role == o.role
111
137
  end
112
138
 
@@ -119,7 +145,7 @@ module TrieveRubyClient
119
145
  # Calculates hash code according to all attributes.
120
146
  # @return [Integer] Hash code
121
147
  def hash
122
- [name, role].hash
148
+ [dataset_ids, name, organization_ids, role].hash
123
149
  end
124
150
 
125
151
  # Builds the object from hash
@@ -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.8.2
6
+ The version of the OpenAPI document: 0.11.0
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.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.8.2
6
+ The version of the OpenAPI document: 0.11.0
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0