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, tracking_or_chunk, delete_chunks, opts = {}) ⇒ nil
delete_chunk_group delete_chunk_group This will delete a chunk_group.
-
#delete_chunk_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, delete_chunks, opts = {}) ⇒ Array<(nil, Integer, Hash)>
delete_chunk_group delete_chunk_group This will delete a chunk_group.
- #delete_group_by_tracking_id(tr_dataset, tracking_id, opts = {}) ⇒ nil
-
#delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
-
#get_chunks_in_group(tr_dataset, group_id, tracking_or_chunk, 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, tracking_or_chunk, 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.
-
#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.
- #get_groups_chunk_is_in(tr_dataset, get_groups_for_chunks_data, opts = {}) ⇒ Array<BookmarkGroupResult>
-
#get_groups_chunk_is_in_with_http_info(tr_dataset, get_groups_for_chunks_data, opts = {}) ⇒ Array<(Array<BookmarkGroupResult>, Integer, Hash)>
Array<BookmarkGroupResult> data, response status code and response headers.
- #get_recommended_groups(tr_dataset, reccomend_group_chunks_request, opts = {}) ⇒ Array<GroupScoreChunkDTO>
-
#get_recommended_groups_with_http_info(tr_dataset, reccomend_group_chunks_request, opts = {}) ⇒ Array<(Array<GroupScoreChunkDTO>, Integer, Hash)>
Array<GroupScoreChunkDTO> data, response status code and response headers.
-
#get_specific_dataset_chunk_groups(tr_dataset, dataset_id, page, opts = {}) ⇒ GroupData
get_dataset_groups get_dataset_groups 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_dataset_groups get_dataset_groups 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(search_over_groups_data, opts = {}) ⇒ SearchOverGroupsResponseBody
group_oriented_search group_oriented_search This route allows you to get groups as results instead of chunks.
-
#search_over_groups_with_http_info(search_over_groups_data, opts = {}) ⇒ Array<(SearchOverGroupsResponseBody, Integer, Hash)>
group_oriented_search group_oriented_search This route allows you to get groups as results instead of chunks.
-
#search_within_group(tr_dataset, search_within_group_data, opts = {}) ⇒ SearchGroupsResult
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<(SearchGroupsResult, 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_chunk_group update_chunk_group Update a chunk_group.
-
#update_chunk_group_with_http_info(tr_dataset, update_chunk_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
update_chunk_group update_chunk_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_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
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. Think of a bookmark as a chunk which is a member of a group.
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. Think of a bookmark as a chunk which is a member of a group.
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] || ['Cookie', '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] || ['Cookie', '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.
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.
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] || ['Cookie', '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, tracking_or_chunk, delete_chunks, opts = {}) ⇒ nil
delete_chunk_group delete_chunk_group This will delete a chunk_group. This will not delete the chunks that are in the group. We will soon support deleting a chunk_group along with its member chunks.
267 268 269 270 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 267 def delete_chunk_group(tr_dataset, group_id, tracking_or_chunk, delete_chunks, opts = {}) delete_chunk_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, delete_chunks, opts) nil end |
#delete_chunk_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, delete_chunks, opts = {}) ⇒ Array<(nil, Integer, Hash)>
delete_chunk_group delete_chunk_group This will delete a chunk_group. This will not delete the chunks that are in the group. We will soon support deleting a chunk_group along with its member chunks.
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 335 336 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 280 def delete_chunk_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, 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 'tracking_or_chunk' is set if @api_client.config.client_side_validation && tracking_or_chunk.nil? fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' 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/{tracking_or_chunk}/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.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] || ['Cookie', '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
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)>
Returns nil, response status code and response headers.
351 352 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 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 351 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] || ['Cookie', '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_chunks_in_group(tr_dataset, group_id, tracking_or_chunk, 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. Support for custom page size is coming soon.
412 413 414 415 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 412 def get_chunks_in_group(tr_dataset, group_id, tracking_or_chunk, page, opts = {}) data, _status_code, _headers = get_chunks_in_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, 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.
493 494 495 496 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 493 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.
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 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 505 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] || ['Cookie', '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, tracking_or_chunk, 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. Support for custom page size is coming soon.
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 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 425 def get_chunks_in_group_with_http_info(tr_dataset, group_id, tracking_or_chunk, 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 'tracking_or_chunk' is set if @api_client.config.client_side_validation && tracking_or_chunk.nil? fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkGroupApi.get_chunks_in_group" 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" 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/{tracking_or_chunk}/{group_id}/{page}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.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] || ['Cookie', '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
572 573 574 575 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 572 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
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 631 632 633 634 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 583 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] || ['Cookie', '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>
640 641 642 643 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 640 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)>
Returns Array<BookmarkGroupResult> data, response status code and response headers.
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 701 702 703 704 705 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 649 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] || ['Cookie', '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, reccomend_group_chunks_request, opts = {}) ⇒ Array<GroupScoreChunkDTO>
711 712 713 714 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 711 def get_recommended_groups(tr_dataset, reccomend_group_chunks_request, opts = {}) data, _status_code, _headers = get_recommended_groups_with_http_info(tr_dataset, reccomend_group_chunks_request, opts) data end |
#get_recommended_groups_with_http_info(tr_dataset, reccomend_group_chunks_request, opts = {}) ⇒ Array<(Array<GroupScoreChunkDTO>, Integer, Hash)>
Returns Array<GroupScoreChunkDTO> data, response status code and response headers.
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 776 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 720 def get_recommended_groups_with_http_info(tr_dataset, reccomend_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 'reccomend_group_chunks_request' is set if @api_client.config.client_side_validation && reccomend_group_chunks_request.nil? fail ArgumentError, "Missing the required parameter 'reccomend_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(reccomend_group_chunks_request) # return_type return_type = opts[:debug_return_type] || 'Array<GroupScoreChunkDTO>' # auth_names auth_names = opts[:debug_auth_names] || ['Cookie', '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_dataset_groups get_dataset_groups Fetch the groups which belong to a dataset specified by its id.
785 786 787 788 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 785 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_dataset_groups get_dataset_groups Fetch the groups which belong to a dataset specified by its id.
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 851 852 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 797 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] || ['Cookie', '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.
861 862 863 864 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 861 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.
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 927 928 929 930 931 932 933 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 873 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] || ['Cookie', '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(search_over_groups_data, opts = {}) ⇒ SearchOverGroupsResponseBody
group_oriented_search group_oriented_search 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.
940 941 942 943 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 940 def search_over_groups(search_over_groups_data, opts = {}) data, _status_code, _headers = search_over_groups_with_http_info(search_over_groups_data, opts) data end |
#search_over_groups_with_http_info(search_over_groups_data, opts = {}) ⇒ Array<(SearchOverGroupsResponseBody, Integer, Hash)>
group_oriented_search group_oriented_search 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.
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 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 950 def search_over_groups_with_http_info(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 '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 # 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] || 'SearchOverGroupsResponseBody' # auth_names auth_names = opts[:debug_auth_names] || [] = 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 = {}) ⇒ SearchGroupsResult
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.
1009 1010 1011 1012 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1009 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<(SearchGroupsResult, 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.
1020 1021 1022 1023 1024 1025 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 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1020 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] || 'SearchGroupsResult' # auth_names auth_names = opts[:debug_auth_names] || ['Cookie', '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_chunk_group update_chunk_group Update a chunk_group.
1084 1085 1086 1087 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1084 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_chunk_group update_chunk_group Update a chunk_group.
1095 1096 1097 1098 1099 1100 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 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1095 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] || ['Cookie', '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
1158 1159 1160 1161 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1158 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)>
Returns nil, response status code and response headers.
1168 1169 1170 1171 1172 1173 1174 1175 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 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1168 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] || ['Cookie', '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 |