trieve_ruby_client 0.3.4

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 (272) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +240 -0
  5. data/Rakefile +10 -0
  6. data/docs/AddChunkToGroupData.md +18 -0
  7. data/docs/ApiKeyDTO.md +28 -0
  8. data/docs/AuthApi.md +274 -0
  9. data/docs/BookmarkData.md +22 -0
  10. data/docs/BookmarkGroupResult.md +20 -0
  11. data/docs/ChatMessageProxy.md +20 -0
  12. data/docs/ChunkApi.md +955 -0
  13. data/docs/ChunkFilter.md +22 -0
  14. data/docs/ChunkGroup.md +30 -0
  15. data/docs/ChunkGroupAndFile.md +32 -0
  16. data/docs/ChunkGroupApi.md +1262 -0
  17. data/docs/ChunkMetadata.md +42 -0
  18. data/docs/ChunkMetadataWithFileData.md +44 -0
  19. data/docs/ClientDatasetConfiguration.md +38 -0
  20. data/docs/CreateChunkData.md +42 -0
  21. data/docs/CreateChunkGroupData.md +22 -0
  22. data/docs/CreateDatasetRequest.md +24 -0
  23. data/docs/CreateMessageData.md +28 -0
  24. data/docs/CreateOrganizationData.md +18 -0
  25. data/docs/CreateTopicData.md +22 -0
  26. data/docs/Dataset.md +30 -0
  27. data/docs/DatasetAndUsage.md +20 -0
  28. data/docs/DatasetApi.md +480 -0
  29. data/docs/DatasetDTO.md +28 -0
  30. data/docs/DatasetUsageCount.md +22 -0
  31. data/docs/DeleteDatasetRequest.md +18 -0
  32. data/docs/DeleteTopicData.md +18 -0
  33. data/docs/DeleteUserApiKeyRequest.md +18 -0
  34. data/docs/EditMessageData.md +30 -0
  35. data/docs/ErrorResponseBody.md +18 -0
  36. data/docs/Event.md +28 -0
  37. data/docs/EventReturn.md +20 -0
  38. data/docs/EventsApi.md +86 -0
  39. data/docs/FieldCondition.md +22 -0
  40. data/docs/File.md +36 -0
  41. data/docs/FileApi.md +326 -0
  42. data/docs/FileDTO.md +32 -0
  43. data/docs/GenerateChunksRequest.md +26 -0
  44. data/docs/GetGroupsForChunksData.md +18 -0
  45. data/docs/GroupData.md +20 -0
  46. data/docs/GroupScoreChunkDTO.md +20 -0
  47. data/docs/HealthApi.md +66 -0
  48. data/docs/InvitationApi.md +85 -0
  49. data/docs/InvitationData.md +26 -0
  50. data/docs/MatchCondition.md +49 -0
  51. data/docs/Message.md +38 -0
  52. data/docs/MessageApi.md +322 -0
  53. data/docs/Organization.md +26 -0
  54. data/docs/OrganizationApi.md +479 -0
  55. data/docs/OrganizationUsageCount.md +28 -0
  56. data/docs/Range.md +24 -0
  57. data/docs/ReccomendGroupChunksRequest.md +30 -0
  58. data/docs/RecommendChunksRequest.md +28 -0
  59. data/docs/RegenerateMessageData.md +26 -0
  60. data/docs/ReturnQueuedChunk.md +20 -0
  61. data/docs/ScoreChunkDTO.md +20 -0
  62. data/docs/SearchChunkData.md +38 -0
  63. data/docs/SearchChunkQueryResponseBody.md +20 -0
  64. data/docs/SearchGroupsResult.md +22 -0
  65. data/docs/SearchOverGroupsData.md +36 -0
  66. data/docs/SearchOverGroupsResponseBody.md +20 -0
  67. data/docs/SearchWithinGroupData.md +40 -0
  68. data/docs/SetUserApiKeyRequest.md +20 -0
  69. data/docs/SetUserApiKeyResponse.md +18 -0
  70. data/docs/SlimGroup.md +24 -0
  71. data/docs/SlimUser.md +32 -0
  72. data/docs/StripeApi.md +285 -0
  73. data/docs/StripePlan.md +38 -0
  74. data/docs/StripeSubscription.md +30 -0
  75. data/docs/SuggestedQueriesRequest.md +18 -0
  76. data/docs/SuggestedQueriesResponse.md +18 -0
  77. data/docs/Topic.md +30 -0
  78. data/docs/TopicApi.md +321 -0
  79. data/docs/UpdateChunkByTrackingIdData.md +32 -0
  80. data/docs/UpdateChunkData.md +34 -0
  81. data/docs/UpdateChunkGroupData.md +24 -0
  82. data/docs/UpdateDatasetRequest.md +24 -0
  83. data/docs/UpdateGroupByTrackingIDData.md +22 -0
  84. data/docs/UpdateOrganizationData.md +20 -0
  85. data/docs/UpdateTopicData.md +20 -0
  86. data/docs/UpdateUserData.md +30 -0
  87. data/docs/UploadFileData.md +34 -0
  88. data/docs/UploadFileResult.md +18 -0
  89. data/docs/UserApi.md +238 -0
  90. data/docs/UserOrganization.md +28 -0
  91. data/git_push.sh +57 -0
  92. data/lib/trieve_ruby_client/api/auth_api.rb +262 -0
  93. data/lib/trieve_ruby_client/api/chunk_api.rb +906 -0
  94. data/lib/trieve_ruby_client/api/chunk_group_api.rb +1230 -0
  95. data/lib/trieve_ruby_client/api/dataset_api.rb +458 -0
  96. data/lib/trieve_ruby_client/api/events_api.rb +92 -0
  97. data/lib/trieve_ruby_client/api/file_api.rb +324 -0
  98. data/lib/trieve_ruby_client/api/health_api.rb +75 -0
  99. data/lib/trieve_ruby_client/api/invitation_api.rb +97 -0
  100. data/lib/trieve_ruby_client/api/message_api.rb +317 -0
  101. data/lib/trieve_ruby_client/api/organization_api.rb +445 -0
  102. data/lib/trieve_ruby_client/api/stripe_api.rb +278 -0
  103. data/lib/trieve_ruby_client/api/topic_api.rb +317 -0
  104. data/lib/trieve_ruby_client/api/user_api.rb +226 -0
  105. data/lib/trieve_ruby_client/api_client.rb +394 -0
  106. data/lib/trieve_ruby_client/api_error.rb +58 -0
  107. data/lib/trieve_ruby_client/configuration.rb +305 -0
  108. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +222 -0
  109. data/lib/trieve_ruby_client/models/api_key_dto.rb +301 -0
  110. data/lib/trieve_ruby_client/models/bookmark_data.rb +255 -0
  111. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +239 -0
  112. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +237 -0
  113. data/lib/trieve_ruby_client/models/chunk_filter.rb +244 -0
  114. data/lib/trieve_ruby_client/models/chunk_group.rb +311 -0
  115. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +321 -0
  116. data/lib/trieve_ruby_client/models/chunk_metadata.rb +371 -0
  117. data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +381 -0
  118. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +336 -0
  119. data/lib/trieve_ruby_client/models/create_chunk_data.rb +356 -0
  120. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +250 -0
  121. data/lib/trieve_ruby_client/models/create_dataset_request.rb +265 -0
  122. data/lib/trieve_ruby_client/models/create_message_data.rb +285 -0
  123. data/lib/trieve_ruby_client/models/create_organization_data.rb +222 -0
  124. data/lib/trieve_ruby_client/models/create_topic_data.rb +238 -0
  125. data/lib/trieve_ruby_client/models/dataset.rb +309 -0
  126. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +237 -0
  127. data/lib/trieve_ruby_client/models/dataset_dto.rb +297 -0
  128. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +253 -0
  129. data/lib/trieve_ruby_client/models/delete_dataset_request.rb +222 -0
  130. data/lib/trieve_ruby_client/models/delete_topic_data.rb +222 -0
  131. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +222 -0
  132. data/lib/trieve_ruby_client/models/edit_message_data.rb +302 -0
  133. data/lib/trieve_ruby_client/models/error_response_body.rb +221 -0
  134. data/lib/trieve_ruby_client/models/event.rb +297 -0
  135. data/lib/trieve_ruby_client/models/event_return.rb +239 -0
  136. data/lib/trieve_ruby_client/models/field_condition.rb +245 -0
  137. data/lib/trieve_ruby_client/models/file.rb +341 -0
  138. data/lib/trieve_ruby_client/models/file_dto.rb +321 -0
  139. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +276 -0
  140. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +223 -0
  141. data/lib/trieve_ruby_client/models/group_data.rb +239 -0
  142. data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +239 -0
  143. data/lib/trieve_ruby_client/models/invitation_data.rb +290 -0
  144. data/lib/trieve_ruby_client/models/match_condition.rb +105 -0
  145. data/lib/trieve_ruby_client/models/message.rb +369 -0
  146. data/lib/trieve_ruby_client/models/organization.rb +279 -0
  147. data/lib/trieve_ruby_client/models/organization_usage_count.rb +301 -0
  148. data/lib/trieve_ruby_client/models/range.rb +245 -0
  149. data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +319 -0
  150. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +293 -0
  151. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +268 -0
  152. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +237 -0
  153. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +239 -0
  154. data/lib/trieve_ruby_client/models/search_chunk_data.rb +369 -0
  155. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +239 -0
  156. data/lib/trieve_ruby_client/models/search_groups_result.rb +255 -0
  157. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +372 -0
  158. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +239 -0
  159. data/lib/trieve_ruby_client/models/search_within_group_data.rb +380 -0
  160. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +239 -0
  161. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +222 -0
  162. data/lib/trieve_ruby_client/models/slim_group.rb +269 -0
  163. data/lib/trieve_ruby_client/models/slim_user.rb +319 -0
  164. data/lib/trieve_ruby_client/models/stripe_plan.rb +381 -0
  165. data/lib/trieve_ruby_client/models/stripe_subscription.rb +311 -0
  166. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +222 -0
  167. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +223 -0
  168. data/lib/trieve_ruby_client/models/topic.rb +317 -0
  169. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +303 -0
  170. data/lib/trieve_ruby_client/models/update_chunk_data.rb +308 -0
  171. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +249 -0
  172. data/lib/trieve_ruby_client/models/update_dataset_request.rb +255 -0
  173. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +244 -0
  174. data/lib/trieve_ruby_client/models/update_organization_data.rb +233 -0
  175. data/lib/trieve_ruby_client/models/update_topic_data.rb +239 -0
  176. data/lib/trieve_ruby_client/models/update_user_data.rb +288 -0
  177. data/lib/trieve_ruby_client/models/upload_file_data.rb +324 -0
  178. data/lib/trieve_ruby_client/models/upload_file_result.rb +221 -0
  179. data/lib/trieve_ruby_client/models/user_organization.rb +301 -0
  180. data/lib/trieve_ruby_client/version.rb +15 -0
  181. data/lib/trieve_ruby_client.rb +124 -0
  182. data/openapi-generator.yaml +9 -0
  183. data/openapi.json +6530 -0
  184. data/openapitools.json +7 -0
  185. data/spec/api/auth_api_spec.rb +82 -0
  186. data/spec/api/chunk_api_spec.rb +191 -0
  187. data/spec/api/chunk_group_api_spec.rb +242 -0
  188. data/spec/api/dataset_api_spec.rb +113 -0
  189. data/spec/api/events_api_spec.rb +48 -0
  190. data/spec/api/file_api_spec.rb +89 -0
  191. data/spec/api/health_api_spec.rb +44 -0
  192. data/spec/api/invitation_api_spec.rb +48 -0
  193. data/spec/api/message_api_spec.rb +87 -0
  194. data/spec/api/organization_api_spec.rb +112 -0
  195. data/spec/api/stripe_api_spec.rb +78 -0
  196. data/spec/api/topic_api_spec.rb +87 -0
  197. data/spec/api/user_api_spec.rb +71 -0
  198. data/spec/models/add_chunk_to_group_data_spec.rb +36 -0
  199. data/spec/models/api_key_dto_spec.rb +66 -0
  200. data/spec/models/bookmark_data_spec.rb +48 -0
  201. data/spec/models/bookmark_group_result_spec.rb +42 -0
  202. data/spec/models/chat_message_proxy_spec.rb +42 -0
  203. data/spec/models/chunk_filter_spec.rb +48 -0
  204. data/spec/models/chunk_group_and_file_spec.rb +78 -0
  205. data/spec/models/chunk_group_spec.rb +72 -0
  206. data/spec/models/chunk_metadata_spec.rb +108 -0
  207. data/spec/models/chunk_metadata_with_file_data_spec.rb +114 -0
  208. data/spec/models/client_dataset_configuration_spec.rb +96 -0
  209. data/spec/models/create_chunk_data_spec.rb +108 -0
  210. data/spec/models/create_chunk_group_data_spec.rb +48 -0
  211. data/spec/models/create_dataset_request_spec.rb +54 -0
  212. data/spec/models/create_message_data_spec.rb +66 -0
  213. data/spec/models/create_organization_data_spec.rb +36 -0
  214. data/spec/models/create_topic_data_spec.rb +48 -0
  215. data/spec/models/dataset_and_usage_spec.rb +42 -0
  216. data/spec/models/dataset_dto_spec.rb +66 -0
  217. data/spec/models/dataset_spec.rb +72 -0
  218. data/spec/models/dataset_usage_count_spec.rb +48 -0
  219. data/spec/models/delete_dataset_request_spec.rb +36 -0
  220. data/spec/models/delete_topic_data_spec.rb +36 -0
  221. data/spec/models/delete_user_api_key_request_spec.rb +36 -0
  222. data/spec/models/edit_message_data_spec.rb +72 -0
  223. data/spec/models/error_response_body_spec.rb +36 -0
  224. data/spec/models/event_return_spec.rb +42 -0
  225. data/spec/models/event_spec.rb +66 -0
  226. data/spec/models/field_condition_spec.rb +48 -0
  227. data/spec/models/file_dto_spec.rb +78 -0
  228. data/spec/models/file_spec.rb +90 -0
  229. data/spec/models/generate_chunks_request_spec.rb +60 -0
  230. data/spec/models/get_groups_for_chunks_data_spec.rb +36 -0
  231. data/spec/models/group_data_spec.rb +42 -0
  232. data/spec/models/group_score_chunk_dto_spec.rb +42 -0
  233. data/spec/models/invitation_data_spec.rb +60 -0
  234. data/spec/models/match_condition_spec.rb +32 -0
  235. data/spec/models/message_spec.rb +96 -0
  236. data/spec/models/organization_spec.rb +60 -0
  237. data/spec/models/organization_usage_count_spec.rb +66 -0
  238. data/spec/models/range_spec.rb +54 -0
  239. data/spec/models/reccomend_group_chunks_request_spec.rb +72 -0
  240. data/spec/models/recommend_chunks_request_spec.rb +66 -0
  241. data/spec/models/regenerate_message_data_spec.rb +60 -0
  242. data/spec/models/return_queued_chunk_spec.rb +42 -0
  243. data/spec/models/score_chunk_dto_spec.rb +42 -0
  244. data/spec/models/search_chunk_data_spec.rb +96 -0
  245. data/spec/models/search_chunk_query_response_body_spec.rb +42 -0
  246. data/spec/models/search_groups_result_spec.rb +48 -0
  247. data/spec/models/search_over_groups_data_spec.rb +90 -0
  248. data/spec/models/search_over_groups_response_body_spec.rb +42 -0
  249. data/spec/models/search_within_group_data_spec.rb +102 -0
  250. data/spec/models/set_user_api_key_request_spec.rb +42 -0
  251. data/spec/models/set_user_api_key_response_spec.rb +36 -0
  252. data/spec/models/slim_group_spec.rb +54 -0
  253. data/spec/models/slim_user_spec.rb +78 -0
  254. data/spec/models/stripe_plan_spec.rb +96 -0
  255. data/spec/models/stripe_subscription_spec.rb +72 -0
  256. data/spec/models/suggested_queries_request_spec.rb +36 -0
  257. data/spec/models/suggested_queries_response_spec.rb +36 -0
  258. data/spec/models/topic_spec.rb +72 -0
  259. data/spec/models/update_chunk_by_tracking_id_data_spec.rb +66 -0
  260. data/spec/models/update_chunk_data_spec.rb +72 -0
  261. data/spec/models/update_chunk_group_data_spec.rb +48 -0
  262. data/spec/models/update_dataset_request_spec.rb +54 -0
  263. data/spec/models/update_group_by_tracking_id_data_spec.rb +48 -0
  264. data/spec/models/update_organization_data_spec.rb +42 -0
  265. data/spec/models/update_topic_data_spec.rb +42 -0
  266. data/spec/models/update_user_data_spec.rb +72 -0
  267. data/spec/models/upload_file_data_spec.rb +84 -0
  268. data/spec/models/upload_file_result_spec.rb +36 -0
  269. data/spec/models/user_organization_spec.rb +66 -0
  270. data/spec/spec_helper.rb +111 -0
  271. data/trieve_ruby_client.gemspec +39 -0
  272. metadata +439 -0
data/docs/ChunkApi.md ADDED
@@ -0,0 +1,955 @@
1
+ # TrieveRubyClient::ChunkApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**bulk_create_chunk**](ChunkApi.md#bulk_create_chunk) | **POST** /api/chunk/bulk | bulk_create_chunk |
8
+ | [**create_chunk**](ChunkApi.md#create_chunk) | **POST** /api/chunk | create_chunk |
9
+ | [**create_suggested_queries_handler**](ChunkApi.md#create_suggested_queries_handler) | **POST** /api/chunk/gen_suggestions | get_suggested_queries |
10
+ | [**delete_chunk**](ChunkApi.md#delete_chunk) | **DELETE** /api/{tracking_or_chunk}/{chunk_id} | delete_chunk |
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
+ | [**generate_off_chunks**](ChunkApi.md#generate_off_chunks) | **POST** /api/chunk/generate | augmented_generation_from_chunks |
13
+ | [**get_chunk_by_id**](ChunkApi.md#get_chunk_by_id) | **GET** /api/{tracking_or_chunk}/{chunk_id} | get_chunk |
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 |
15
+ | [**get_recommended_chunks**](ChunkApi.md#get_recommended_chunks) | **POST** /api/chunk/recommend | get_recommended_chunks |
16
+ | [**search_chunk**](ChunkApi.md#search_chunk) | **POST** /api/chunk/search | search |
17
+ | [**update_chunk**](ChunkApi.md#update_chunk) | **PUT** /api/chunk/update | update_chunk |
18
+ | [**update_chunk_by_tracking_id**](ChunkApi.md#update_chunk_by_tracking_id) | **PUT** /api/chunk/tracking_id/update | update_chunk_by_tracking_id |
19
+
20
+
21
+ ## bulk_create_chunk
22
+
23
+ > <ReturnQueuedChunk> bulk_create_chunk(tr_dataset, create_chunk_data)
24
+
25
+ bulk_create_chunk
26
+
27
+ bulk_create_chunk Create a new chunk from an array of chunks. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
28
+
29
+ ### Examples
30
+
31
+ ```ruby
32
+ require 'time'
33
+ require 'trieve_ruby_client'
34
+ # setup authorization
35
+ TrieveRubyClient.configure do |config|
36
+ # Configure API key authorization: Cookie
37
+ config.api_key['Cookie'] = 'YOUR API KEY'
38
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
39
+ # config.api_key_prefix['Cookie'] = 'Bearer'
40
+
41
+ # Configure API key authorization: ApiKey
42
+ config.api_key['ApiKey'] = 'YOUR API KEY'
43
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
44
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
45
+ end
46
+
47
+ api_instance = TrieveRubyClient::ChunkApi.new
48
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
49
+ create_chunk_data = TrieveRubyClient::CreateChunkData.new # CreateChunkData | JSON request payload to create a new chunk (chunk)
50
+
51
+ begin
52
+ # bulk_create_chunk
53
+ result = api_instance.bulk_create_chunk(tr_dataset, create_chunk_data)
54
+ p result
55
+ rescue TrieveRubyClient::ApiError => e
56
+ puts "Error when calling ChunkApi->bulk_create_chunk: #{e}"
57
+ end
58
+ ```
59
+
60
+ #### Using the bulk_create_chunk_with_http_info variant
61
+
62
+ This returns an Array which contains the response data, status code and headers.
63
+
64
+ > <Array(<ReturnQueuedChunk>, Integer, Hash)> bulk_create_chunk_with_http_info(tr_dataset, create_chunk_data)
65
+
66
+ ```ruby
67
+ begin
68
+ # bulk_create_chunk
69
+ data, status_code, headers = api_instance.bulk_create_chunk_with_http_info(tr_dataset, create_chunk_data)
70
+ p status_code # => 2xx
71
+ p headers # => { ... }
72
+ p data # => <ReturnQueuedChunk>
73
+ rescue TrieveRubyClient::ApiError => e
74
+ puts "Error when calling ChunkApi->bulk_create_chunk_with_http_info: #{e}"
75
+ end
76
+ ```
77
+
78
+ ### Parameters
79
+
80
+ | Name | Type | Description | Notes |
81
+ | ---- | ---- | ----------- | ----- |
82
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
83
+ | **create_chunk_data** | [**CreateChunkData**](CreateChunkData.md) | JSON request payload to create a new chunk (chunk) | |
84
+
85
+ ### Return type
86
+
87
+ [**ReturnQueuedChunk**](ReturnQueuedChunk.md)
88
+
89
+ ### Authorization
90
+
91
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
92
+
93
+ ### HTTP request headers
94
+
95
+ - **Content-Type**: application/json
96
+ - **Accept**: application/json
97
+
98
+
99
+ ## create_chunk
100
+
101
+ > <ReturnQueuedChunk> create_chunk(tr_dataset, create_chunk_data)
102
+
103
+ create_chunk
104
+
105
+ create_chunk Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
106
+
107
+ ### Examples
108
+
109
+ ```ruby
110
+ require 'time'
111
+ require 'trieve_ruby_client'
112
+ # setup authorization
113
+ TrieveRubyClient.configure do |config|
114
+ # Configure API key authorization: Cookie
115
+ config.api_key['Cookie'] = 'YOUR API KEY'
116
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
117
+ # config.api_key_prefix['Cookie'] = 'Bearer'
118
+
119
+ # Configure API key authorization: ApiKey
120
+ config.api_key['ApiKey'] = 'YOUR API KEY'
121
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
122
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
123
+ end
124
+
125
+ api_instance = TrieveRubyClient::ChunkApi.new
126
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
127
+ create_chunk_data = TrieveRubyClient::CreateChunkData.new # CreateChunkData | JSON request payload to create a new chunk (chunk)
128
+
129
+ begin
130
+ # create_chunk
131
+ result = api_instance.create_chunk(tr_dataset, create_chunk_data)
132
+ p result
133
+ rescue TrieveRubyClient::ApiError => e
134
+ puts "Error when calling ChunkApi->create_chunk: #{e}"
135
+ end
136
+ ```
137
+
138
+ #### Using the create_chunk_with_http_info variant
139
+
140
+ This returns an Array which contains the response data, status code and headers.
141
+
142
+ > <Array(<ReturnQueuedChunk>, Integer, Hash)> create_chunk_with_http_info(tr_dataset, create_chunk_data)
143
+
144
+ ```ruby
145
+ begin
146
+ # create_chunk
147
+ data, status_code, headers = api_instance.create_chunk_with_http_info(tr_dataset, create_chunk_data)
148
+ p status_code # => 2xx
149
+ p headers # => { ... }
150
+ p data # => <ReturnQueuedChunk>
151
+ rescue TrieveRubyClient::ApiError => e
152
+ puts "Error when calling ChunkApi->create_chunk_with_http_info: #{e}"
153
+ end
154
+ ```
155
+
156
+ ### Parameters
157
+
158
+ | Name | Type | Description | Notes |
159
+ | ---- | ---- | ----------- | ----- |
160
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
161
+ | **create_chunk_data** | [**CreateChunkData**](CreateChunkData.md) | JSON request payload to create a new chunk (chunk) | |
162
+
163
+ ### Return type
164
+
165
+ [**ReturnQueuedChunk**](ReturnQueuedChunk.md)
166
+
167
+ ### Authorization
168
+
169
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
170
+
171
+ ### HTTP request headers
172
+
173
+ - **Content-Type**: application/json
174
+ - **Accept**: application/json
175
+
176
+
177
+ ## create_suggested_queries_handler
178
+
179
+ > <SuggestedQueriesResponse> create_suggested_queries_handler(tr_dataset, suggested_queries_request)
180
+
181
+ get_suggested_queries
182
+
183
+ get_suggested_queries This endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.
184
+
185
+ ### Examples
186
+
187
+ ```ruby
188
+ require 'time'
189
+ require 'trieve_ruby_client'
190
+ # setup authorization
191
+ TrieveRubyClient.configure do |config|
192
+ # Configure API key authorization: Cookie
193
+ config.api_key['Cookie'] = 'YOUR API KEY'
194
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
195
+ # config.api_key_prefix['Cookie'] = 'Bearer'
196
+
197
+ # Configure API key authorization: ApiKey
198
+ config.api_key['ApiKey'] = 'YOUR API KEY'
199
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
200
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
201
+ end
202
+
203
+ api_instance = TrieveRubyClient::ChunkApi.new
204
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
205
+ suggested_queries_request = TrieveRubyClient::SuggestedQueriesRequest.new({query: 'query_example'}) # SuggestedQueriesRequest | JSON request payload to get alternative suggested queries
206
+
207
+ begin
208
+ # get_suggested_queries
209
+ result = api_instance.create_suggested_queries_handler(tr_dataset, suggested_queries_request)
210
+ p result
211
+ rescue TrieveRubyClient::ApiError => e
212
+ puts "Error when calling ChunkApi->create_suggested_queries_handler: #{e}"
213
+ end
214
+ ```
215
+
216
+ #### Using the create_suggested_queries_handler_with_http_info variant
217
+
218
+ This returns an Array which contains the response data, status code and headers.
219
+
220
+ > <Array(<SuggestedQueriesResponse>, Integer, Hash)> create_suggested_queries_handler_with_http_info(tr_dataset, suggested_queries_request)
221
+
222
+ ```ruby
223
+ begin
224
+ # get_suggested_queries
225
+ data, status_code, headers = api_instance.create_suggested_queries_handler_with_http_info(tr_dataset, suggested_queries_request)
226
+ p status_code # => 2xx
227
+ p headers # => { ... }
228
+ p data # => <SuggestedQueriesResponse>
229
+ rescue TrieveRubyClient::ApiError => e
230
+ puts "Error when calling ChunkApi->create_suggested_queries_handler_with_http_info: #{e}"
231
+ end
232
+ ```
233
+
234
+ ### Parameters
235
+
236
+ | Name | Type | Description | Notes |
237
+ | ---- | ---- | ----------- | ----- |
238
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
239
+ | **suggested_queries_request** | [**SuggestedQueriesRequest**](SuggestedQueriesRequest.md) | JSON request payload to get alternative suggested queries | |
240
+
241
+ ### Return type
242
+
243
+ [**SuggestedQueriesResponse**](SuggestedQueriesResponse.md)
244
+
245
+ ### Authorization
246
+
247
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
248
+
249
+ ### HTTP request headers
250
+
251
+ - **Content-Type**: application/json
252
+ - **Accept**: application/json
253
+
254
+
255
+ ## delete_chunk
256
+
257
+ > delete_chunk(tr_dataset, chunk_id, tracking_or_chunk)
258
+
259
+ delete_chunk
260
+
261
+ 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.
262
+
263
+ ### Examples
264
+
265
+ ```ruby
266
+ require 'time'
267
+ require 'trieve_ruby_client'
268
+ # setup authorization
269
+ TrieveRubyClient.configure do |config|
270
+ # Configure API key authorization: Cookie
271
+ config.api_key['Cookie'] = 'YOUR API KEY'
272
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
273
+ # config.api_key_prefix['Cookie'] = 'Bearer'
274
+
275
+ # Configure API key authorization: ApiKey
276
+ config.api_key['ApiKey'] = 'YOUR API KEY'
277
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
278
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
279
+ end
280
+
281
+ api_instance = TrieveRubyClient::ChunkApi.new
282
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
283
+ chunk_id = TODO # Uuid | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
284
+ tracking_or_chunk = 'tracking_or_chunk_example' # String | The type of id you are using to search for the chunk. This can be either 'chunk' or 'tracking_id'
285
+
286
+ begin
287
+ # delete_chunk
288
+ api_instance.delete_chunk(tr_dataset, chunk_id, tracking_or_chunk)
289
+ rescue TrieveRubyClient::ApiError => e
290
+ puts "Error when calling ChunkApi->delete_chunk: #{e}"
291
+ end
292
+ ```
293
+
294
+ #### Using the delete_chunk_with_http_info variant
295
+
296
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
297
+
298
+ > <Array(nil, Integer, Hash)> delete_chunk_with_http_info(tr_dataset, chunk_id, tracking_or_chunk)
299
+
300
+ ```ruby
301
+ begin
302
+ # delete_chunk
303
+ data, status_code, headers = api_instance.delete_chunk_with_http_info(tr_dataset, chunk_id, tracking_or_chunk)
304
+ p status_code # => 2xx
305
+ p headers # => { ... }
306
+ p data # => nil
307
+ rescue TrieveRubyClient::ApiError => e
308
+ puts "Error when calling ChunkApi->delete_chunk_with_http_info: #{e}"
309
+ end
310
+ ```
311
+
312
+ ### Parameters
313
+
314
+ | Name | Type | Description | Notes |
315
+ | ---- | ---- | ----------- | ----- |
316
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
317
+ | **chunk_id** | [**Uuid**](.md) | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id. | |
318
+ | **tracking_or_chunk** | **String** | The type of id you are using to search for the chunk. This can be either &#39;chunk&#39; or &#39;tracking_id&#39; | |
319
+
320
+ ### Return type
321
+
322
+ nil (empty response body)
323
+
324
+ ### Authorization
325
+
326
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
327
+
328
+ ### HTTP request headers
329
+
330
+ - **Content-Type**: Not defined
331
+ - **Accept**: application/json
332
+
333
+
334
+ ## delete_chunk_by_tracking_id
335
+
336
+ > delete_chunk_by_tracking_id(tr_dataset, tracking_id)
337
+
338
+ delete_chunk_by_tracking_id
339
+
340
+ 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.
341
+
342
+ ### Examples
343
+
344
+ ```ruby
345
+ require 'time'
346
+ require 'trieve_ruby_client'
347
+ # setup authorization
348
+ TrieveRubyClient.configure do |config|
349
+ # Configure API key authorization: Cookie
350
+ config.api_key['Cookie'] = 'YOUR API KEY'
351
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
352
+ # config.api_key_prefix['Cookie'] = 'Bearer'
353
+
354
+ # Configure API key authorization: ApiKey
355
+ config.api_key['ApiKey'] = 'YOUR API KEY'
356
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
357
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
358
+ end
359
+
360
+ api_instance = TrieveRubyClient::ChunkApi.new
361
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
362
+ tracking_id = 'tracking_id_example' # String | tracking_id of the chunk you want to delete
363
+
364
+ begin
365
+ # delete_chunk_by_tracking_id
366
+ api_instance.delete_chunk_by_tracking_id(tr_dataset, tracking_id)
367
+ rescue TrieveRubyClient::ApiError => e
368
+ puts "Error when calling ChunkApi->delete_chunk_by_tracking_id: #{e}"
369
+ end
370
+ ```
371
+
372
+ #### Using the delete_chunk_by_tracking_id_with_http_info variant
373
+
374
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
375
+
376
+ > <Array(nil, Integer, Hash)> delete_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id)
377
+
378
+ ```ruby
379
+ begin
380
+ # delete_chunk_by_tracking_id
381
+ data, status_code, headers = api_instance.delete_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id)
382
+ p status_code # => 2xx
383
+ p headers # => { ... }
384
+ p data # => nil
385
+ rescue TrieveRubyClient::ApiError => e
386
+ puts "Error when calling ChunkApi->delete_chunk_by_tracking_id_with_http_info: #{e}"
387
+ end
388
+ ```
389
+
390
+ ### Parameters
391
+
392
+ | Name | Type | Description | Notes |
393
+ | ---- | ---- | ----------- | ----- |
394
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
395
+ | **tracking_id** | **String** | tracking_id of the chunk you want to delete | |
396
+
397
+ ### Return type
398
+
399
+ nil (empty response body)
400
+
401
+ ### Authorization
402
+
403
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
404
+
405
+ ### HTTP request headers
406
+
407
+ - **Content-Type**: Not defined
408
+ - **Accept**: application/json
409
+
410
+
411
+ ## generate_off_chunks
412
+
413
+ > String generate_off_chunks(tr_dataset, generate_chunks_request)
414
+
415
+ augmented_generation_from_chunks
416
+
417
+ augmented_generation_from_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.
418
+
419
+ ### Examples
420
+
421
+ ```ruby
422
+ require 'time'
423
+ require 'trieve_ruby_client'
424
+ # setup authorization
425
+ TrieveRubyClient.configure do |config|
426
+ # Configure API key authorization: Cookie
427
+ config.api_key['Cookie'] = 'YOUR API KEY'
428
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
429
+ # config.api_key_prefix['Cookie'] = 'Bearer'
430
+
431
+ # Configure API key authorization: ApiKey
432
+ config.api_key['ApiKey'] = 'YOUR API KEY'
433
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
434
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
435
+ end
436
+
437
+ api_instance = TrieveRubyClient::ChunkApi.new
438
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
439
+ 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)
440
+
441
+ begin
442
+ # augmented_generation_from_chunks
443
+ result = api_instance.generate_off_chunks(tr_dataset, generate_chunks_request)
444
+ p result
445
+ rescue TrieveRubyClient::ApiError => e
446
+ puts "Error when calling ChunkApi->generate_off_chunks: #{e}"
447
+ end
448
+ ```
449
+
450
+ #### Using the generate_off_chunks_with_http_info variant
451
+
452
+ This returns an Array which contains the response data, status code and headers.
453
+
454
+ > <Array(String, Integer, Hash)> generate_off_chunks_with_http_info(tr_dataset, generate_chunks_request)
455
+
456
+ ```ruby
457
+ begin
458
+ # augmented_generation_from_chunks
459
+ data, status_code, headers = api_instance.generate_off_chunks_with_http_info(tr_dataset, generate_chunks_request)
460
+ p status_code # => 2xx
461
+ p headers # => { ... }
462
+ p data # => String
463
+ rescue TrieveRubyClient::ApiError => e
464
+ puts "Error when calling ChunkApi->generate_off_chunks_with_http_info: #{e}"
465
+ end
466
+ ```
467
+
468
+ ### Parameters
469
+
470
+ | Name | Type | Description | Notes |
471
+ | ---- | ---- | ----------- | ----- |
472
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
473
+ | **generate_chunks_request** | [**GenerateChunksRequest**](GenerateChunksRequest.md) | JSON request payload to perform RAG on some chunks (chunks) | |
474
+
475
+ ### Return type
476
+
477
+ **String**
478
+
479
+ ### Authorization
480
+
481
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
482
+
483
+ ### HTTP request headers
484
+
485
+ - **Content-Type**: application/json
486
+ - **Accept**: text/plain, application/json
487
+
488
+
489
+ ## get_chunk_by_id
490
+
491
+ > <ChunkMetadata> get_chunk_by_id(tr_dataset, chunk_id, tracking_or_chunk)
492
+
493
+ get_chunk
494
+
495
+ get_chunk Get a singular chunk by id.
496
+
497
+ ### Examples
498
+
499
+ ```ruby
500
+ require 'time'
501
+ require 'trieve_ruby_client'
502
+ # setup authorization
503
+ TrieveRubyClient.configure do |config|
504
+ # Configure API key authorization: Cookie
505
+ config.api_key['Cookie'] = 'YOUR API KEY'
506
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
507
+ # config.api_key_prefix['Cookie'] = 'Bearer'
508
+
509
+ # Configure API key authorization: ApiKey
510
+ config.api_key['ApiKey'] = 'YOUR API KEY'
511
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
512
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
513
+ end
514
+
515
+ api_instance = TrieveRubyClient::ChunkApi.new
516
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
517
+ chunk_id = TODO # Uuid | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
518
+ tracking_or_chunk = 'tracking_or_chunk_example' # String | The type of id you are using to search for the chunk. This can be either 'chunk' or 'tracking_id'
519
+
520
+ begin
521
+ # get_chunk
522
+ result = api_instance.get_chunk_by_id(tr_dataset, chunk_id, tracking_or_chunk)
523
+ p result
524
+ rescue TrieveRubyClient::ApiError => e
525
+ puts "Error when calling ChunkApi->get_chunk_by_id: #{e}"
526
+ end
527
+ ```
528
+
529
+ #### Using the get_chunk_by_id_with_http_info variant
530
+
531
+ This returns an Array which contains the response data, status code and headers.
532
+
533
+ > <Array(<ChunkMetadata>, Integer, Hash)> get_chunk_by_id_with_http_info(tr_dataset, chunk_id, tracking_or_chunk)
534
+
535
+ ```ruby
536
+ begin
537
+ # get_chunk
538
+ data, status_code, headers = api_instance.get_chunk_by_id_with_http_info(tr_dataset, chunk_id, tracking_or_chunk)
539
+ p status_code # => 2xx
540
+ p headers # => { ... }
541
+ p data # => <ChunkMetadata>
542
+ rescue TrieveRubyClient::ApiError => e
543
+ puts "Error when calling ChunkApi->get_chunk_by_id_with_http_info: #{e}"
544
+ end
545
+ ```
546
+
547
+ ### Parameters
548
+
549
+ | Name | Type | Description | Notes |
550
+ | ---- | ---- | ----------- | ----- |
551
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
552
+ | **chunk_id** | [**Uuid**](.md) | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id. | |
553
+ | **tracking_or_chunk** | **String** | The type of id you are using to search for the chunk. This can be either &#39;chunk&#39; or &#39;tracking_id&#39; | |
554
+
555
+ ### Return type
556
+
557
+ [**ChunkMetadata**](ChunkMetadata.md)
558
+
559
+ ### Authorization
560
+
561
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
562
+
563
+ ### HTTP request headers
564
+
565
+ - **Content-Type**: Not defined
566
+ - **Accept**: application/json
567
+
568
+
569
+ ## get_chunk_by_tracking_id
570
+
571
+ > <ChunkMetadata> get_chunk_by_tracking_id(tr_dataset, tracking_id)
572
+
573
+ get_chunk_by_tracking_id
574
+
575
+ 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.
576
+
577
+ ### Examples
578
+
579
+ ```ruby
580
+ require 'time'
581
+ require 'trieve_ruby_client'
582
+ # setup authorization
583
+ TrieveRubyClient.configure do |config|
584
+ # Configure API key authorization: Cookie
585
+ config.api_key['Cookie'] = 'YOUR API KEY'
586
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
587
+ # config.api_key_prefix['Cookie'] = 'Bearer'
588
+
589
+ # Configure API key authorization: ApiKey
590
+ config.api_key['ApiKey'] = 'YOUR API KEY'
591
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
592
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
593
+ end
594
+
595
+ api_instance = TrieveRubyClient::ChunkApi.new
596
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
597
+ tracking_id = 'tracking_id_example' # String | tracking_id of the chunk you want to fetch
598
+
599
+ begin
600
+ # get_chunk_by_tracking_id
601
+ result = api_instance.get_chunk_by_tracking_id(tr_dataset, tracking_id)
602
+ p result
603
+ rescue TrieveRubyClient::ApiError => e
604
+ puts "Error when calling ChunkApi->get_chunk_by_tracking_id: #{e}"
605
+ end
606
+ ```
607
+
608
+ #### Using the get_chunk_by_tracking_id_with_http_info variant
609
+
610
+ This returns an Array which contains the response data, status code and headers.
611
+
612
+ > <Array(<ChunkMetadata>, Integer, Hash)> get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id)
613
+
614
+ ```ruby
615
+ begin
616
+ # get_chunk_by_tracking_id
617
+ data, status_code, headers = api_instance.get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id)
618
+ p status_code # => 2xx
619
+ p headers # => { ... }
620
+ p data # => <ChunkMetadata>
621
+ rescue TrieveRubyClient::ApiError => e
622
+ puts "Error when calling ChunkApi->get_chunk_by_tracking_id_with_http_info: #{e}"
623
+ end
624
+ ```
625
+
626
+ ### Parameters
627
+
628
+ | Name | Type | Description | Notes |
629
+ | ---- | ---- | ----------- | ----- |
630
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
631
+ | **tracking_id** | **String** | tracking_id of the chunk you want to fetch | |
632
+
633
+ ### Return type
634
+
635
+ [**ChunkMetadata**](ChunkMetadata.md)
636
+
637
+ ### Authorization
638
+
639
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
640
+
641
+ ### HTTP request headers
642
+
643
+ - **Content-Type**: Not defined
644
+ - **Accept**: application/json
645
+
646
+
647
+ ## get_recommended_chunks
648
+
649
+ > <Array<ChunkMetadataWithFileData>> get_recommended_chunks(tr_dataset, recommend_chunks_request)
650
+
651
+ get_recommended_chunks
652
+
653
+ get_recommended_chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint.
654
+
655
+ ### Examples
656
+
657
+ ```ruby
658
+ require 'time'
659
+ require 'trieve_ruby_client'
660
+ # setup authorization
661
+ TrieveRubyClient.configure do |config|
662
+ # Configure API key authorization: Cookie
663
+ config.api_key['Cookie'] = 'YOUR API KEY'
664
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
665
+ # config.api_key_prefix['Cookie'] = 'Bearer'
666
+
667
+ # Configure API key authorization: ApiKey
668
+ config.api_key['ApiKey'] = 'YOUR API KEY'
669
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
670
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
671
+ end
672
+
673
+ api_instance = TrieveRubyClient::ChunkApi.new
674
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
675
+ recommend_chunks_request = TrieveRubyClient::RecommendChunksRequest.new # RecommendChunksRequest | JSON request payload to get recommendations of chunks similar to the chunks in the request
676
+
677
+ begin
678
+ # get_recommended_chunks
679
+ result = api_instance.get_recommended_chunks(tr_dataset, recommend_chunks_request)
680
+ p result
681
+ rescue TrieveRubyClient::ApiError => e
682
+ puts "Error when calling ChunkApi->get_recommended_chunks: #{e}"
683
+ end
684
+ ```
685
+
686
+ #### Using the get_recommended_chunks_with_http_info variant
687
+
688
+ This returns an Array which contains the response data, status code and headers.
689
+
690
+ > <Array(<Array<ChunkMetadataWithFileData>>, Integer, Hash)> get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request)
691
+
692
+ ```ruby
693
+ begin
694
+ # get_recommended_chunks
695
+ data, status_code, headers = api_instance.get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request)
696
+ p status_code # => 2xx
697
+ p headers # => { ... }
698
+ p data # => <Array<ChunkMetadataWithFileData>>
699
+ rescue TrieveRubyClient::ApiError => e
700
+ puts "Error when calling ChunkApi->get_recommended_chunks_with_http_info: #{e}"
701
+ end
702
+ ```
703
+
704
+ ### Parameters
705
+
706
+ | Name | Type | Description | Notes |
707
+ | ---- | ---- | ----------- | ----- |
708
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
709
+ | **recommend_chunks_request** | [**RecommendChunksRequest**](RecommendChunksRequest.md) | JSON request payload to get recommendations of chunks similar to the chunks in the request | |
710
+
711
+ ### Return type
712
+
713
+ [**Array&lt;ChunkMetadataWithFileData&gt;**](ChunkMetadataWithFileData.md)
714
+
715
+ ### Authorization
716
+
717
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
718
+
719
+ ### HTTP request headers
720
+
721
+ - **Content-Type**: application/json
722
+ - **Accept**: application/json
723
+
724
+
725
+ ## search_chunk
726
+
727
+ > <SearchChunkQueryResponseBody> search_chunk(tr_dataset, search_chunk_data)
728
+
729
+ search
730
+
731
+ 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>` tags for sub-sentence highlighting.
732
+
733
+ ### Examples
734
+
735
+ ```ruby
736
+ require 'time'
737
+ require 'trieve_ruby_client'
738
+ # setup authorization
739
+ TrieveRubyClient.configure do |config|
740
+ # Configure API key authorization: Cookie
741
+ config.api_key['Cookie'] = 'YOUR API KEY'
742
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
743
+ # config.api_key_prefix['Cookie'] = 'Bearer'
744
+
745
+ # Configure API key authorization: ApiKey
746
+ config.api_key['ApiKey'] = 'YOUR API KEY'
747
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
748
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
749
+ end
750
+
751
+ api_instance = TrieveRubyClient::ChunkApi.new
752
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
753
+ search_chunk_data = TrieveRubyClient::SearchChunkData.new({query: 'query_example', search_type: 'search_type_example'}) # SearchChunkData | JSON request payload to semantically search for chunks (chunks)
754
+
755
+ begin
756
+ # search
757
+ result = api_instance.search_chunk(tr_dataset, search_chunk_data)
758
+ p result
759
+ rescue TrieveRubyClient::ApiError => e
760
+ puts "Error when calling ChunkApi->search_chunk: #{e}"
761
+ end
762
+ ```
763
+
764
+ #### Using the search_chunk_with_http_info variant
765
+
766
+ This returns an Array which contains the response data, status code and headers.
767
+
768
+ > <Array(<SearchChunkQueryResponseBody>, Integer, Hash)> search_chunk_with_http_info(tr_dataset, search_chunk_data)
769
+
770
+ ```ruby
771
+ begin
772
+ # search
773
+ data, status_code, headers = api_instance.search_chunk_with_http_info(tr_dataset, search_chunk_data)
774
+ p status_code # => 2xx
775
+ p headers # => { ... }
776
+ p data # => <SearchChunkQueryResponseBody>
777
+ rescue TrieveRubyClient::ApiError => e
778
+ puts "Error when calling ChunkApi->search_chunk_with_http_info: #{e}"
779
+ end
780
+ ```
781
+
782
+ ### Parameters
783
+
784
+ | Name | Type | Description | Notes |
785
+ | ---- | ---- | ----------- | ----- |
786
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
787
+ | **search_chunk_data** | [**SearchChunkData**](SearchChunkData.md) | JSON request payload to semantically search for chunks (chunks) | |
788
+
789
+ ### Return type
790
+
791
+ [**SearchChunkQueryResponseBody**](SearchChunkQueryResponseBody.md)
792
+
793
+ ### Authorization
794
+
795
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
796
+
797
+ ### HTTP request headers
798
+
799
+ - **Content-Type**: application/json
800
+ - **Accept**: application/json
801
+
802
+
803
+ ## update_chunk
804
+
805
+ > update_chunk(tr_dataset, update_chunk_data)
806
+
807
+ update_chunk
808
+
809
+ 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.
810
+
811
+ ### Examples
812
+
813
+ ```ruby
814
+ require 'time'
815
+ require 'trieve_ruby_client'
816
+ # setup authorization
817
+ TrieveRubyClient.configure do |config|
818
+ # Configure API key authorization: Cookie
819
+ config.api_key['Cookie'] = 'YOUR API KEY'
820
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
821
+ # config.api_key_prefix['Cookie'] = 'Bearer'
822
+
823
+ # Configure API key authorization: ApiKey
824
+ config.api_key['ApiKey'] = 'YOUR API KEY'
825
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
826
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
827
+ end
828
+
829
+ api_instance = TrieveRubyClient::ChunkApi.new
830
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
831
+ update_chunk_data = TrieveRubyClient::UpdateChunkData.new # UpdateChunkData | JSON request payload to update a chunk (chunk)
832
+
833
+ begin
834
+ # update_chunk
835
+ api_instance.update_chunk(tr_dataset, update_chunk_data)
836
+ rescue TrieveRubyClient::ApiError => e
837
+ puts "Error when calling ChunkApi->update_chunk: #{e}"
838
+ end
839
+ ```
840
+
841
+ #### Using the update_chunk_with_http_info variant
842
+
843
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
844
+
845
+ > <Array(nil, Integer, Hash)> update_chunk_with_http_info(tr_dataset, update_chunk_data)
846
+
847
+ ```ruby
848
+ begin
849
+ # update_chunk
850
+ data, status_code, headers = api_instance.update_chunk_with_http_info(tr_dataset, update_chunk_data)
851
+ p status_code # => 2xx
852
+ p headers # => { ... }
853
+ p data # => nil
854
+ rescue TrieveRubyClient::ApiError => e
855
+ puts "Error when calling ChunkApi->update_chunk_with_http_info: #{e}"
856
+ end
857
+ ```
858
+
859
+ ### Parameters
860
+
861
+ | Name | Type | Description | Notes |
862
+ | ---- | ---- | ----------- | ----- |
863
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
864
+ | **update_chunk_data** | [**UpdateChunkData**](UpdateChunkData.md) | JSON request payload to update a chunk (chunk) | |
865
+
866
+ ### Return type
867
+
868
+ nil (empty response body)
869
+
870
+ ### Authorization
871
+
872
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
873
+
874
+ ### HTTP request headers
875
+
876
+ - **Content-Type**: application/json
877
+ - **Accept**: application/json
878
+
879
+
880
+ ## update_chunk_by_tracking_id
881
+
882
+ > update_chunk_by_tracking_id(tr_dataset, update_chunk_by_tracking_id_data)
883
+
884
+ update_chunk_by_tracking_id
885
+
886
+ 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.
887
+
888
+ ### Examples
889
+
890
+ ```ruby
891
+ require 'time'
892
+ require 'trieve_ruby_client'
893
+ # setup authorization
894
+ TrieveRubyClient.configure do |config|
895
+ # Configure API key authorization: Cookie
896
+ config.api_key['Cookie'] = 'YOUR API KEY'
897
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
898
+ # config.api_key_prefix['Cookie'] = 'Bearer'
899
+
900
+ # Configure API key authorization: ApiKey
901
+ config.api_key['ApiKey'] = 'YOUR API KEY'
902
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
903
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
904
+ end
905
+
906
+ api_instance = TrieveRubyClient::ChunkApi.new
907
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
908
+ update_chunk_by_tracking_id_data = TrieveRubyClient::UpdateChunkByTrackingIdData.new({tracking_id: 'tracking_id_example'}) # UpdateChunkByTrackingIdData | JSON request payload to update a chunk by tracking_id (chunks)
909
+
910
+ begin
911
+ # update_chunk_by_tracking_id
912
+ api_instance.update_chunk_by_tracking_id(tr_dataset, update_chunk_by_tracking_id_data)
913
+ rescue TrieveRubyClient::ApiError => e
914
+ puts "Error when calling ChunkApi->update_chunk_by_tracking_id: #{e}"
915
+ end
916
+ ```
917
+
918
+ #### Using the update_chunk_by_tracking_id_with_http_info variant
919
+
920
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
921
+
922
+ > <Array(nil, Integer, Hash)> update_chunk_by_tracking_id_with_http_info(tr_dataset, update_chunk_by_tracking_id_data)
923
+
924
+ ```ruby
925
+ begin
926
+ # update_chunk_by_tracking_id
927
+ data, status_code, headers = api_instance.update_chunk_by_tracking_id_with_http_info(tr_dataset, update_chunk_by_tracking_id_data)
928
+ p status_code # => 2xx
929
+ p headers # => { ... }
930
+ p data # => nil
931
+ rescue TrieveRubyClient::ApiError => e
932
+ puts "Error when calling ChunkApi->update_chunk_by_tracking_id_with_http_info: #{e}"
933
+ end
934
+ ```
935
+
936
+ ### Parameters
937
+
938
+ | Name | Type | Description | Notes |
939
+ | ---- | ---- | ----------- | ----- |
940
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
941
+ | **update_chunk_by_tracking_id_data** | [**UpdateChunkByTrackingIdData**](UpdateChunkByTrackingIdData.md) | JSON request payload to update a chunk by tracking_id (chunks) | |
942
+
943
+ ### Return type
944
+
945
+ nil (empty response body)
946
+
947
+ ### Authorization
948
+
949
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
950
+
951
+ ### HTTP request headers
952
+
953
+ - **Content-Type**: application/json
954
+ - **Accept**: application/json
955
+