trieve_ruby_client 0.3.5 → 0.4.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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -74
  3. data/docs/AuthApi.md +28 -34
  4. data/docs/AuthQuery.md +22 -0
  5. data/docs/BatchQueuedChunkResponse.md +20 -0
  6. data/docs/ChunkApi.md +69 -143
  7. data/docs/ChunkData.md +42 -0
  8. data/docs/ChunkGroupApi.md +169 -85
  9. data/docs/CreateChunkData.md +41 -34
  10. data/docs/DatasetApi.md +31 -31
  11. data/docs/EventsApi.md +13 -13
  12. data/docs/FileApi.md +21 -21
  13. data/docs/GetEventsData.md +22 -0
  14. data/docs/HealthApi.md +6 -4
  15. data/docs/InvitationApi.md +6 -6
  16. data/docs/MessageApi.md +21 -21
  17. data/docs/OrganizationApi.md +31 -31
  18. data/docs/ReturnQueuedChunk.md +39 -10
  19. data/docs/SingleQueuedChunkResponse.md +20 -0
  20. data/docs/StripeApi.md +21 -13
  21. data/docs/TopicApi.md +21 -21
  22. data/docs/UserApi.md +16 -16
  23. data/lib/trieve_ruby_client/api/auth_api.rb +27 -34
  24. data/lib/trieve_ruby_client/api/chunk_api.rb +57 -132
  25. data/lib/trieve_ruby_client/api/chunk_group_api.rb +149 -61
  26. data/lib/trieve_ruby_client/api/dataset_api.rb +25 -25
  27. data/lib/trieve_ruby_client/api/events_api.rb +21 -16
  28. data/lib/trieve_ruby_client/api/file_api.rb +17 -17
  29. data/lib/trieve_ruby_client/api/health_api.rb +5 -1
  30. data/lib/trieve_ruby_client/api/invitation_api.rb +5 -5
  31. data/lib/trieve_ruby_client/api/message_api.rb +17 -17
  32. data/lib/trieve_ruby_client/api/organization_api.rb +25 -25
  33. data/lib/trieve_ruby_client/api/stripe_api.rb +17 -1
  34. data/lib/trieve_ruby_client/api/topic_api.rb +17 -17
  35. data/lib/trieve_ruby_client/api/user_api.rb +13 -13
  36. data/lib/trieve_ruby_client/api_client.rb +1 -1
  37. data/lib/trieve_ruby_client/api_error.rb +1 -1
  38. data/lib/trieve_ruby_client/configuration.rb +8 -4
  39. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  40. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  41. data/lib/trieve_ruby_client/models/auth_query.rb +238 -0
  42. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +240 -0
  43. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  44. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  45. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  46. data/lib/trieve_ruby_client/models/chunk_data.rb +356 -0
  47. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  48. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  49. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  50. data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
  51. data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
  52. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
  53. data/lib/trieve_ruby_client/models/create_chunk_data.rb +79 -330
  54. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  55. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  56. data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
  57. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  58. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  59. data/lib/trieve_ruby_client/models/dataset.rb +1 -1
  60. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  61. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  62. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  63. data/lib/trieve_ruby_client/models/delete_dataset_request.rb +1 -1
  64. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  65. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  66. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  67. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  68. data/lib/trieve_ruby_client/models/event.rb +1 -1
  69. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  70. data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
  71. data/lib/trieve_ruby_client/models/file.rb +1 -1
  72. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  73. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
  74. data/lib/trieve_ruby_client/models/get_events_data.rb +240 -0
  75. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  76. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  77. data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +1 -1
  78. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  79. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  80. data/lib/trieve_ruby_client/models/message.rb +1 -1
  81. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  82. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  83. data/lib/trieve_ruby_client/models/range.rb +1 -1
  84. data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +1 -1
  85. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
  86. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  87. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +75 -207
  88. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  89. data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
  90. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  91. data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
  92. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
  93. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
  94. data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
  95. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  96. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  97. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +238 -0
  98. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  99. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  100. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  101. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  102. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  103. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  104. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  105. data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
  106. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  107. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  108. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  109. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  110. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  111. data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
  112. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  113. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  114. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  115. data/lib/trieve_ruby_client/version.rb +2 -2
  116. data/lib/trieve_ruby_client.rb +6 -2
  117. data/openapi-generator.yaml +1 -1
  118. data/openapi.json +1233 -824
  119. data/spec/models/auth_query_spec.rb +48 -0
  120. data/spec/models/batch_queued_chunk_response_spec.rb +42 -0
  121. data/spec/models/chunk_data_spec.rb +108 -0
  122. data/spec/models/get_events_data_spec.rb +48 -0
  123. data/spec/models/single_queued_chunk_response_spec.rb +42 -0
  124. data/spec/spec_helper.rb +1 -1
  125. data/trieve_ruby_client-0.3.5.gem +0 -0
  126. data/trieve_ruby_client.gemspec +1 -1
  127. metadata +23 -4
  128. data/trieve_ruby_client-0.3.4.gem +0 -0
  129. data/trieve_ruby_client-0.3.41.gem +0 -0
data/docs/ChunkApi.md CHANGED
@@ -1,103 +1,29 @@
1
1
  # TrieveRubyClient::ChunkApi
2
2
 
3
- All URIs are relative to *http://localhost*
3
+ All URIs are relative to *http://localhost:8090*
4
4
 
5
5
  | Method | HTTP request | Description |
6
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: ApiKey
37
- config.api_key['ApiKey'] = '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['ApiKey'] = 'Bearer'
40
- end
41
-
42
- api_instance = TrieveRubyClient::ChunkApi.new
43
- tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
44
- create_chunk_data = TrieveRubyClient::CreateChunkData.new # CreateChunkData | JSON request payload to create a new chunk (chunk)
45
-
46
- begin
47
- # bulk_create_chunk
48
- result = api_instance.bulk_create_chunk(tr_dataset, create_chunk_data)
49
- p result
50
- rescue TrieveRubyClient::ApiError => e
51
- puts "Error when calling ChunkApi->bulk_create_chunk: #{e}"
52
- end
53
- ```
54
-
55
- #### Using the bulk_create_chunk_with_http_info variant
56
-
57
- This returns an Array which contains the response data, status code and headers.
58
-
59
- > <Array(<ReturnQueuedChunk>, Integer, Hash)> bulk_create_chunk_with_http_info(tr_dataset, create_chunk_data)
60
-
61
- ```ruby
62
- begin
63
- # bulk_create_chunk
64
- data, status_code, headers = api_instance.bulk_create_chunk_with_http_info(tr_dataset, create_chunk_data)
65
- p status_code # => 2xx
66
- p headers # => { ... }
67
- p data # => <ReturnQueuedChunk>
68
- rescue TrieveRubyClient::ApiError => e
69
- puts "Error when calling ChunkApi->bulk_create_chunk_with_http_info: #{e}"
70
- end
71
- ```
72
-
73
- ### Parameters
74
-
75
- | Name | Type | Description | Notes |
76
- | ---- | ---- | ----------- | ----- |
77
- | **tr_dataset** | **String** | The dataset id to use for the request | |
78
- | **create_chunk_data** | [**CreateChunkData**](CreateChunkData.md) | JSON request payload to create a new chunk (chunk) | |
79
-
80
- ### Return type
81
-
82
- [**ReturnQueuedChunk**](ReturnQueuedChunk.md)
83
-
84
- ### Authorization
85
-
86
- [ApiKey](../README.md#ApiKey)
87
-
88
- ### HTTP request headers
89
-
90
- - **Content-Type**: application/json
91
- - **Accept**: application/json
7
+ | [**create_chunk**](ChunkApi.md#create_chunk) | **POST** /api/chunk | Create Chunk |
8
+ | [**create_suggested_queries_handler**](ChunkApi.md#create_suggested_queries_handler) | **POST** /api/chunk/gen_suggestions | Generate suggested queries |
9
+ | [**delete_chunk**](ChunkApi.md#delete_chunk) | **DELETE** /api/chunk/{tracking_or_chunk}/{chunk_id} | Delete Chunk |
10
+ | [**delete_chunk_by_tracking_id**](ChunkApi.md#delete_chunk_by_tracking_id) | **DELETE** /api/chunk/tracking_id/{tracking_id} | Delete Chunk By Tracking Id |
11
+ | [**generate_off_chunks**](ChunkApi.md#generate_off_chunks) | **POST** /api/chunk/generate | RAG on User Defined Chunks |
12
+ | [**get_chunk_by_id**](ChunkApi.md#get_chunk_by_id) | **GET** /api/chunk/{tracking_or_chunk}/{chunk_id} | Get Chunk By Id |
13
+ | [**get_chunk_by_tracking_id**](ChunkApi.md#get_chunk_by_tracking_id) | **GET** /api/chunk/tracking_id/{tracking_id} | Get Chunk By Tracking Id |
14
+ | [**get_recommended_chunks**](ChunkApi.md#get_recommended_chunks) | **POST** /api/chunk/recommend | Get Recommended Chunks |
15
+ | [**search_chunk**](ChunkApi.md#search_chunk) | **POST** /api/chunk/search | Search |
16
+ | [**update_chunk**](ChunkApi.md#update_chunk) | **PUT** /api/chunk/update | Update Chunk |
17
+ | [**update_chunk_by_tracking_id**](ChunkApi.md#update_chunk_by_tracking_id) | **PUT** /api/chunk/tracking_id/update | Update Chunk By Tracking Id |
92
18
 
93
19
 
94
20
  ## create_chunk
95
21
 
96
22
  > <ReturnQueuedChunk> create_chunk(tr_dataset, create_chunk_data)
97
23
 
98
- create_chunk
24
+ Create Chunk
99
25
 
100
- 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.
26
+ 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.
101
27
 
102
28
  ### Examples
103
29
 
@@ -114,10 +40,10 @@ end
114
40
 
115
41
  api_instance = TrieveRubyClient::ChunkApi.new
116
42
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
117
- create_chunk_data = TrieveRubyClient::CreateChunkData.new # CreateChunkData | JSON request payload to create a new chunk (chunk)
43
+ create_chunk_data = nil # CreateChunkData | JSON request payload to create a new chunk (chunk)
118
44
 
119
45
  begin
120
- # create_chunk
46
+ # Create Chunk
121
47
  result = api_instance.create_chunk(tr_dataset, create_chunk_data)
122
48
  p result
123
49
  rescue TrieveRubyClient::ApiError => e
@@ -133,7 +59,7 @@ This returns an Array which contains the response data, status code and headers.
133
59
 
134
60
  ```ruby
135
61
  begin
136
- # create_chunk
62
+ # Create Chunk
137
63
  data, status_code, headers = api_instance.create_chunk_with_http_info(tr_dataset, create_chunk_data)
138
64
  p status_code # => 2xx
139
65
  p headers # => { ... }
@@ -168,9 +94,9 @@ end
168
94
 
169
95
  > <SuggestedQueriesResponse> create_suggested_queries_handler(tr_dataset, suggested_queries_request)
170
96
 
171
- get_suggested_queries
97
+ Generate suggested queries
172
98
 
173
- 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.
99
+ Generate 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.
174
100
 
175
101
  ### Examples
176
102
 
@@ -190,7 +116,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
190
116
  suggested_queries_request = TrieveRubyClient::SuggestedQueriesRequest.new({query: 'query_example'}) # SuggestedQueriesRequest | JSON request payload to get alternative suggested queries
191
117
 
192
118
  begin
193
- # get_suggested_queries
119
+ # Generate suggested queries
194
120
  result = api_instance.create_suggested_queries_handler(tr_dataset, suggested_queries_request)
195
121
  p result
196
122
  rescue TrieveRubyClient::ApiError => e
@@ -206,7 +132,7 @@ This returns an Array which contains the response data, status code and headers.
206
132
 
207
133
  ```ruby
208
134
  begin
209
- # get_suggested_queries
135
+ # Generate suggested queries
210
136
  data, status_code, headers = api_instance.create_suggested_queries_handler_with_http_info(tr_dataset, suggested_queries_request)
211
137
  p status_code # => 2xx
212
138
  p headers # => { ... }
@@ -239,11 +165,11 @@ end
239
165
 
240
166
  ## delete_chunk
241
167
 
242
- > delete_chunk(tr_dataset, chunk_id, tracking_or_chunk)
168
+ > delete_chunk(tr_dataset, tracking_or_chunk, chunk_id)
243
169
 
244
- delete_chunk
170
+ Delete Chunk
245
171
 
246
- 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.
172
+ 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.
247
173
 
248
174
  ### Examples
249
175
 
@@ -260,12 +186,12 @@ end
260
186
 
261
187
  api_instance = TrieveRubyClient::ChunkApi.new
262
188
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
263
- chunk_id = TODO # Uuid | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
264
189
  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'
190
+ chunk_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
265
191
 
266
192
  begin
267
- # delete_chunk
268
- api_instance.delete_chunk(tr_dataset, chunk_id, tracking_or_chunk)
193
+ # Delete Chunk
194
+ api_instance.delete_chunk(tr_dataset, tracking_or_chunk, chunk_id)
269
195
  rescue TrieveRubyClient::ApiError => e
270
196
  puts "Error when calling ChunkApi->delete_chunk: #{e}"
271
197
  end
@@ -275,12 +201,12 @@ end
275
201
 
276
202
  This returns an Array which contains the response data (`nil` in this case), status code and headers.
277
203
 
278
- > <Array(nil, Integer, Hash)> delete_chunk_with_http_info(tr_dataset, chunk_id, tracking_or_chunk)
204
+ > <Array(nil, Integer, Hash)> delete_chunk_with_http_info(tr_dataset, tracking_or_chunk, chunk_id)
279
205
 
280
206
  ```ruby
281
207
  begin
282
- # delete_chunk
283
- data, status_code, headers = api_instance.delete_chunk_with_http_info(tr_dataset, chunk_id, tracking_or_chunk)
208
+ # Delete Chunk
209
+ data, status_code, headers = api_instance.delete_chunk_with_http_info(tr_dataset, tracking_or_chunk, chunk_id)
284
210
  p status_code # => 2xx
285
211
  p headers # => { ... }
286
212
  p data # => nil
@@ -294,8 +220,8 @@ end
294
220
  | Name | Type | Description | Notes |
295
221
  | ---- | ---- | ----------- | ----- |
296
222
  | **tr_dataset** | **String** | The dataset id to use for the request | |
297
- | **chunk_id** | [**Uuid**](.md) | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id. | |
298
223
  | **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; | |
224
+ | **chunk_id** | **String** | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id. | |
299
225
 
300
226
  ### Return type
301
227
 
@@ -315,9 +241,9 @@ nil (empty response body)
315
241
 
316
242
  > delete_chunk_by_tracking_id(tr_dataset, tracking_id)
317
243
 
318
- delete_chunk_by_tracking_id
244
+ Delete Chunk By Tracking Id
319
245
 
320
- 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.
246
+ 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.
321
247
 
322
248
  ### Examples
323
249
 
@@ -337,7 +263,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
337
263
  tracking_id = 'tracking_id_example' # String | tracking_id of the chunk you want to delete
338
264
 
339
265
  begin
340
- # delete_chunk_by_tracking_id
266
+ # Delete Chunk By Tracking Id
341
267
  api_instance.delete_chunk_by_tracking_id(tr_dataset, tracking_id)
342
268
  rescue TrieveRubyClient::ApiError => e
343
269
  puts "Error when calling ChunkApi->delete_chunk_by_tracking_id: #{e}"
@@ -352,7 +278,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
352
278
 
353
279
  ```ruby
354
280
  begin
355
- # delete_chunk_by_tracking_id
281
+ # Delete Chunk By Tracking Id
356
282
  data, status_code, headers = api_instance.delete_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id)
357
283
  p status_code # => 2xx
358
284
  p headers # => { ... }
@@ -387,9 +313,9 @@ nil (empty response body)
387
313
 
388
314
  > String generate_off_chunks(tr_dataset, generate_chunks_request)
389
315
 
390
- augmented_generation_from_chunks
316
+ RAG on User Defined Chunks
391
317
 
392
- 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.
318
+ RAG on User Defined Chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.
393
319
 
394
320
  ### Examples
395
321
 
@@ -409,7 +335,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
409
335
  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)
410
336
 
411
337
  begin
412
- # augmented_generation_from_chunks
338
+ # RAG on User Defined Chunks
413
339
  result = api_instance.generate_off_chunks(tr_dataset, generate_chunks_request)
414
340
  p result
415
341
  rescue TrieveRubyClient::ApiError => e
@@ -425,7 +351,7 @@ This returns an Array which contains the response data, status code and headers.
425
351
 
426
352
  ```ruby
427
353
  begin
428
- # augmented_generation_from_chunks
354
+ # RAG on User Defined Chunks
429
355
  data, status_code, headers = api_instance.generate_off_chunks_with_http_info(tr_dataset, generate_chunks_request)
430
356
  p status_code # => 2xx
431
357
  p headers # => { ... }
@@ -458,11 +384,11 @@ end
458
384
 
459
385
  ## get_chunk_by_id
460
386
 
461
- > <ChunkMetadata> get_chunk_by_id(tr_dataset, chunk_id, tracking_or_chunk)
387
+ > <ChunkMetadata> get_chunk_by_id(tr_dataset, tracking_or_chunk, chunk_id)
462
388
 
463
- get_chunk
389
+ Get Chunk By Id
464
390
 
465
- get_chunk Get a singular chunk by id.
391
+ Get Chunk By Id Get a singular chunk by id.
466
392
 
467
393
  ### Examples
468
394
 
@@ -479,12 +405,12 @@ end
479
405
 
480
406
  api_instance = TrieveRubyClient::ChunkApi.new
481
407
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
482
- chunk_id = TODO # Uuid | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
483
408
  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'
409
+ chunk_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
484
410
 
485
411
  begin
486
- # get_chunk
487
- result = api_instance.get_chunk_by_id(tr_dataset, chunk_id, tracking_or_chunk)
412
+ # Get Chunk By Id
413
+ result = api_instance.get_chunk_by_id(tr_dataset, tracking_or_chunk, chunk_id)
488
414
  p result
489
415
  rescue TrieveRubyClient::ApiError => e
490
416
  puts "Error when calling ChunkApi->get_chunk_by_id: #{e}"
@@ -495,12 +421,12 @@ end
495
421
 
496
422
  This returns an Array which contains the response data, status code and headers.
497
423
 
498
- > <Array(<ChunkMetadata>, Integer, Hash)> get_chunk_by_id_with_http_info(tr_dataset, chunk_id, tracking_or_chunk)
424
+ > <Array(<ChunkMetadata>, Integer, Hash)> get_chunk_by_id_with_http_info(tr_dataset, tracking_or_chunk, chunk_id)
499
425
 
500
426
  ```ruby
501
427
  begin
502
- # get_chunk
503
- data, status_code, headers = api_instance.get_chunk_by_id_with_http_info(tr_dataset, chunk_id, tracking_or_chunk)
428
+ # Get Chunk By Id
429
+ data, status_code, headers = api_instance.get_chunk_by_id_with_http_info(tr_dataset, tracking_or_chunk, chunk_id)
504
430
  p status_code # => 2xx
505
431
  p headers # => { ... }
506
432
  p data # => <ChunkMetadata>
@@ -514,8 +440,8 @@ end
514
440
  | Name | Type | Description | Notes |
515
441
  | ---- | ---- | ----------- | ----- |
516
442
  | **tr_dataset** | **String** | The dataset id to use for the request | |
517
- | **chunk_id** | [**Uuid**](.md) | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id. | |
518
443
  | **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; | |
444
+ | **chunk_id** | **String** | Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id. | |
519
445
 
520
446
  ### Return type
521
447
 
@@ -535,9 +461,9 @@ end
535
461
 
536
462
  > <ChunkMetadata> get_chunk_by_tracking_id(tr_dataset, tracking_id)
537
463
 
538
- get_chunk_by_tracking_id
464
+ Get Chunk By Tracking Id
539
465
 
540
- 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.
466
+ 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.
541
467
 
542
468
  ### Examples
543
469
 
@@ -557,7 +483,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
557
483
  tracking_id = 'tracking_id_example' # String | tracking_id of the chunk you want to fetch
558
484
 
559
485
  begin
560
- # get_chunk_by_tracking_id
486
+ # Get Chunk By Tracking Id
561
487
  result = api_instance.get_chunk_by_tracking_id(tr_dataset, tracking_id)
562
488
  p result
563
489
  rescue TrieveRubyClient::ApiError => e
@@ -573,7 +499,7 @@ This returns an Array which contains the response data, status code and headers.
573
499
 
574
500
  ```ruby
575
501
  begin
576
- # get_chunk_by_tracking_id
502
+ # Get Chunk By Tracking Id
577
503
  data, status_code, headers = api_instance.get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id)
578
504
  p status_code # => 2xx
579
505
  p headers # => { ... }
@@ -608,9 +534,9 @@ end
608
534
 
609
535
  > <Array<ChunkMetadataWithFileData>> get_recommended_chunks(tr_dataset, recommend_chunks_request)
610
536
 
611
- get_recommended_chunks
537
+ Get Recommended Chunks
612
538
 
613
- 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.
539
+ 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.
614
540
 
615
541
  ### Examples
616
542
 
@@ -630,7 +556,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
630
556
  recommend_chunks_request = TrieveRubyClient::RecommendChunksRequest.new # RecommendChunksRequest | JSON request payload to get recommendations of chunks similar to the chunks in the request
631
557
 
632
558
  begin
633
- # get_recommended_chunks
559
+ # Get Recommended Chunks
634
560
  result = api_instance.get_recommended_chunks(tr_dataset, recommend_chunks_request)
635
561
  p result
636
562
  rescue TrieveRubyClient::ApiError => e
@@ -646,7 +572,7 @@ This returns an Array which contains the response data, status code and headers.
646
572
 
647
573
  ```ruby
648
574
  begin
649
- # get_recommended_chunks
575
+ # Get Recommended Chunks
650
576
  data, status_code, headers = api_instance.get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request)
651
577
  p status_code # => 2xx
652
578
  p headers # => { ... }
@@ -681,9 +607,9 @@ end
681
607
 
682
608
  > <SearchChunkQueryResponseBody> search_chunk(tr_dataset, search_chunk_data)
683
609
 
684
- search
610
+ Search
685
611
 
686
- 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.
612
+ 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.
687
613
 
688
614
  ### Examples
689
615
 
@@ -703,7 +629,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
703
629
  search_chunk_data = TrieveRubyClient::SearchChunkData.new({query: 'query_example', search_type: 'search_type_example'}) # SearchChunkData | JSON request payload to semantically search for chunks (chunks)
704
630
 
705
631
  begin
706
- # search
632
+ # Search
707
633
  result = api_instance.search_chunk(tr_dataset, search_chunk_data)
708
634
  p result
709
635
  rescue TrieveRubyClient::ApiError => e
@@ -719,7 +645,7 @@ This returns an Array which contains the response data, status code and headers.
719
645
 
720
646
  ```ruby
721
647
  begin
722
- # search
648
+ # Search
723
649
  data, status_code, headers = api_instance.search_chunk_with_http_info(tr_dataset, search_chunk_data)
724
650
  p status_code # => 2xx
725
651
  p headers # => { ... }
@@ -754,9 +680,9 @@ end
754
680
 
755
681
  > update_chunk(tr_dataset, update_chunk_data)
756
682
 
757
- update_chunk
683
+ Update Chunk
758
684
 
759
- 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.
685
+ 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.
760
686
 
761
687
  ### Examples
762
688
 
@@ -776,7 +702,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
776
702
  update_chunk_data = TrieveRubyClient::UpdateChunkData.new # UpdateChunkData | JSON request payload to update a chunk (chunk)
777
703
 
778
704
  begin
779
- # update_chunk
705
+ # Update Chunk
780
706
  api_instance.update_chunk(tr_dataset, update_chunk_data)
781
707
  rescue TrieveRubyClient::ApiError => e
782
708
  puts "Error when calling ChunkApi->update_chunk: #{e}"
@@ -791,7 +717,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
791
717
 
792
718
  ```ruby
793
719
  begin
794
- # update_chunk
720
+ # Update Chunk
795
721
  data, status_code, headers = api_instance.update_chunk_with_http_info(tr_dataset, update_chunk_data)
796
722
  p status_code # => 2xx
797
723
  p headers # => { ... }
@@ -826,9 +752,9 @@ nil (empty response body)
826
752
 
827
753
  > update_chunk_by_tracking_id(tr_dataset, update_chunk_by_tracking_id_data)
828
754
 
829
- update_chunk_by_tracking_id
755
+ Update Chunk By Tracking Id
830
756
 
831
- 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.
757
+ 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.
832
758
 
833
759
  ### Examples
834
760
 
@@ -848,7 +774,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
848
774
  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)
849
775
 
850
776
  begin
851
- # update_chunk_by_tracking_id
777
+ # Update Chunk By Tracking Id
852
778
  api_instance.update_chunk_by_tracking_id(tr_dataset, update_chunk_by_tracking_id_data)
853
779
  rescue TrieveRubyClient::ApiError => e
854
780
  puts "Error when calling ChunkApi->update_chunk_by_tracking_id: #{e}"
@@ -863,7 +789,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
863
789
 
864
790
  ```ruby
865
791
  begin
866
- # update_chunk_by_tracking_id
792
+ # Update Chunk By Tracking Id
867
793
  data, status_code, headers = api_instance.update_chunk_by_tracking_id_with_http_info(tr_dataset, update_chunk_by_tracking_id_data)
868
794
  p status_code # => 2xx
869
795
  p headers # => { ... }
data/docs/ChunkData.md ADDED
@@ -0,0 +1,42 @@
1
+ # TrieveRubyClient::ChunkData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **chunk_html** | **String** | HTML content of the chunk. This can also be plaintext. The innerText of the HTML will be used to create the embedding vector. The point of using HTML is for convienience, as some users have applications where users submit HTML content. | [optional] |
8
+ | **chunk_vector** | **Array&lt;Float&gt;** | Chunk_vector is a vector of floats which can be used instead of generating a new embedding. This is useful for when you are using a pre-embedded dataset. If this is not provided, the innerText of the chunk_html will be used to create the embedding. | [optional] |
9
+ | **file_id** | **String** | File_uuid is the uuid of the file that the chunk is associated with. This is used to associate chunks with files. This is useful for when you want to delete a file and all of its associated chunks. | [optional] |
10
+ | **group_ids** | **Array&lt;String&gt;** | Group ids are the ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response. | [optional] |
11
+ | **group_tracking_ids** | **Array&lt;String&gt;** | Group tracking_ids are the tracking_ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response. | [optional] |
12
+ | **link** | **String** | Link to the chunk. This can also be any string. Frequently, this is a link to the source of the chunk. The link value will not affect the embedding creation. | [optional] |
13
+ | **metadata** | **Object** | Metadata is a JSON object which can be used to filter chunks. This is useful for when you want to filter chunks by arbitrary metadata. Unlike with tag filtering, there is a performance hit for filtering on metadata. | [optional] |
14
+ | **split_avg** | **Boolean** | Split avg is a boolean which tells the server to split the text in the chunk_html into smaller chunks and average their resulting vectors. This is useful for when you want to create a chunk from a large piece of text and want to split it into smaller chunks to create a more fuzzy average dense vector. The sparse vector will be generated normally with no averaging. By default this is false. | [optional] |
15
+ | **tag_set** | **Array&lt;String&gt;** | Tag set is a list of tags. This can be used to filter chunks by tag. Unlike with metadata filtering, HNSW indices will exist for each tag such that there is not a performance hit for filtering on them. | [optional] |
16
+ | **time_stamp** | **String** | Time_stamp should be an ISO 8601 combined date and time without timezone. It is used for time window filtering and recency-biasing search results. | [optional] |
17
+ | **tracking_id** | **String** | Tracking_id is a string which can be used to identify a chunk. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. | [optional] |
18
+ | **upsert_by_tracking_id** | **Boolean** | Upsert when a chunk with the same tracking_id exists. By default this is false, and the request will fail if a chunk with the same tracking_id exists. If this is true, the chunk will be updated if a chunk with the same tracking_id exists. | [optional] |
19
+ | **weight** | **Float** | Weight is a float which can be used to bias search results. This is useful for when you want to bias search results for a chunk. The magnitude only matters relative to other chunks in the chunk&#39;s dataset dataset. | [optional] |
20
+
21
+ ## Example
22
+
23
+ ```ruby
24
+ require 'trieve_ruby_client'
25
+
26
+ instance = TrieveRubyClient::ChunkData.new(
27
+ chunk_html: null,
28
+ chunk_vector: null,
29
+ file_id: null,
30
+ group_ids: null,
31
+ group_tracking_ids: null,
32
+ link: null,
33
+ metadata: null,
34
+ split_avg: null,
35
+ tag_set: null,
36
+ time_stamp: null,
37
+ tracking_id: null,
38
+ upsert_by_tracking_id: null,
39
+ weight: null
40
+ )
41
+ ```
42
+