Class: TrieveRubyClient::ChunkGroupApi
- Inherits:
-
Object
- Object
- TrieveRubyClient::ChunkGroupApi
- Defined in:
- lib/trieve_ruby_client/api/chunk_group_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_chunk_to_group(tr_dataset, group_id, add_chunk_to_group_data, opts = {}) ⇒ nil
Add Chunk to Group Add Chunk to Group Route to add a chunk to a group.
-
#add_chunk_to_group_by_tracking_id(tr_dataset, tracking_id, add_chunk_to_group_data, opts = {}) ⇒ nil
Add Chunk to Group by Tracking ID Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
-
#add_chunk_to_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, add_chunk_to_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Add Chunk to Group by Tracking ID Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
-
#add_chunk_to_group_with_http_info(tr_dataset, group_id, add_chunk_to_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Add Chunk to Group Add Chunk to Group Route to add a chunk to a group.
-
#create_chunk_group(tr_dataset, create_chunk_group_data, opts = {}) ⇒ ChunkGroup
Create Chunk Group Create Chunk Group Create a new chunk_group.
-
#create_chunk_group_with_http_info(tr_dataset, create_chunk_group_data, opts = {}) ⇒ Array<(ChunkGroup, Integer, Hash)>
Create Chunk Group Create Chunk Group Create a new chunk_group.
-
#delete_chunk_group(tr_dataset, group_id, delete_chunks, opts = {}) ⇒ nil
Delete Group Delete Group This will delete a chunk_group.
-
#delete_chunk_group_with_http_info(tr_dataset, group_id, delete_chunks, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Group Delete Group This will delete a chunk_group.
-
#delete_group_by_tracking_id(tr_dataset, tracking_id, opts = {}) ⇒ nil
Delete Group by Tracking ID Delete Group by Tracking ID Delete a chunk_group with the given tracking id.
-
#delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Group by Tracking ID Delete Group by Tracking ID Delete a chunk_group with the given tracking id.
-
#get_chunk_group(tr_dataset, group_id, opts = {}) ⇒ ChunkGroup
Get Group Get Group Fetch the group with the given id.
-
#get_chunk_group_with_http_info(tr_dataset, group_id, opts = {}) ⇒ Array<(ChunkGroup, Integer, Hash)>
Get Group Get Group Fetch the group with the given id.
-
#get_chunks_in_group(tr_dataset, group_id, page, opts = {}) ⇒ BookmarkData
Get Chunks in Group Get Chunks in Group Route to get all chunks for a group.
-
#get_chunks_in_group_by_tracking_id(tr_dataset, group_tracking_id, page, opts = {}) ⇒ BookmarkData
Get Chunks in Group by Tracking ID Get Chunks in Group by Tracking ID Route to get all chunks for a group.
-
#get_chunks_in_group_by_tracking_id_with_http_info(tr_dataset, group_tracking_id, page, opts = {}) ⇒ Array<(BookmarkData, Integer, Hash)>
Get Chunks in Group by Tracking ID Get Chunks in Group by Tracking ID Route to get all chunks for a group.
-
#get_chunks_in_group_with_http_info(tr_dataset, group_id, page, opts = {}) ⇒ Array<(BookmarkData, Integer, Hash)>
Get Chunks in Group Get Chunks in Group Route to get all chunks for a group.
-
#get_group_by_tracking_id(tr_dataset, tracking_id, opts = {}) ⇒ ChunkGroup
Get Group by Tracking ID Get Group by Tracking ID Fetch the group with the given tracking id.
-
#get_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {}) ⇒ Array<(ChunkGroup, Integer, Hash)>
Get Group by Tracking ID Get Group by Tracking ID Fetch the group with the given tracking id.
-
#get_groups_chunk_is_in(tr_dataset, get_groups_for_chunks_data, opts = {}) ⇒ Array<BookmarkGroupResult>
Get Groups for Chunks Get Groups for Chunks Route to get the groups that a chunk is in.
-
#get_groups_chunk_is_in_with_http_info(tr_dataset, get_groups_for_chunks_data, opts = {}) ⇒ Array<(Array<BookmarkGroupResult>, Integer, Hash)>
Get Groups for Chunks Get Groups for Chunks Route to get the groups that a chunk is in.
-
#get_recommended_groups(tr_dataset, recommend_group_chunks_request, opts = {}) ⇒ Array<GroupScoreChunk>
Get Recommended Groups Get Recommended Groups Route to get recommended groups.
-
#get_recommended_groups_with_http_info(tr_dataset, recommend_group_chunks_request, opts = {}) ⇒ Array<(Array<GroupScoreChunk>, Integer, Hash)>
Get Recommended Groups Get Recommended Groups Route to get recommended groups.
-
#get_specific_dataset_chunk_groups(tr_dataset, dataset_id, page, opts = {}) ⇒ GroupData
Get Groups for Dataset Get Groups for Dataset Fetch the groups which belong to a dataset specified by its id.
-
#get_specific_dataset_chunk_groups_with_http_info(tr_dataset, dataset_id, page, opts = {}) ⇒ Array<(GroupData, Integer, Hash)>
Get Groups for Dataset Get Groups for Dataset Fetch the groups which belong to a dataset specified by its id.
-
#initialize(api_client = ApiClient.default) ⇒ ChunkGroupApi
constructor
A new instance of ChunkGroupApi.
-
#remove_chunk_from_group(tr_dataset, group_id, create_chunk_group_data, opts = {}) ⇒ nil
Remove Chunk from Group Remove Chunk from Group Route to remove a chunk from a group.
-
#remove_chunk_from_group_with_http_info(tr_dataset, group_id, create_chunk_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove Chunk from Group Remove Chunk from Group Route to remove a chunk from a group.
-
#search_over_groups(tr_dataset, search_over_groups_data, opts = {}) ⇒ SearchOverGroupsResults
Search Over Groups Search Over Groups This route allows you to get groups as results instead of chunks.
-
#search_over_groups_with_http_info(tr_dataset, search_over_groups_data, opts = {}) ⇒ Array<(SearchOverGroupsResults, Integer, Hash)>
Search Over Groups Search Over Groups This route allows you to get groups as results instead of chunks.
-
#search_within_group(tr_dataset, search_within_group_data, opts = {}) ⇒ SearchWithinGroupResults
Search Within Group Search Within Group This route allows you to search only within a group.
-
#search_within_group_with_http_info(tr_dataset, search_within_group_data, opts = {}) ⇒ Array<(SearchWithinGroupResults, Integer, Hash)>
Search Within Group Search Within Group This route allows you to search only within a group.
-
#update_chunk_group(tr_dataset, update_chunk_group_data, opts = {}) ⇒ nil
Update Group Update Group Update a chunk_group.
-
#update_chunk_group_with_http_info(tr_dataset, update_chunk_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Group Update Group Update a chunk_group.
-
#update_group_by_tracking_id(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {}) ⇒ nil
Update Group by Tracking ID Update Group by Tracking ID Update a chunk_group with the given tracking id.
-
#update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Group by Tracking ID Update Group by Tracking ID Update a chunk_group with the given tracking id.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ChunkGroupApi
Returns a new instance of ChunkGroupApi.
19 20 21 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_chunk_to_group(tr_dataset, group_id, add_chunk_to_group_data, opts = {}) ⇒ nil
Add Chunk to Group Add Chunk to Group Route to add a chunk to a group.
29 30 31 32 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 29 def add_chunk_to_group(tr_dataset, group_id, add_chunk_to_group_data, opts = {}) add_chunk_to_group_with_http_info(tr_dataset, group_id, add_chunk_to_group_data, opts) nil end |
#add_chunk_to_group_by_tracking_id(tr_dataset, tracking_id, add_chunk_to_group_data, opts = {}) ⇒ nil
Add Chunk to Group by Tracking ID Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
110 111 112 113 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 110 def add_chunk_to_group_by_tracking_id(tr_dataset, tracking_id, add_chunk_to_group_data, opts = {}) add_chunk_to_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, add_chunk_to_group_data, opts) nil end |
#add_chunk_to_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, add_chunk_to_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Add Chunk to Group by Tracking ID Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 122 def add_chunk_to_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, add_chunk_to_group_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.add_chunk_to_group_by_tracking_id ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.add_chunk_to_group_by_tracking_id" end # verify the required parameter 'tracking_id' is set if @api_client.config.client_side_validation && tracking_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.add_chunk_to_group_by_tracking_id" end # verify the required parameter 'add_chunk_to_group_data' is set if @api_client.config.client_side_validation && add_chunk_to_group_data.nil? fail ArgumentError, "Missing the required parameter 'add_chunk_to_group_data' when calling ChunkGroupApi.add_chunk_to_group_by_tracking_id" end # resource path local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(add_chunk_to_group_data) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.add_chunk_to_group_by_tracking_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#add_chunk_to_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#add_chunk_to_group_with_http_info(tr_dataset, group_id, add_chunk_to_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Add Chunk to Group Add Chunk to Group Route to add a chunk to a group.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 41 def add_chunk_to_group_with_http_info(tr_dataset, group_id, add_chunk_to_group_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.add_chunk_to_group ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.add_chunk_to_group" end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.add_chunk_to_group" end # verify the required parameter 'add_chunk_to_group_data' is set if @api_client.config.client_side_validation && add_chunk_to_group_data.nil? fail ArgumentError, "Missing the required parameter 'add_chunk_to_group_data' when calling ChunkGroupApi.add_chunk_to_group" end # resource path local_var_path = '/api/chunk_group/chunk/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(add_chunk_to_group_data) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.add_chunk_to_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#add_chunk_to_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_chunk_group(tr_dataset, create_chunk_group_data, opts = {}) ⇒ ChunkGroup
Create Chunk Group Create Chunk Group Create a new chunk_group. This is a way to group chunks together. If you try to create a chunk_group with the same tracking_id as an existing chunk_group, this operation will fail.
190 191 192 193 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 190 def create_chunk_group(tr_dataset, create_chunk_group_data, opts = {}) data, _status_code, _headers = create_chunk_group_with_http_info(tr_dataset, create_chunk_group_data, opts) data end |
#create_chunk_group_with_http_info(tr_dataset, create_chunk_group_data, opts = {}) ⇒ Array<(ChunkGroup, Integer, Hash)>
Create Chunk Group Create Chunk Group Create a new chunk_group. This is a way to group chunks together. If you try to create a chunk_group with the same tracking_id as an existing chunk_group, this operation will fail.
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 201 def create_chunk_group_with_http_info(tr_dataset, create_chunk_group_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.create_chunk_group ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.create_chunk_group" end # verify the required parameter 'create_chunk_group_data' is set if @api_client.config.client_side_validation && create_chunk_group_data.nil? fail ArgumentError, "Missing the required parameter 'create_chunk_group_data' when calling ChunkGroupApi.create_chunk_group" end # resource path local_var_path = '/api/chunk_group' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_group_data) # return_type return_type = opts[:debug_return_type] || 'ChunkGroup' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.create_chunk_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#create_chunk_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_chunk_group(tr_dataset, group_id, delete_chunks, opts = {}) ⇒ nil
Delete Group Delete Group This will delete a chunk_group. If you set delete_chunks to true, it will also delete the chunks within the group.
266 267 268 269 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 266 def delete_chunk_group(tr_dataset, group_id, delete_chunks, opts = {}) delete_chunk_group_with_http_info(tr_dataset, group_id, delete_chunks, opts) nil end |
#delete_chunk_group_with_http_info(tr_dataset, group_id, delete_chunks, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Group Delete Group This will delete a chunk_group. If you set delete_chunks to true, it will also delete the chunks within the group.
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 278 def delete_chunk_group_with_http_info(tr_dataset, group_id, delete_chunks, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.delete_chunk_group ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.delete_chunk_group" end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.delete_chunk_group" end # verify the required parameter 'delete_chunks' is set if @api_client.config.client_side_validation && delete_chunks.nil? fail ArgumentError, "Missing the required parameter 'delete_chunks' when calling ChunkGroupApi.delete_chunk_group" end # resource path local_var_path = '/api/chunk_group/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'delete_chunks'] = delete_chunks # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.delete_chunk_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#delete_chunk_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_group_by_tracking_id(tr_dataset, tracking_id, opts = {}) ⇒ nil
Delete Group by Tracking ID Delete Group by Tracking ID Delete a chunk_group with the given tracking id.
342 343 344 345 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 342 def delete_group_by_tracking_id(tr_dataset, tracking_id, opts = {}) delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts) nil end |
#delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Group by Tracking ID Delete Group by Tracking ID Delete a chunk_group with the given tracking id.
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 353 def delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.delete_group_by_tracking_id ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.delete_group_by_tracking_id" end # verify the required parameter 'tracking_id' is set if @api_client.config.client_side_validation && tracking_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.delete_group_by_tracking_id" end # resource path local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.delete_group_by_tracking_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#delete_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_chunk_group(tr_dataset, group_id, opts = {}) ⇒ ChunkGroup
Get Group Get Group Fetch the group with the given id. get_group
412 413 414 415 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 412 def get_chunk_group(tr_dataset, group_id, opts = {}) data, _status_code, _headers = get_chunk_group_with_http_info(tr_dataset, group_id, opts) data end |
#get_chunk_group_with_http_info(tr_dataset, group_id, opts = {}) ⇒ Array<(ChunkGroup, Integer, Hash)>
Get Group Get Group Fetch the group with the given id. get_group
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 423 def get_chunk_group_with_http_info(tr_dataset, group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_chunk_group ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_chunk_group" end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.get_chunk_group" end # resource path local_var_path = '/api/chunk_group/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ChunkGroup' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.get_chunk_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#get_chunk_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_chunks_in_group(tr_dataset, group_id, page, opts = {}) ⇒ BookmarkData
Get Chunks in Group Get Chunks in Group Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Page is 1-indexed.
483 484 485 486 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 483 def get_chunks_in_group(tr_dataset, group_id, page, opts = {}) data, _status_code, _headers = get_chunks_in_group_with_http_info(tr_dataset, group_id, page, opts) data end |
#get_chunks_in_group_by_tracking_id(tr_dataset, group_tracking_id, page, opts = {}) ⇒ BookmarkData
Get Chunks in Group by Tracking ID Get Chunks in Group by Tracking ID Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon. Page is 1-indexed.
559 560 561 562 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 559 def get_chunks_in_group_by_tracking_id(tr_dataset, group_tracking_id, page, opts = {}) data, _status_code, _headers = get_chunks_in_group_by_tracking_id_with_http_info(tr_dataset, group_tracking_id, page, opts) data end |
#get_chunks_in_group_by_tracking_id_with_http_info(tr_dataset, group_tracking_id, page, opts = {}) ⇒ Array<(BookmarkData, Integer, Hash)>
Get Chunks in Group by Tracking ID Get Chunks in Group by Tracking ID Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon. Page is 1-indexed.
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 571 def get_chunks_in_group_by_tracking_id_with_http_info(tr_dataset, group_tracking_id, page, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_chunks_in_group_by_tracking_id ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_chunks_in_group_by_tracking_id" end # verify the required parameter 'group_tracking_id' is set if @api_client.config.client_side_validation && group_tracking_id.nil? fail ArgumentError, "Missing the required parameter 'group_tracking_id' when calling ChunkGroupApi.get_chunks_in_group_by_tracking_id" end # verify the required parameter 'page' is set if @api_client.config.client_side_validation && page.nil? fail ArgumentError, "Missing the required parameter 'page' when calling ChunkGroupApi.get_chunks_in_group_by_tracking_id" end if @api_client.config.client_side_validation && page < 0 fail ArgumentError, 'invalid value for "page" when calling ChunkGroupApi.get_chunks_in_group_by_tracking_id, must be greater than or equal to 0.' end # resource path local_var_path = '/api/chunk_group/tracking_id/{group_tracking_id}/{page}'.sub('{' + 'group_tracking_id' + '}', CGI.escape(group_tracking_id.to_s)).sub('{' + 'page' + '}', CGI.escape(page.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BookmarkData' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.get_chunks_in_group_by_tracking_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#get_chunks_in_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_chunks_in_group_with_http_info(tr_dataset, group_id, page, opts = {}) ⇒ Array<(BookmarkData, Integer, Hash)>
Get Chunks in Group Get Chunks in Group Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Page is 1-indexed.
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 495 def get_chunks_in_group_with_http_info(tr_dataset, group_id, page, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_chunks_in_group ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_chunks_in_group" end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.get_chunks_in_group" end if @api_client.config.client_side_validation && page < 0 fail ArgumentError, 'invalid value for "page" when calling ChunkGroupApi.get_chunks_in_group, must be greater than or equal to 0.' end # resource path local_var_path = '/api/chunk_group/{group_id}/{page}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'page' + '}', CGI.escape(page.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BookmarkData' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.get_chunks_in_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#get_chunks_in_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_group_by_tracking_id(tr_dataset, tracking_id, opts = {}) ⇒ ChunkGroup
Get Group by Tracking ID Get Group by Tracking ID Fetch the group with the given tracking id. get_group_by_tracking_id
638 639 640 641 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 638 def get_group_by_tracking_id(tr_dataset, tracking_id, opts = {}) data, _status_code, _headers = get_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts) data end |
#get_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {}) ⇒ Array<(ChunkGroup, Integer, Hash)>
Get Group by Tracking ID Get Group by Tracking ID Fetch the group with the given tracking id. get_group_by_tracking_id
649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 649 def get_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_group_by_tracking_id ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_group_by_tracking_id" end # verify the required parameter 'tracking_id' is set if @api_client.config.client_side_validation && tracking_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.get_group_by_tracking_id" end # resource path local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ChunkGroup' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.get_group_by_tracking_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#get_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_groups_chunk_is_in(tr_dataset, get_groups_for_chunks_data, opts = {}) ⇒ Array<BookmarkGroupResult>
Get Groups for Chunks Get Groups for Chunks Route to get the groups that a chunk is in.
708 709 710 711 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 708 def get_groups_chunk_is_in(tr_dataset, get_groups_for_chunks_data, opts = {}) data, _status_code, _headers = get_groups_chunk_is_in_with_http_info(tr_dataset, get_groups_for_chunks_data, opts) data end |
#get_groups_chunk_is_in_with_http_info(tr_dataset, get_groups_for_chunks_data, opts = {}) ⇒ Array<(Array<BookmarkGroupResult>, Integer, Hash)>
Get Groups for Chunks Get Groups for Chunks Route to get the groups that a chunk is in.
719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 719 def get_groups_chunk_is_in_with_http_info(tr_dataset, get_groups_for_chunks_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_groups_chunk_is_in ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_groups_chunk_is_in" end # verify the required parameter 'get_groups_for_chunks_data' is set if @api_client.config.client_side_validation && get_groups_for_chunks_data.nil? fail ArgumentError, "Missing the required parameter 'get_groups_for_chunks_data' when calling ChunkGroupApi.get_groups_chunk_is_in" end # resource path local_var_path = '/api/chunk_group/chunks' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(get_groups_for_chunks_data) # return_type return_type = opts[:debug_return_type] || 'Array<BookmarkGroupResult>' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.get_groups_chunk_is_in", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#get_groups_chunk_is_in\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_recommended_groups(tr_dataset, recommend_group_chunks_request, opts = {}) ⇒ Array<GroupScoreChunk>
Get Recommended Groups Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body.
783 784 785 786 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 783 def get_recommended_groups(tr_dataset, recommend_group_chunks_request, opts = {}) data, _status_code, _headers = get_recommended_groups_with_http_info(tr_dataset, recommend_group_chunks_request, opts) data end |
#get_recommended_groups_with_http_info(tr_dataset, recommend_group_chunks_request, opts = {}) ⇒ Array<(Array<GroupScoreChunk>, Integer, Hash)>
Get Recommended Groups Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body.
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 794 def get_recommended_groups_with_http_info(tr_dataset, recommend_group_chunks_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_recommended_groups ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_recommended_groups" end # verify the required parameter 'recommend_group_chunks_request' is set if @api_client.config.client_side_validation && recommend_group_chunks_request.nil? fail ArgumentError, "Missing the required parameter 'recommend_group_chunks_request' when calling ChunkGroupApi.get_recommended_groups" end # resource path local_var_path = '/api/chunk_group/recommend' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(recommend_group_chunks_request) # return_type return_type = opts[:debug_return_type] || 'Array<GroupScoreChunk>' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.get_recommended_groups", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#get_recommended_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_specific_dataset_chunk_groups(tr_dataset, dataset_id, page, opts = {}) ⇒ GroupData
Get Groups for Dataset Get Groups for Dataset Fetch the groups which belong to a dataset specified by its id.
859 860 861 862 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 859 def get_specific_dataset_chunk_groups(tr_dataset, dataset_id, page, opts = {}) data, _status_code, _headers = get_specific_dataset_chunk_groups_with_http_info(tr_dataset, dataset_id, page, opts) data end |
#get_specific_dataset_chunk_groups_with_http_info(tr_dataset, dataset_id, page, opts = {}) ⇒ Array<(GroupData, Integer, Hash)>
Get Groups for Dataset Get Groups for Dataset Fetch the groups which belong to a dataset specified by its id.
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 871 def get_specific_dataset_chunk_groups_with_http_info(tr_dataset, dataset_id, page, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_specific_dataset_chunk_groups ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_specific_dataset_chunk_groups" end # verify the required parameter 'dataset_id' is set if @api_client.config.client_side_validation && dataset_id.nil? fail ArgumentError, "Missing the required parameter 'dataset_id' when calling ChunkGroupApi.get_specific_dataset_chunk_groups" end # verify the required parameter 'page' is set if @api_client.config.client_side_validation && page.nil? fail ArgumentError, "Missing the required parameter 'page' when calling ChunkGroupApi.get_specific_dataset_chunk_groups" end # resource path local_var_path = '/api/dataset/groups/{dataset_id}/{page}'.sub('{' + 'dataset_id' + '}', CGI.escape(dataset_id.to_s)).sub('{' + 'page' + '}', CGI.escape(page.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GroupData' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.get_specific_dataset_chunk_groups", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#get_specific_dataset_chunk_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#remove_chunk_from_group(tr_dataset, group_id, create_chunk_group_data, opts = {}) ⇒ nil
Remove Chunk from Group Remove Chunk from Group Route to remove a chunk from a group.
935 936 937 938 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 935 def remove_chunk_from_group(tr_dataset, group_id, create_chunk_group_data, opts = {}) remove_chunk_from_group_with_http_info(tr_dataset, group_id, create_chunk_group_data, opts) nil end |
#remove_chunk_from_group_with_http_info(tr_dataset, group_id, create_chunk_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove Chunk from Group Remove Chunk from Group Route to remove a chunk from a group.
947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 947 def remove_chunk_from_group_with_http_info(tr_dataset, group_id, create_chunk_group_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.remove_chunk_from_group ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.remove_chunk_from_group" end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.remove_chunk_from_group" end # verify the required parameter 'create_chunk_group_data' is set if @api_client.config.client_side_validation && create_chunk_group_data.nil? fail ArgumentError, "Missing the required parameter 'create_chunk_group_data' when calling ChunkGroupApi.remove_chunk_from_group" end # resource path local_var_path = '/api/chunk_group/chunk/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_group_data) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.remove_chunk_from_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#remove_chunk_from_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_over_groups(tr_dataset, search_over_groups_data, opts = {}) ⇒ SearchOverGroupsResults
Search Over Groups Search Over Groups This route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes.
1015 1016 1017 1018 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1015 def search_over_groups(tr_dataset, search_over_groups_data, opts = {}) data, _status_code, _headers = search_over_groups_with_http_info(tr_dataset, search_over_groups_data, opts) data end |
#search_over_groups_with_http_info(tr_dataset, search_over_groups_data, opts = {}) ⇒ Array<(SearchOverGroupsResults, Integer, Hash)>
Search Over Groups Search Over Groups This route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes.
1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1026 def search_over_groups_with_http_info(tr_dataset, search_over_groups_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.search_over_groups ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.search_over_groups" end # verify the required parameter 'search_over_groups_data' is set if @api_client.config.client_side_validation && search_over_groups_data.nil? fail ArgumentError, "Missing the required parameter 'search_over_groups_data' when calling ChunkGroupApi.search_over_groups" end # resource path local_var_path = '/api/chunk_group/group_oriented_search' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(search_over_groups_data) # return_type return_type = opts[:debug_return_type] || 'SearchOverGroupsResults' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.search_over_groups", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#search_over_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_within_group(tr_dataset, search_within_group_data, opts = {}) ⇒ SearchWithinGroupResults
Search Within Group Search Within Group This route allows you to search only within a group. This is useful for when you only want search results to contain chunks which are members of a specific group. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large.
1090 1091 1092 1093 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1090 def search_within_group(tr_dataset, search_within_group_data, opts = {}) data, _status_code, _headers = search_within_group_with_http_info(tr_dataset, search_within_group_data, opts) data end |
#search_within_group_with_http_info(tr_dataset, search_within_group_data, opts = {}) ⇒ Array<(SearchWithinGroupResults, Integer, Hash)>
Search Within Group Search Within Group This route allows you to search only within a group. This is useful for when you only want search results to contain chunks which are members of a specific group. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large.
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1101 def search_within_group_with_http_info(tr_dataset, search_within_group_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.search_within_group ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.search_within_group" end # verify the required parameter 'search_within_group_data' is set if @api_client.config.client_side_validation && search_within_group_data.nil? fail ArgumentError, "Missing the required parameter 'search_within_group_data' when calling ChunkGroupApi.search_within_group" end # resource path local_var_path = '/api/chunk_group/search' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(search_within_group_data) # return_type return_type = opts[:debug_return_type] || 'SearchWithinGroupResults' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.search_within_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#search_within_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_chunk_group(tr_dataset, update_chunk_group_data, opts = {}) ⇒ nil
Update Group Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail.
1165 1166 1167 1168 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1165 def update_chunk_group(tr_dataset, update_chunk_group_data, opts = {}) update_chunk_group_with_http_info(tr_dataset, update_chunk_group_data, opts) nil end |
#update_chunk_group_with_http_info(tr_dataset, update_chunk_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Group Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail.
1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1176 def update_chunk_group_with_http_info(tr_dataset, update_chunk_group_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.update_chunk_group ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.update_chunk_group" end # verify the required parameter 'update_chunk_group_data' is set if @api_client.config.client_side_validation && update_chunk_group_data.nil? fail ArgumentError, "Missing the required parameter 'update_chunk_group_data' when calling ChunkGroupApi.update_chunk_group" end # resource path local_var_path = '/api/chunk_group' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_chunk_group_data) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.update_chunk_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#update_chunk_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_group_by_tracking_id(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {}) ⇒ nil
Update Group by Tracking ID Update Group by Tracking ID Update a chunk_group with the given tracking id.
1241 1242 1243 1244 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1241 def update_group_by_tracking_id(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {}) update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts) nil end |
#update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Group by Tracking ID Update Group by Tracking ID Update a chunk_group with the given tracking id.
1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1253 def update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.update_group_by_tracking_id ...' end # verify the required parameter 'tr_dataset' is set if @api_client.config.client_side_validation && tr_dataset.nil? fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.update_group_by_tracking_id" end # verify the required parameter 'tracking_id' is set if @api_client.config.client_side_validation && tracking_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.update_group_by_tracking_id" end # verify the required parameter 'update_group_by_tracking_id_data' is set if @api_client.config.client_side_validation && update_group_by_tracking_id_data.nil? fail ArgumentError, "Missing the required parameter 'update_group_by_tracking_id_data' when calling ChunkGroupApi.update_group_by_tracking_id" end # resource path local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'TR-Dataset'] = tr_dataset # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_group_by_tracking_id_data) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ChunkGroupApi.update_group_by_tracking_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChunkGroupApi#update_group_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |