trieve_ruby_client 0.8.2 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +39 -30
- data/docs/ApiKeyRespBody.md +32 -0
- data/docs/AutocompleteData.md +42 -0
- data/docs/AutocompleteReqPayload.md +50 -0
- data/docs/BoostPhrase.md +20 -0
- data/docs/ChunkApi.md +140 -66
- data/docs/ChunkData.md +3 -1
- data/docs/ChunkFilter.md +3 -3
- data/docs/ChunkGroup.md +1 -1
- data/docs/ChunkGroupApi.md +35 -33
- data/docs/ChunkMetadata.md +5 -1
- data/docs/ChunkMetadataStringTagSet.md +46 -0
- data/docs/ChunkMetadataTypes.md +51 -0
- data/docs/ChunkReqPayload.md +50 -0
- data/docs/ClientDatasetConfiguration.md +0 -2
- data/docs/ConditionType.md +49 -0
- data/docs/ContentChunkMetadata.md +32 -0
- data/docs/CreateChunkGroupReqPayload.md +28 -0
- data/docs/CreateChunkReqPayloadEnum.md +49 -0
- data/docs/CreateDatasetRequest.md +2 -2
- data/docs/CreateMessageData.md +2 -2
- data/docs/CreateMessageReqPayload.md +42 -0
- data/docs/CreateTopicReqPayload.md +22 -0
- data/docs/Dataset.md +2 -0
- data/docs/DatasetApi.md +236 -12
- data/docs/DateRange.md +24 -0
- data/docs/EditMessageReqPayload.md +44 -0
- data/docs/FieldCondition.md +2 -0
- data/docs/File.md +1 -1
- data/docs/FileApi.md +7 -7
- data/docs/GenerateChunksRequest.md +2 -0
- data/docs/GetDatasetsPagination.md +20 -0
- data/docs/HasIDCondition.md +20 -0
- data/docs/InvitationApi.md +1 -1
- data/docs/MatchCondition.md +3 -1
- data/docs/MessageApi.md +42 -42
- data/docs/Organization.md +2 -0
- data/docs/OrganizationApi.md +24 -25
- data/docs/RangeCondition.md +1 -3
- data/docs/RegenerateMessageReqPayload.md +40 -0
- data/docs/RemoveChunkFromGroupReqPayload.md +18 -0
- data/docs/ScoreChunkDTO.md +3 -1
- data/docs/SearchChunkData.md +9 -3
- data/docs/SearchChunksReqPayload.md +54 -0
- data/docs/SearchOverGroupsData.md +10 -2
- data/docs/SearchWithinGroupData.md +12 -2
- data/docs/SetUserApiKeyRequest.md +4 -0
- data/docs/SlimChunkMetadata.md +4 -0
- data/docs/SuggestedQueriesReqPayload.md +18 -0
- data/docs/TopicApi.md +16 -16
- data/docs/UpdateChunkData.md +2 -0
- data/docs/UpdateChunkReqPayload.md +46 -0
- data/docs/UpdateDatasetRequest.md +2 -0
- data/docs/UpdateGroupByTrackingIDReqPayload.md +26 -0
- data/docs/UpdateTopicReqPayload.md +20 -0
- data/docs/UpdateUserOrgRoleData.md +1 -1
- data/docs/UploadFileReqPayload.md +40 -0
- data/docs/UserApi.md +7 -8
- data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_api.rb +158 -83
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +58 -51
- data/lib/trieve_ruby_client/api/dataset_api.rb +224 -15
- data/lib/trieve_ruby_client/api/events_api.rb +1 -1
- data/lib/trieve_ruby_client/api/file_api.rb +12 -12
- data/lib/trieve_ruby_client/api/health_api.rb +1 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +3 -3
- data/lib/trieve_ruby_client/api/message_api.rb +50 -50
- data/lib/trieve_ruby_client/api/organization_api.rb +27 -27
- data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
- data/lib/trieve_ruby_client/api/topic_api.rb +27 -27
- data/lib/trieve_ruby_client/api/user_api.rb +8 -8
- data/lib/trieve_ruby_client/api_client.rb +1 -1
- data/lib/trieve_ruby_client/api_error.rb +1 -1
- data/lib/trieve_ruby_client/configuration.rb +1 -1
- data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/api_key_resp_body.rb +325 -0
- data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
- data/lib/trieve_ruby_client/models/autocomplete_data.rb +378 -0
- data/lib/trieve_ruby_client/models/autocomplete_req_payload.rb +467 -0
- data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
- data/lib/trieve_ruby_client/models/boost_phrase.rb +240 -0
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_data.rb +16 -9
- data/lib/trieve_ruby_client/models/chunk_filter.rb +4 -4
- data/lib/trieve_ruby_client/models/chunk_group.rb +5 -3
- data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +28 -4
- data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +387 -0
- data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +106 -0
- data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_req_payload.rb +400 -0
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +2 -18
- data/lib/trieve_ruby_client/models/condition_type.rb +105 -0
- data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +299 -0
- data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_group_req_payload.rb +273 -0
- data/lib/trieve_ruby_client/models/create_chunk_req_payload_enum.rb +105 -0
- data/lib/trieve_ruby_client/models/create_dataset_request.rb +3 -3
- data/lib/trieve_ruby_client/models/create_message_data.rb +13 -13
- data/lib/trieve_ruby_client/models/create_message_req_payload.rb +378 -0
- data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_topic_req_payload.rb +244 -0
- data/lib/trieve_ruby_client/models/dataset.rb +18 -2
- data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/date_range.rb +245 -0
- data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/edit_message_req_payload.rb +395 -0
- data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/event.rb +1 -1
- data/lib/trieve_ruby_client/models/event_return.rb +1 -1
- data/lib/trieve_ruby_client/models/field_condition.rb +12 -2
- data/lib/trieve_ruby_client/models/file.rb +5 -3
- data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +13 -2
- data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
- data/lib/trieve_ruby_client/models/geo_types.rb +1 -1
- data/lib/trieve_ruby_client/models/get_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_datasets_pagination.rb +225 -0
- data/lib/trieve_ruby_client/models/get_events_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_score_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/has_id_condition.rb +229 -0
- data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
- data/lib/trieve_ruby_client/models/location_bounding_box.rb +1 -1
- data/lib/trieve_ruby_client/models/location_polygon.rb +1 -1
- data/lib/trieve_ruby_client/models/location_radius.rb +1 -1
- data/lib/trieve_ruby_client/models/match_condition.rb +2 -1
- data/lib/trieve_ruby_client/models/message.rb +1 -1
- data/lib/trieve_ruby_client/models/organization.rb +18 -2
- data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/range.rb +1 -1
- data/lib/trieve_ruby_client/models/range_condition.rb +2 -3
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/regenerate_message_req_payload.rb +361 -0
- data/lib/trieve_ruby_client/models/remove_chunk_from_group_req_payload.rb +222 -0
- data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +15 -3
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +40 -5
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunks_req_payload.rb +504 -0
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +93 -4
- data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +106 -4
- data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +28 -2
- data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
- data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +24 -2
- data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
- data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_req_payload.rb +222 -0
- data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
- data/lib/trieve_ruby_client/models/topic.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_data.rb +15 -2
- data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +376 -0
- data/lib/trieve_ruby_client/models/update_dataset_request.rb +13 -2
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_req_payload.rb +268 -0
- data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_topic_req_payload.rb +239 -0
- data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +2 -2
- data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_req_payload.rb +368 -0
- data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
- data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
- data/lib/trieve_ruby_client/version.rb +2 -2
- data/lib/trieve_ruby_client.rb +25 -20
- data/openapi-generator.yaml +1 -1
- data/openapi.json +1 -7789
- data/spec/models/api_key_resp_body_spec.rb +78 -0
- data/spec/models/autocomplete_data_spec.rb +108 -0
- data/spec/models/autocomplete_req_payload_spec.rb +132 -0
- data/spec/models/boost_phrase_spec.rb +42 -0
- data/spec/models/chunk_metadata_string_tag_set_spec.rb +120 -0
- data/spec/models/chunk_metadata_types_spec.rb +32 -0
- data/spec/models/chunk_req_payload_spec.rb +132 -0
- data/spec/models/condition_type_spec.rb +32 -0
- data/spec/models/content_chunk_metadata_spec.rb +72 -0
- data/spec/models/create_chunk_group_req_payload_spec.rb +66 -0
- data/spec/models/create_chunk_req_payload_enum_spec.rb +32 -0
- data/spec/models/create_message_req_payload_spec.rb +108 -0
- data/spec/models/create_topic_req_payload_spec.rb +48 -0
- data/spec/models/date_range_spec.rb +54 -0
- data/spec/models/edit_message_req_payload_spec.rb +114 -0
- data/spec/models/get_datasets_pagination_spec.rb +42 -0
- data/spec/models/has_id_condition_spec.rb +42 -0
- data/spec/models/regenerate_message_req_payload_spec.rb +102 -0
- data/spec/models/remove_chunk_from_group_req_payload_spec.rb +36 -0
- data/spec/models/search_chunks_req_payload_spec.rb +144 -0
- data/spec/models/suggested_queries_req_payload_spec.rb +36 -0
- data/spec/models/update_chunk_req_payload_spec.rb +120 -0
- data/spec/models/update_group_by_tracking_id_req_payload_spec.rb +60 -0
- data/spec/models/update_topic_req_payload_spec.rb +42 -0
- data/spec/models/upload_file_req_payload_spec.rb +102 -0
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.8.2.gem +0 -0
- data/trieve_ruby_client-0.8.5.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +104 -2
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -19,37 +19,37 @@ module TrieveRubyClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
#
|
23
|
-
#
|
22
|
+
# Autocomplete
|
23
|
+
# Autocomplete This route provides the primary autocomplete functionality for the API. This prioritize prefix matching with semantic or full-text search.
|
24
24
|
# @param tr_dataset [String] The dataset id to use for the request
|
25
|
-
# @param
|
25
|
+
# @param autocomplete_req_payload [AutocompleteReqPayload] JSON request payload to semantically search for chunks (chunks)
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
|
-
# @return [
|
28
|
-
def
|
29
|
-
data, _status_code, _headers =
|
27
|
+
# @return [SearchChunkQueryResponseBody]
|
28
|
+
def autocomplete(tr_dataset, autocomplete_req_payload, opts = {})
|
29
|
+
data, _status_code, _headers = autocomplete_with_http_info(tr_dataset, autocomplete_req_payload, opts)
|
30
30
|
data
|
31
31
|
end
|
32
32
|
|
33
|
-
#
|
34
|
-
#
|
33
|
+
# Autocomplete
|
34
|
+
# Autocomplete This route provides the primary autocomplete functionality for the API. This prioritize prefix matching with semantic or full-text search.
|
35
35
|
# @param tr_dataset [String] The dataset id to use for the request
|
36
|
-
# @param
|
36
|
+
# @param autocomplete_req_payload [AutocompleteReqPayload] JSON request payload to semantically search for chunks (chunks)
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
|
-
# @return [Array<(
|
39
|
-
def
|
38
|
+
# @return [Array<(SearchChunkQueryResponseBody, Integer, Hash)>] SearchChunkQueryResponseBody data, response status code and response headers
|
39
|
+
def autocomplete_with_http_info(tr_dataset, autocomplete_req_payload, opts = {})
|
40
40
|
if @api_client.config.debugging
|
41
|
-
@api_client.config.logger.debug 'Calling API: ChunkApi.
|
41
|
+
@api_client.config.logger.debug 'Calling API: ChunkApi.autocomplete ...'
|
42
42
|
end
|
43
43
|
# verify the required parameter 'tr_dataset' is set
|
44
44
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
45
|
-
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.
|
45
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.autocomplete"
|
46
46
|
end
|
47
|
-
# verify the required parameter '
|
48
|
-
if @api_client.config.client_side_validation &&
|
49
|
-
fail ArgumentError, "Missing the required parameter '
|
47
|
+
# verify the required parameter 'autocomplete_req_payload' is set
|
48
|
+
if @api_client.config.client_side_validation && autocomplete_req_payload.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'autocomplete_req_payload' when calling ChunkApi.autocomplete"
|
50
50
|
end
|
51
51
|
# resource path
|
52
|
-
local_var_path = '/api/chunk'
|
52
|
+
local_var_path = '/api/chunk/autocomplete'
|
53
53
|
|
54
54
|
# query parameters
|
55
55
|
query_params = opts[:query_params] || {}
|
@@ -69,16 +69,16 @@ module TrieveRubyClient
|
|
69
69
|
form_params = opts[:form_params] || {}
|
70
70
|
|
71
71
|
# http body (model)
|
72
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
72
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(autocomplete_req_payload)
|
73
73
|
|
74
74
|
# return_type
|
75
|
-
return_type = opts[:debug_return_type] || '
|
75
|
+
return_type = opts[:debug_return_type] || 'SearchChunkQueryResponseBody'
|
76
76
|
|
77
77
|
# auth_names
|
78
78
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
79
79
|
|
80
80
|
new_options = opts.merge(
|
81
|
-
:operation => :"ChunkApi.
|
81
|
+
:operation => :"ChunkApi.autocomplete",
|
82
82
|
:header_params => header_params,
|
83
83
|
:query_params => query_params,
|
84
84
|
:form_params => form_params,
|
@@ -89,42 +89,42 @@ module TrieveRubyClient
|
|
89
89
|
|
90
90
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
91
91
|
if @api_client.config.debugging
|
92
|
-
@api_client.config.logger.debug "API called: ChunkApi#
|
92
|
+
@api_client.config.logger.debug "API called: ChunkApi#autocomplete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
93
93
|
end
|
94
94
|
return data, status_code, headers
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
#
|
97
|
+
# Create or Upsert Chunk or Chunks
|
98
|
+
# Create or Upsert Chunk or Chunks Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint. If uploading in bulk, the maximum amount of chunks that can be uploaded at once is 120 chunks. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
99
99
|
# @param tr_dataset [String] The dataset id to use for the request
|
100
|
-
# @param
|
100
|
+
# @param create_chunk_req_payload_enum [CreateChunkReqPayloadEnum] JSON request payload to create a new chunk (chunk)
|
101
101
|
# @param [Hash] opts the optional parameters
|
102
|
-
# @return [
|
103
|
-
def
|
104
|
-
data, _status_code, _headers =
|
102
|
+
# @return [ReturnQueuedChunk]
|
103
|
+
def create_chunk(tr_dataset, create_chunk_req_payload_enum, opts = {})
|
104
|
+
data, _status_code, _headers = create_chunk_with_http_info(tr_dataset, create_chunk_req_payload_enum, opts)
|
105
105
|
data
|
106
106
|
end
|
107
107
|
|
108
|
-
#
|
109
|
-
#
|
108
|
+
# Create or Upsert Chunk or Chunks
|
109
|
+
# Create or Upsert Chunk or Chunks Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint. If uploading in bulk, the maximum amount of chunks that can be uploaded at once is 120 chunks. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
110
110
|
# @param tr_dataset [String] The dataset id to use for the request
|
111
|
-
# @param
|
111
|
+
# @param create_chunk_req_payload_enum [CreateChunkReqPayloadEnum] JSON request payload to create a new chunk (chunk)
|
112
112
|
# @param [Hash] opts the optional parameters
|
113
|
-
# @return [Array<(
|
114
|
-
def
|
113
|
+
# @return [Array<(ReturnQueuedChunk, Integer, Hash)>] ReturnQueuedChunk data, response status code and response headers
|
114
|
+
def create_chunk_with_http_info(tr_dataset, create_chunk_req_payload_enum, opts = {})
|
115
115
|
if @api_client.config.debugging
|
116
|
-
@api_client.config.logger.debug 'Calling API: ChunkApi.
|
116
|
+
@api_client.config.logger.debug 'Calling API: ChunkApi.create_chunk ...'
|
117
117
|
end
|
118
118
|
# verify the required parameter 'tr_dataset' is set
|
119
119
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
120
|
-
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.
|
120
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.create_chunk"
|
121
121
|
end
|
122
|
-
# verify the required parameter '
|
123
|
-
if @api_client.config.client_side_validation &&
|
124
|
-
fail ArgumentError, "Missing the required parameter '
|
122
|
+
# verify the required parameter 'create_chunk_req_payload_enum' is set
|
123
|
+
if @api_client.config.client_side_validation && create_chunk_req_payload_enum.nil?
|
124
|
+
fail ArgumentError, "Missing the required parameter 'create_chunk_req_payload_enum' when calling ChunkApi.create_chunk"
|
125
125
|
end
|
126
126
|
# resource path
|
127
|
-
local_var_path = '/api/chunk
|
127
|
+
local_var_path = '/api/chunk'
|
128
128
|
|
129
129
|
# query parameters
|
130
130
|
query_params = opts[:query_params] || {}
|
@@ -144,16 +144,16 @@ module TrieveRubyClient
|
|
144
144
|
form_params = opts[:form_params] || {}
|
145
145
|
|
146
146
|
# http body (model)
|
147
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
147
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_req_payload_enum)
|
148
148
|
|
149
149
|
# return_type
|
150
|
-
return_type = opts[:debug_return_type] || '
|
150
|
+
return_type = opts[:debug_return_type] || 'ReturnQueuedChunk'
|
151
151
|
|
152
152
|
# auth_names
|
153
153
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
154
154
|
|
155
155
|
new_options = opts.merge(
|
156
|
-
:operation => :"ChunkApi.
|
156
|
+
:operation => :"ChunkApi.create_chunk",
|
157
157
|
:header_params => header_params,
|
158
158
|
:query_params => query_params,
|
159
159
|
:form_params => form_params,
|
@@ -164,13 +164,13 @@ module TrieveRubyClient
|
|
164
164
|
|
165
165
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
166
166
|
if @api_client.config.debugging
|
167
|
-
@api_client.config.logger.debug "API called: ChunkApi#
|
167
|
+
@api_client.config.logger.debug "API called: ChunkApi#create_chunk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
168
168
|
end
|
169
169
|
return data, status_code, headers
|
170
170
|
end
|
171
171
|
|
172
172
|
# Delete Chunk
|
173
|
-
# Delete Chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
|
173
|
+
# Delete Chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
174
174
|
# @param tr_dataset [String] The dataset id to use for the request
|
175
175
|
# @param chunk_id [String] Id of the chunk you want to fetch.
|
176
176
|
# @param [Hash] opts the optional parameters
|
@@ -181,7 +181,7 @@ module TrieveRubyClient
|
|
181
181
|
end
|
182
182
|
|
183
183
|
# Delete Chunk
|
184
|
-
# Delete Chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
|
184
|
+
# Delete Chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
185
185
|
# @param tr_dataset [String] The dataset id to use for the request
|
186
186
|
# @param chunk_id [String] Id of the chunk you want to fetch.
|
187
187
|
# @param [Hash] opts the optional parameters
|
@@ -240,7 +240,7 @@ module TrieveRubyClient
|
|
240
240
|
end
|
241
241
|
|
242
242
|
# Delete Chunk By Tracking Id
|
243
|
-
# Delete Chunk By Tracking Id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
|
243
|
+
# Delete Chunk By Tracking Id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
244
244
|
# @param tr_dataset [String] The dataset id to use for the request
|
245
245
|
# @param tracking_id [String] tracking_id of the chunk you want to delete
|
246
246
|
# @param [Hash] opts the optional parameters
|
@@ -251,7 +251,7 @@ module TrieveRubyClient
|
|
251
251
|
end
|
252
252
|
|
253
253
|
# Delete Chunk By Tracking Id
|
254
|
-
# Delete Chunk By Tracking Id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
|
254
|
+
# Delete Chunk By Tracking Id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
255
255
|
# @param tr_dataset [String] The dataset id to use for the request
|
256
256
|
# @param tracking_id [String] tracking_id of the chunk you want to delete
|
257
257
|
# @param [Hash] opts the optional parameters
|
@@ -389,7 +389,7 @@ module TrieveRubyClient
|
|
389
389
|
# @param tr_dataset [String] The dataset id to use for the request
|
390
390
|
# @param chunk_id [String] Id of the chunk you want to fetch.
|
391
391
|
# @param [Hash] opts the optional parameters
|
392
|
-
# @return [
|
392
|
+
# @return [ChunkMetadataStringTagSet]
|
393
393
|
def get_chunk_by_id(tr_dataset, chunk_id, opts = {})
|
394
394
|
data, _status_code, _headers = get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts)
|
395
395
|
data
|
@@ -400,7 +400,7 @@ module TrieveRubyClient
|
|
400
400
|
# @param tr_dataset [String] The dataset id to use for the request
|
401
401
|
# @param chunk_id [String] Id of the chunk you want to fetch.
|
402
402
|
# @param [Hash] opts the optional parameters
|
403
|
-
# @return [Array<(
|
403
|
+
# @return [Array<(ChunkMetadataStringTagSet, Integer, Hash)>] ChunkMetadataStringTagSet data, response status code and response headers
|
404
404
|
def get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts = {})
|
405
405
|
if @api_client.config.debugging
|
406
406
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_chunk_by_id ...'
|
@@ -432,7 +432,7 @@ module TrieveRubyClient
|
|
432
432
|
post_body = opts[:debug_body]
|
433
433
|
|
434
434
|
# return_type
|
435
|
-
return_type = opts[:debug_return_type] || '
|
435
|
+
return_type = opts[:debug_return_type] || 'ChunkMetadataStringTagSet'
|
436
436
|
|
437
437
|
# auth_names
|
438
438
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -459,7 +459,7 @@ module TrieveRubyClient
|
|
459
459
|
# @param tr_dataset [String] The dataset id to use for the request
|
460
460
|
# @param tracking_id [String] tracking_id of the chunk you want to fetch
|
461
461
|
# @param [Hash] opts the optional parameters
|
462
|
-
# @return [
|
462
|
+
# @return [ChunkMetadataStringTagSet]
|
463
463
|
def get_chunk_by_tracking_id(tr_dataset, tracking_id, opts = {})
|
464
464
|
data, _status_code, _headers = get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
|
465
465
|
data
|
@@ -470,7 +470,7 @@ module TrieveRubyClient
|
|
470
470
|
# @param tr_dataset [String] The dataset id to use for the request
|
471
471
|
# @param tracking_id [String] tracking_id of the chunk you want to fetch
|
472
472
|
# @param [Hash] opts the optional parameters
|
473
|
-
# @return [Array<(
|
473
|
+
# @return [Array<(ChunkMetadataStringTagSet, Integer, Hash)>] ChunkMetadataStringTagSet data, response status code and response headers
|
474
474
|
def get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {})
|
475
475
|
if @api_client.config.debugging
|
476
476
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_chunk_by_tracking_id ...'
|
@@ -502,7 +502,7 @@ module TrieveRubyClient
|
|
502
502
|
post_body = opts[:debug_body]
|
503
503
|
|
504
504
|
# return_type
|
505
|
-
return_type = opts[:debug_return_type] || '
|
505
|
+
return_type = opts[:debug_return_type] || 'ChunkMetadataStringTagSet'
|
506
506
|
|
507
507
|
# auth_names
|
508
508
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -529,7 +529,7 @@ module TrieveRubyClient
|
|
529
529
|
# @param tr_dataset [String] The dataset id to use for the request
|
530
530
|
# @param get_chunks_data [GetChunksData] JSON request payload to get the chunks in the request
|
531
531
|
# @param [Hash] opts the optional parameters
|
532
|
-
# @return [Array<
|
532
|
+
# @return [Array<ChunkMetadataStringTagSet>]
|
533
533
|
def get_chunks_by_ids(tr_dataset, get_chunks_data, opts = {})
|
534
534
|
data, _status_code, _headers = get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data, opts)
|
535
535
|
data
|
@@ -540,7 +540,7 @@ module TrieveRubyClient
|
|
540
540
|
# @param tr_dataset [String] The dataset id to use for the request
|
541
541
|
# @param get_chunks_data [GetChunksData] JSON request payload to get the chunks in the request
|
542
542
|
# @param [Hash] opts the optional parameters
|
543
|
-
# @return [Array<(Array<
|
543
|
+
# @return [Array<(Array<ChunkMetadataStringTagSet>, Integer, Hash)>] Array<ChunkMetadataStringTagSet> data, response status code and response headers
|
544
544
|
def get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data, opts = {})
|
545
545
|
if @api_client.config.debugging
|
546
546
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_chunks_by_ids ...'
|
@@ -577,7 +577,7 @@ module TrieveRubyClient
|
|
577
577
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(get_chunks_data)
|
578
578
|
|
579
579
|
# return_type
|
580
|
-
return_type = opts[:debug_return_type] || 'Array<
|
580
|
+
return_type = opts[:debug_return_type] || 'Array<ChunkMetadataStringTagSet>'
|
581
581
|
|
582
582
|
# auth_names
|
583
583
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -604,7 +604,7 @@ module TrieveRubyClient
|
|
604
604
|
# @param tr_dataset [String] The dataset id to use for the request
|
605
605
|
# @param get_tracking_chunks_data [GetTrackingChunksData] JSON request payload to get the chunks in the request
|
606
606
|
# @param [Hash] opts the optional parameters
|
607
|
-
# @return [
|
607
|
+
# @return [Array<ChunkMetadataStringTagSet>]
|
608
608
|
def get_chunks_by_tracking_ids(tr_dataset, get_tracking_chunks_data, opts = {})
|
609
609
|
data, _status_code, _headers = get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data, opts)
|
610
610
|
data
|
@@ -615,7 +615,7 @@ module TrieveRubyClient
|
|
615
615
|
# @param tr_dataset [String] The dataset id to use for the request
|
616
616
|
# @param get_tracking_chunks_data [GetTrackingChunksData] JSON request payload to get the chunks in the request
|
617
617
|
# @param [Hash] opts the optional parameters
|
618
|
-
# @return [Array<(
|
618
|
+
# @return [Array<(Array<ChunkMetadataStringTagSet>, Integer, Hash)>] Array<ChunkMetadataStringTagSet> data, response status code and response headers
|
619
619
|
def get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data, opts = {})
|
620
620
|
if @api_client.config.debugging
|
621
621
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_chunks_by_tracking_ids ...'
|
@@ -652,7 +652,7 @@ module TrieveRubyClient
|
|
652
652
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(get_tracking_chunks_data)
|
653
653
|
|
654
654
|
# return_type
|
655
|
-
return_type = opts[:debug_return_type] || '
|
655
|
+
return_type = opts[:debug_return_type] || 'Array<ChunkMetadataStringTagSet>'
|
656
656
|
|
657
657
|
# auth_names
|
658
658
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -675,7 +675,7 @@ module TrieveRubyClient
|
|
675
675
|
end
|
676
676
|
|
677
677
|
# Get Recommended Chunks
|
678
|
-
# Get Recommended Chunks Get recommendations of chunks similar to the
|
678
|
+
# Get Recommended Chunks Get recommendations of chunks similar to the positive samples in the request and dissimilar to the negative. You must provide at least one of either positive_chunk_ids or positive_tracking_ids.
|
679
679
|
# @param tr_dataset [String] The dataset id to use for the request
|
680
680
|
# @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
681
681
|
# @param [Hash] opts the optional parameters
|
@@ -686,7 +686,7 @@ module TrieveRubyClient
|
|
686
686
|
end
|
687
687
|
|
688
688
|
# Get Recommended Chunks
|
689
|
-
# Get Recommended Chunks Get recommendations of chunks similar to the
|
689
|
+
# Get Recommended Chunks Get recommendations of chunks similar to the positive samples in the request and dissimilar to the negative. You must provide at least one of either positive_chunk_ids or positive_tracking_ids.
|
690
690
|
# @param tr_dataset [String] The dataset id to use for the request
|
691
691
|
# @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
692
692
|
# @param [Hash] opts the optional parameters
|
@@ -749,24 +749,99 @@ module TrieveRubyClient
|
|
749
749
|
return data, status_code, headers
|
750
750
|
end
|
751
751
|
|
752
|
+
# Generate suggested queries
|
753
|
+
# Generate suggested queries This endpoint will generate 3 suggested queries based off a hybrid search using RAG with the query provided in the request body and return them as a JSON object.
|
754
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
755
|
+
# @param suggested_queries_req_payload [SuggestedQueriesReqPayload] JSON request payload to get alternative suggested queries
|
756
|
+
# @param [Hash] opts the optional parameters
|
757
|
+
# @return [SuggestedQueriesResponse]
|
758
|
+
def get_suggested_queries(tr_dataset, suggested_queries_req_payload, opts = {})
|
759
|
+
data, _status_code, _headers = get_suggested_queries_with_http_info(tr_dataset, suggested_queries_req_payload, opts)
|
760
|
+
data
|
761
|
+
end
|
762
|
+
|
763
|
+
# Generate suggested queries
|
764
|
+
# Generate suggested queries This endpoint will generate 3 suggested queries based off a hybrid search using RAG with the query provided in the request body and return them as a JSON object.
|
765
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
766
|
+
# @param suggested_queries_req_payload [SuggestedQueriesReqPayload] JSON request payload to get alternative suggested queries
|
767
|
+
# @param [Hash] opts the optional parameters
|
768
|
+
# @return [Array<(SuggestedQueriesResponse, Integer, Hash)>] SuggestedQueriesResponse data, response status code and response headers
|
769
|
+
def get_suggested_queries_with_http_info(tr_dataset, suggested_queries_req_payload, opts = {})
|
770
|
+
if @api_client.config.debugging
|
771
|
+
@api_client.config.logger.debug 'Calling API: ChunkApi.get_suggested_queries ...'
|
772
|
+
end
|
773
|
+
# verify the required parameter 'tr_dataset' is set
|
774
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
775
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.get_suggested_queries"
|
776
|
+
end
|
777
|
+
# verify the required parameter 'suggested_queries_req_payload' is set
|
778
|
+
if @api_client.config.client_side_validation && suggested_queries_req_payload.nil?
|
779
|
+
fail ArgumentError, "Missing the required parameter 'suggested_queries_req_payload' when calling ChunkApi.get_suggested_queries"
|
780
|
+
end
|
781
|
+
# resource path
|
782
|
+
local_var_path = '/api/chunk/gen_suggestions'
|
783
|
+
|
784
|
+
# query parameters
|
785
|
+
query_params = opts[:query_params] || {}
|
786
|
+
|
787
|
+
# header parameters
|
788
|
+
header_params = opts[:header_params] || {}
|
789
|
+
# HTTP header 'Accept' (if needed)
|
790
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
791
|
+
# HTTP header 'Content-Type'
|
792
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
793
|
+
if !content_type.nil?
|
794
|
+
header_params['Content-Type'] = content_type
|
795
|
+
end
|
796
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
797
|
+
|
798
|
+
# form parameters
|
799
|
+
form_params = opts[:form_params] || {}
|
800
|
+
|
801
|
+
# http body (model)
|
802
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(suggested_queries_req_payload)
|
803
|
+
|
804
|
+
# return_type
|
805
|
+
return_type = opts[:debug_return_type] || 'SuggestedQueriesResponse'
|
806
|
+
|
807
|
+
# auth_names
|
808
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
809
|
+
|
810
|
+
new_options = opts.merge(
|
811
|
+
:operation => :"ChunkApi.get_suggested_queries",
|
812
|
+
:header_params => header_params,
|
813
|
+
:query_params => query_params,
|
814
|
+
:form_params => form_params,
|
815
|
+
:body => post_body,
|
816
|
+
:auth_names => auth_names,
|
817
|
+
:return_type => return_type
|
818
|
+
)
|
819
|
+
|
820
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
821
|
+
if @api_client.config.debugging
|
822
|
+
@api_client.config.logger.debug "API called: ChunkApi#get_suggested_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
823
|
+
end
|
824
|
+
return data, status_code, headers
|
825
|
+
end
|
826
|
+
|
752
827
|
# Search
|
753
828
|
# Search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b><mark>` tags for sub-sentence highlighting.
|
754
829
|
# @param tr_dataset [String] The dataset id to use for the request
|
755
|
-
# @param
|
830
|
+
# @param search_chunks_req_payload [SearchChunksReqPayload] JSON request payload to semantically search for chunks (chunks)
|
756
831
|
# @param [Hash] opts the optional parameters
|
757
832
|
# @return [SearchChunkQueryResponseBody]
|
758
|
-
def search_chunks(tr_dataset,
|
759
|
-
data, _status_code, _headers = search_chunks_with_http_info(tr_dataset,
|
833
|
+
def search_chunks(tr_dataset, search_chunks_req_payload, opts = {})
|
834
|
+
data, _status_code, _headers = search_chunks_with_http_info(tr_dataset, search_chunks_req_payload, opts)
|
760
835
|
data
|
761
836
|
end
|
762
837
|
|
763
838
|
# Search
|
764
839
|
# Search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b><mark>` tags for sub-sentence highlighting.
|
765
840
|
# @param tr_dataset [String] The dataset id to use for the request
|
766
|
-
# @param
|
841
|
+
# @param search_chunks_req_payload [SearchChunksReqPayload] JSON request payload to semantically search for chunks (chunks)
|
767
842
|
# @param [Hash] opts the optional parameters
|
768
843
|
# @return [Array<(SearchChunkQueryResponseBody, Integer, Hash)>] SearchChunkQueryResponseBody data, response status code and response headers
|
769
|
-
def search_chunks_with_http_info(tr_dataset,
|
844
|
+
def search_chunks_with_http_info(tr_dataset, search_chunks_req_payload, opts = {})
|
770
845
|
if @api_client.config.debugging
|
771
846
|
@api_client.config.logger.debug 'Calling API: ChunkApi.search_chunks ...'
|
772
847
|
end
|
@@ -774,9 +849,9 @@ module TrieveRubyClient
|
|
774
849
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
775
850
|
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.search_chunks"
|
776
851
|
end
|
777
|
-
# verify the required parameter '
|
778
|
-
if @api_client.config.client_side_validation &&
|
779
|
-
fail ArgumentError, "Missing the required parameter '
|
852
|
+
# verify the required parameter 'search_chunks_req_payload' is set
|
853
|
+
if @api_client.config.client_side_validation && search_chunks_req_payload.nil?
|
854
|
+
fail ArgumentError, "Missing the required parameter 'search_chunks_req_payload' when calling ChunkApi.search_chunks"
|
780
855
|
end
|
781
856
|
# resource path
|
782
857
|
local_var_path = '/api/chunk/search'
|
@@ -799,7 +874,7 @@ module TrieveRubyClient
|
|
799
874
|
form_params = opts[:form_params] || {}
|
800
875
|
|
801
876
|
# http body (model)
|
802
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
877
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_chunks_req_payload)
|
803
878
|
|
804
879
|
# return_type
|
805
880
|
return_type = opts[:debug_return_type] || 'SearchChunkQueryResponseBody'
|
@@ -825,23 +900,23 @@ module TrieveRubyClient
|
|
825
900
|
end
|
826
901
|
|
827
902
|
# Update Chunk
|
828
|
-
# Update Chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.
|
903
|
+
# Update Chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
829
904
|
# @param tr_dataset [String] The dataset id to use for the request
|
830
|
-
# @param
|
905
|
+
# @param update_chunk_req_payload [UpdateChunkReqPayload] JSON request payload to update a chunk (chunk)
|
831
906
|
# @param [Hash] opts the optional parameters
|
832
907
|
# @return [nil]
|
833
|
-
def update_chunk(tr_dataset,
|
834
|
-
update_chunk_with_http_info(tr_dataset,
|
908
|
+
def update_chunk(tr_dataset, update_chunk_req_payload, opts = {})
|
909
|
+
update_chunk_with_http_info(tr_dataset, update_chunk_req_payload, opts)
|
835
910
|
nil
|
836
911
|
end
|
837
912
|
|
838
913
|
# Update Chunk
|
839
|
-
# Update Chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.
|
914
|
+
# Update Chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
840
915
|
# @param tr_dataset [String] The dataset id to use for the request
|
841
|
-
# @param
|
916
|
+
# @param update_chunk_req_payload [UpdateChunkReqPayload] JSON request payload to update a chunk (chunk)
|
842
917
|
# @param [Hash] opts the optional parameters
|
843
918
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
844
|
-
def update_chunk_with_http_info(tr_dataset,
|
919
|
+
def update_chunk_with_http_info(tr_dataset, update_chunk_req_payload, opts = {})
|
845
920
|
if @api_client.config.debugging
|
846
921
|
@api_client.config.logger.debug 'Calling API: ChunkApi.update_chunk ...'
|
847
922
|
end
|
@@ -849,9 +924,9 @@ module TrieveRubyClient
|
|
849
924
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
850
925
|
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.update_chunk"
|
851
926
|
end
|
852
|
-
# verify the required parameter '
|
853
|
-
if @api_client.config.client_side_validation &&
|
854
|
-
fail ArgumentError, "Missing the required parameter '
|
927
|
+
# verify the required parameter 'update_chunk_req_payload' is set
|
928
|
+
if @api_client.config.client_side_validation && update_chunk_req_payload.nil?
|
929
|
+
fail ArgumentError, "Missing the required parameter 'update_chunk_req_payload' when calling ChunkApi.update_chunk"
|
855
930
|
end
|
856
931
|
# resource path
|
857
932
|
local_var_path = '/api/chunk'
|
@@ -874,7 +949,7 @@ module TrieveRubyClient
|
|
874
949
|
form_params = opts[:form_params] || {}
|
875
950
|
|
876
951
|
# http body (model)
|
877
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
952
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_chunk_req_payload)
|
878
953
|
|
879
954
|
# return_type
|
880
955
|
return_type = opts[:debug_return_type]
|
@@ -900,7 +975,7 @@ module TrieveRubyClient
|
|
900
975
|
end
|
901
976
|
|
902
977
|
# Update Chunk By Tracking Id
|
903
|
-
# Update Chunk By Tracking Id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.
|
978
|
+
# Update Chunk By Tracking Id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
904
979
|
# @param tr_dataset [String] The dataset id to use for the request
|
905
980
|
# @param update_chunk_by_tracking_id_data [UpdateChunkByTrackingIdData] JSON request payload to update a chunk by tracking_id (chunks)
|
906
981
|
# @param [Hash] opts the optional parameters
|
@@ -911,7 +986,7 @@ module TrieveRubyClient
|
|
911
986
|
end
|
912
987
|
|
913
988
|
# Update Chunk By Tracking Id
|
914
|
-
# Update Chunk By Tracking Id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.
|
989
|
+
# Update Chunk By Tracking Id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
915
990
|
# @param tr_dataset [String] The dataset id to use for the request
|
916
991
|
# @param update_chunk_by_tracking_id_data [UpdateChunkByTrackingIdData] JSON request payload to update a chunk by tracking_id (chunks)
|
917
992
|
# @param [Hash] opts the optional parameters
|