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 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 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 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 Route to add a chunk to a group.
-
#create_chunk_group(tr_dataset, create_chunk_group_req_payload, opts = {}) ⇒ ChunkGroup
Create Chunk Group Create a new chunk_group.
-
#create_chunk_group_with_http_info(tr_dataset, create_chunk_group_req_payload, opts = {}) ⇒ Array<(ChunkGroup, Integer, Hash)>
Create Chunk Group Create a new chunk_group.
-
#delete_chunk_group(tr_dataset, group_id, delete_chunks, opts = {}) ⇒ nil
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 This will delete a chunk_group.
-
#delete_group_by_tracking_id(tr_dataset, tracking_id, delete_chunks, opts = {}) ⇒ nil
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, delete_chunks, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Group by Tracking ID Delete a chunk_group with the given tracking id.
-
#get_chunk_group(tr_dataset, group_id, opts = {}) ⇒ ChunkGroupAndFileId
Get Group Fetch the group with the given id.
-
#get_chunk_group_with_http_info(tr_dataset, group_id, opts = {}) ⇒ Array<(ChunkGroupAndFileId, Integer, Hash)>
Get Group Fetch the group with the given id.
-
#get_chunks_in_group(tr_dataset, group_id, page, opts = {}) ⇒ BookmarkGroupResponse
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 = {}) ⇒ BookmarkGroupResponse
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<(BookmarkGroupResponse, Integer, Hash)>
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<(BookmarkGroupResponse, Integer, Hash)>
Get Chunks in Group Route to get all chunks for a group.
-
#get_group_by_tracking_id(tr_dataset, tracking_id, opts = {}) ⇒ ChunkGroupAndFileId
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<(ChunkGroupAndFileId, Integer, Hash)>
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<BookmarkGroupResponse>
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<BookmarkGroupResponse>, Integer, Hash)>
Get Groups for Chunks Route to get the groups that a chunk is in.
-
#get_groups_for_dataset(tr_dataset, dataset_id, page, opts = {}) ⇒ GroupData
Get Groups for Dataset Fetch the groups which belong to a dataset specified by its id.
-
#get_groups_for_dataset_with_http_info(tr_dataset, dataset_id, page, opts = {}) ⇒ Array<(GroupData, Integer, Hash)>
Get Groups for Dataset Fetch the groups which belong to a dataset specified by its id.
-
#get_recommended_groups(tr_dataset, recommend_group_chunks_request, opts = {}) ⇒ RecommendGroupsResponse
Get Recommended Groups Route to get recommended groups.
-
#get_recommended_groups_with_http_info(tr_dataset, recommend_group_chunks_request, opts = {}) ⇒ Array<(RecommendGroupsResponse, Integer, Hash)>
Get Recommended Groups Route to get recommended groups.
-
#initialize(api_client = ApiClient.default) ⇒ ChunkGroupApi
constructor
A new instance of ChunkGroupApi.
-
#remove_chunk_from_group(tr_dataset, group_id, remove_chunk_from_group_req_payload, opts = {}) ⇒ nil
Remove Chunk from Group Route to remove a chunk from a group.
-
#remove_chunk_from_group_with_http_info(tr_dataset, group_id, remove_chunk_from_group_req_payload, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove Chunk from Group Route to remove a chunk from a group.
-
#search_over_groups(tr_dataset, search_over_groups_data, opts = {}) ⇒ SearchOverGroupsResponseTypes
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<(SearchOverGroupsResponseTypes, Integer, Hash)>
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 = {}) ⇒ SearchGroupResponseTypes
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<(SearchGroupResponseTypes, Integer, Hash)>
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 a chunk_group.
-
#update_chunk_group_with_http_info(tr_dataset, update_chunk_group_data, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Group Update a chunk_group.
-
#update_group_by_tracking_id(tr_dataset, tracking_id, update_group_by_tracking_id_req_payload, opts = {}) ⇒ nil
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_req_payload, opts = {}) ⇒ Array<(nil, Integer, Hash)>
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 Route to add a chunk to a group. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
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 Route to add a chunk to a group by tracking id. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
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 Route to add a chunk to a group by tracking id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
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 Route to add a chunk to a group. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
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_req_payload, opts = {}) ⇒ ChunkGroup
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. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
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_req_payload, opts = {}) data, _status_code, _headers = create_chunk_group_with_http_info(tr_dataset, create_chunk_group_req_payload, opts) data end |
#create_chunk_group_with_http_info(tr_dataset, create_chunk_group_req_payload, opts = {}) ⇒ Array<(ChunkGroup, Integer, Hash)>
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. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
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_req_payload, 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_req_payload' is set if @api_client.config.client_side_validation && create_chunk_group_req_payload.nil? fail ArgumentError, "Missing the required parameter 'create_chunk_group_req_payload' 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_req_payload) # 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 This will delete a chunk_group. If you set delete_chunks to true, it will also delete the chunks within the group. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
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 This will delete a chunk_group. If you set delete_chunks to true, it will also delete the chunks within the group. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
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, delete_chunks, opts = {}) ⇒ nil
Delete Group by Tracking ID Delete a chunk_group with the given tracking id. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
343 344 345 346 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 343 def delete_group_by_tracking_id(tr_dataset, tracking_id, delete_chunks, opts = {}) delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, delete_chunks, opts) nil end |
#delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, delete_chunks, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Group by Tracking ID Delete a chunk_group with the given tracking id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
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 405 406 407 408 409 410 411 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 355 def delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, delete_chunks, 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 # 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_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] || {} 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_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 = {}) ⇒ ChunkGroupAndFileId
Get Group Fetch the group with the given id. get_group
419 420 421 422 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 419 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<(ChunkGroupAndFileId, Integer, Hash)>
Get Group Fetch the group with the given id. get_group
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 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 430 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] || 'ChunkGroupAndFileId' # 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 = {}) ⇒ BookmarkGroupResponse
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.
491 492 493 494 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 491 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 = {}) ⇒ BookmarkGroupResponse
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.
570 571 572 573 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 570 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<(BookmarkGroupResponse, Integer, Hash)>
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.
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 635 636 637 638 639 640 641 642 643 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 583 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 header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BookmarkGroupResponse' # 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<(BookmarkGroupResponse, Integer, Hash)>
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.
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 551 552 553 554 555 556 557 558 559 560 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 504 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 header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BookmarkGroupResponse' # 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 = {}) ⇒ ChunkGroupAndFileId
Get Group by Tracking ID Fetch the group with the given tracking id. get_group_by_tracking_id
651 652 653 654 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 651 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<(ChunkGroupAndFileId, Integer, Hash)>
Get Group by Tracking ID Fetch the group with the given tracking id. get_group_by_tracking_id
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 706 707 708 709 710 711 712 713 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 662 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] || 'ChunkGroupAndFileId' # 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<BookmarkGroupResponse>
Get Groups for Chunks Route to get the groups that a chunk is in.
721 722 723 724 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 721 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<BookmarkGroupResponse>, Integer, Hash)>
Get Groups for Chunks Route to get the groups that a chunk is in.
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 777 778 779 780 781 782 783 784 785 786 787 788 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 732 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<BookmarkGroupResponse>' # 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_groups_for_dataset(tr_dataset, dataset_id, page, opts = {}) ⇒ GroupData
Get Groups for Dataset Fetch the groups which belong to a dataset specified by its id.
797 798 799 800 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 797 def get_groups_for_dataset(tr_dataset, dataset_id, page, opts = {}) data, _status_code, _headers = get_groups_for_dataset_with_http_info(tr_dataset, dataset_id, page, opts) data end |
#get_groups_for_dataset_with_http_info(tr_dataset, dataset_id, page, opts = {}) ⇒ Array<(GroupData, Integer, Hash)>
Get Groups for Dataset Fetch the groups which belong to a dataset specified by its id.
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 853 854 855 856 857 858 859 860 861 862 863 864 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 809 def get_groups_for_dataset_with_http_info(tr_dataset, dataset_id, page, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_groups_for_dataset ...' 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_for_dataset" 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_groups_for_dataset" 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_groups_for_dataset" 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_groups_for_dataset", :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_groups_for_dataset\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 = {}) ⇒ RecommendGroupsResponse
Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body. You must provide at least one positive group id or group tracking id.
873 874 875 876 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 873 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<(RecommendGroupsResponse, Integer, Hash)>
Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body. You must provide at least one positive group id or group tracking id.
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 934 935 936 937 938 939 940 941 942 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 885 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 header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil? # 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] || 'RecommendGroupsResponse' # 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 |
#remove_chunk_from_group(tr_dataset, group_id, remove_chunk_from_group_req_payload, opts = {}) ⇒ nil
Remove Chunk from Group Route to remove a chunk from a group. Auth’ed user or api key must be an admin or owner of the dataset’s organization to remove a chunk from a group.
951 952 953 954 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 951 def remove_chunk_from_group(tr_dataset, group_id, remove_chunk_from_group_req_payload, opts = {}) remove_chunk_from_group_with_http_info(tr_dataset, group_id, remove_chunk_from_group_req_payload, opts) nil end |
#remove_chunk_from_group_with_http_info(tr_dataset, group_id, remove_chunk_from_group_req_payload, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove Chunk from Group Route to remove a chunk from a group. Auth'ed user or api key must be an admin or owner of the dataset's organization to remove a chunk from a group.
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 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 963 def remove_chunk_from_group_with_http_info(tr_dataset, group_id, remove_chunk_from_group_req_payload, 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 'remove_chunk_from_group_req_payload' is set if @api_client.config.client_side_validation && remove_chunk_from_group_req_payload.nil? fail ArgumentError, "Missing the required parameter 'remove_chunk_from_group_req_payload' 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(remove_chunk_from_group_req_payload) # 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 = {}) ⇒ SearchOverGroupsResponseTypes
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 scores from a cross encoder model. Compatible with semantic, fulltext, or hybrid search modes.
1032 1033 1034 1035 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1032 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<(SearchOverGroupsResponseTypes, Integer, Hash)>
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 scores from a cross encoder model. Compatible with semantic, fulltext, or hybrid search modes.
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 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1044 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 header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil? # 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] || 'SearchOverGroupsResponseTypes' # 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 = {}) ⇒ SearchGroupResponseTypes
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 scores from a cross encoder model.
1110 1111 1112 1113 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1110 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<(SearchGroupResponseTypes, Integer, Hash)>
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 scores from a cross encoder model.
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 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1122 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 header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil? # 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] || 'SearchGroupResponseTypes' # 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 a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
1187 1188 1189 1190 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1187 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 a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
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 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1198 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_req_payload, opts = {}) ⇒ nil
Update Group by Tracking ID Update a chunk_group with the given tracking id. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
1263 1264 1265 1266 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1263 def update_group_by_tracking_id(tr_dataset, tracking_id, update_group_by_tracking_id_req_payload, opts = {}) update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_req_payload, opts) nil end |
#update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_req_payload, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Group by Tracking ID Update a chunk_group with the given tracking id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
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 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 |
# File 'lib/trieve_ruby_client/api/chunk_group_api.rb', line 1275 def update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_req_payload, 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_req_payload' is set if @api_client.config.client_side_validation && update_group_by_tracking_id_req_payload.nil? fail ArgumentError, "Missing the required parameter 'update_group_by_tracking_id_req_payload' 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_req_payload) # 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 |