trieve_ruby_client 0.4.0 → 0.5.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/GENERATE_COMMAND.txt +1 -0
- data/README.md +29 -18
- data/docs/AddChunkToGroupData.md +1 -1
- data/docs/AuthApi.md +1 -1
- data/docs/ChunkApi.md +34 -38
- data/docs/ChunkGroupApi.md +51 -48
- data/docs/DatasetApi.md +9 -9
- data/docs/EventsApi.md +1 -1
- data/docs/FileApi.md +1 -1
- data/docs/GetEventsData.md +1 -1
- data/docs/GroupScoreChunkDTO.md +2 -0
- data/docs/GroupSlimChunksDTO.md +20 -0
- data/docs/HealthApi.md +1 -1
- data/docs/InvitationApi.md +1 -1
- data/docs/MessageApi.md +1 -1
- data/docs/OrganizationApi.md +1 -1
- data/docs/Range.md +4 -4
- data/docs/RangeCondition.md +49 -0
- data/docs/ReccomendGroupChunksRequest.md +3 -1
- data/docs/RecommendChunksRequest.md +3 -1
- data/docs/RecommendChunksResponseTypes.md +49 -0
- data/docs/RecommendGroupChunkResponseTypes.md +49 -0
- data/docs/ScoreSlimChunks.md +20 -0
- data/docs/SearchChunkData.md +4 -0
- data/docs/SearchChunkResponseTypes.md +49 -0
- data/docs/SearchGroupSlimChunksResult.md +22 -0
- data/docs/SearchOverGroupsData.md +5 -1
- data/docs/SearchOverGroupsResponseTypes.md +49 -0
- data/docs/SearchOverGroupsSlimChunksResponseBody.md +20 -0
- data/docs/SearchSlimChunkQueryResponseBody.md +20 -0
- data/docs/SearchWithinGroupData.md +4 -0
- data/docs/SearchWithinGroupResponseTypes.md +49 -0
- data/docs/SlimChunkMetadata.md +36 -0
- data/docs/SlimUser.md +1 -7
- data/docs/StripeApi.md +1 -1
- data/docs/TopicApi.md +9 -9
- data/docs/UpdateChunkData.md +2 -0
- data/docs/UpdateUserData.md +1 -7
- data/docs/UserApi.md +9 -9
- data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_api.rb +34 -38
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +56 -59
- data/lib/trieve_ruby_client/api/dataset_api.rb +11 -16
- data/lib/trieve_ruby_client/api/events_api.rb +1 -1
- data/lib/trieve_ruby_client/api/file_api.rb +1 -1
- data/lib/trieve_ruby_client/api/health_api.rb +1 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
- data/lib/trieve_ruby_client/api/message_api.rb +1 -1
- data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
- data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
- data/lib/trieve_ruby_client/api/topic_api.rb +11 -16
- data/lib/trieve_ruby_client/api/user_api.rb +11 -16
- 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 +7 -7
- data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +2 -2
- data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
- 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/chat_message_proxy.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
- 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_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
- 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/dataset.rb +1 -1
- 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/delete_dataset_request.rb +1 -1
- 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/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 +1 -1
- data/lib/trieve_ruby_client/models/file.rb +1 -1
- data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/get_events_data.rb +2 -2
- data/lib/trieve_ruby_client/models/get_groups_for_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_dto.rb +12 -2
- data/lib/trieve_ruby_client/models/group_slim_chunks_dto.rb +239 -0
- data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
- data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/message.rb +1 -1
- data/lib/trieve_ruby_client/models/organization.rb +1 -1
- data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/range.rb +5 -5
- data/lib/trieve_ruby_client/models/range_condition.rb +105 -0
- data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +17 -6
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +17 -6
- data/lib/trieve_ruby_client/models/recommend_chunks_response_types.rb +105 -0
- data/lib/trieve_ruby_client/models/recommend_group_chunk_response_types.rb +105 -0
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/score_slim_chunks.rb +239 -0
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +24 -2
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_response_types.rb +105 -0
- data/lib/trieve_ruby_client/models/search_group_slim_chunks_result.rb +255 -0
- data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +27 -5
- data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_response_types.rb +105 -0
- data/lib/trieve_ruby_client/models/search_over_groups_slim_chunks_response_body.rb +239 -0
- data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +239 -0
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +24 -2
- data/lib/trieve_ruby_client/models/search_within_group_response_types.rb +105 -0
- data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
- 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/{stripe_subscription.rb → slim_chunk_metadata.rb} +75 -57
- data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_user.rb +5 -41
- data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
- 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_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
- 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_user_data.rb +6 -39
- data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
- 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 +13 -2
- data/openapi-generator.yaml +1 -1
- data/openapi.json +692 -335
- data/spec/api/auth_api_spec.rb +16 -18
- data/spec/api/chunk_api_spec.rb +30 -43
- data/spec/api/chunk_group_api_spec.rb +54 -33
- data/spec/api/dataset_api_spec.rb +19 -19
- data/spec/api/events_api_spec.rb +10 -10
- data/spec/api/file_api_spec.rb +15 -15
- data/spec/api/health_api_spec.rb +9 -7
- data/spec/api/invitation_api_spec.rb +9 -9
- data/spec/api/message_api_spec.rb +15 -15
- data/spec/api/organization_api_spec.rb +19 -19
- data/spec/api/stripe_api_spec.rb +15 -7
- data/spec/api/topic_api_spec.rb +15 -15
- data/spec/api/user_api_spec.rb +13 -13
- data/spec/models/add_chunk_to_group_data_spec.rb +8 -8
- data/spec/models/api_key_dto_spec.rb +8 -8
- data/spec/models/auth_query_spec.rb +1 -1
- data/spec/models/batch_queued_chunk_response_spec.rb +1 -1
- data/spec/models/bookmark_data_spec.rb +8 -8
- data/spec/models/bookmark_group_result_spec.rb +8 -8
- data/spec/models/chat_message_proxy_spec.rb +8 -8
- data/spec/models/chunk_data_spec.rb +1 -1
- data/spec/models/chunk_filter_spec.rb +8 -8
- data/spec/models/chunk_group_and_file_spec.rb +8 -8
- data/spec/models/chunk_group_spec.rb +8 -8
- data/spec/models/chunk_metadata_spec.rb +8 -8
- data/spec/models/chunk_metadata_with_file_data_spec.rb +8 -8
- data/spec/models/client_dataset_configuration_spec.rb +8 -8
- data/spec/models/create_chunk_data_spec.rb +11 -87
- data/spec/models/create_chunk_group_data_spec.rb +8 -8
- data/spec/models/create_dataset_request_spec.rb +8 -8
- data/spec/models/create_message_data_spec.rb +8 -8
- data/spec/models/create_organization_data_spec.rb +8 -8
- data/spec/models/create_topic_data_spec.rb +8 -8
- data/spec/models/dataset_and_usage_spec.rb +8 -8
- data/spec/models/dataset_dto_spec.rb +8 -8
- data/spec/models/dataset_spec.rb +8 -8
- data/spec/models/dataset_usage_count_spec.rb +8 -8
- data/spec/models/delete_dataset_request_spec.rb +8 -8
- data/spec/models/delete_topic_data_spec.rb +8 -8
- data/spec/models/delete_user_api_key_request_spec.rb +8 -8
- data/spec/models/edit_message_data_spec.rb +8 -8
- data/spec/models/error_response_body_spec.rb +8 -8
- data/spec/models/event_return_spec.rb +8 -8
- data/spec/models/event_spec.rb +8 -8
- data/spec/models/field_condition_spec.rb +8 -8
- data/spec/models/file_dto_spec.rb +8 -8
- data/spec/models/file_spec.rb +8 -8
- data/spec/models/generate_chunks_request_spec.rb +8 -8
- data/spec/models/get_events_data_spec.rb +1 -1
- data/spec/models/get_groups_for_chunks_data_spec.rb +8 -8
- data/spec/models/group_data_spec.rb +8 -8
- data/spec/models/group_score_chunk_dto_spec.rb +8 -8
- data/spec/models/group_slim_chunks_dto_spec.rb +42 -0
- data/spec/models/invitation_data_spec.rb +8 -8
- data/spec/models/match_condition_spec.rb +6 -6
- data/spec/models/message_spec.rb +8 -8
- data/spec/models/organization_spec.rb +8 -8
- data/spec/models/organization_usage_count_spec.rb +8 -8
- data/spec/models/range_condition_spec.rb +32 -0
- data/spec/models/range_spec.rb +8 -8
- data/spec/models/reccomend_group_chunks_request_spec.rb +8 -8
- data/spec/models/recommend_chunks_request_spec.rb +8 -8
- data/spec/models/recommend_chunks_response_types_spec.rb +32 -0
- data/spec/models/recommend_group_chunk_response_types_spec.rb +32 -0
- data/spec/models/regenerate_message_data_spec.rb +8 -8
- data/spec/models/return_queued_chunk_spec.rb +11 -21
- data/spec/models/score_chunk_dto_spec.rb +8 -8
- data/spec/models/score_slim_chunks_spec.rb +42 -0
- data/spec/models/search_chunk_data_spec.rb +8 -8
- data/spec/models/search_chunk_query_response_body_spec.rb +8 -8
- data/spec/models/search_chunk_response_types_spec.rb +32 -0
- data/spec/models/search_group_slim_chunks_result_spec.rb +48 -0
- data/spec/models/search_groups_result_spec.rb +8 -8
- data/spec/models/search_over_groups_data_spec.rb +8 -8
- data/spec/models/search_over_groups_response_body_spec.rb +8 -8
- data/spec/models/search_over_groups_response_types_spec.rb +32 -0
- data/spec/models/search_over_groups_slim_chunks_response_body_spec.rb +42 -0
- data/spec/models/search_slim_chunk_query_response_body_spec.rb +42 -0
- data/spec/models/search_within_group_data_spec.rb +8 -8
- data/spec/models/search_within_group_response_types_spec.rb +32 -0
- data/spec/models/set_user_api_key_request_spec.rb +8 -8
- data/spec/models/set_user_api_key_response_spec.rb +8 -8
- data/spec/models/single_queued_chunk_response_spec.rb +1 -1
- data/spec/models/{stripe_subscription_spec.rb → slim_chunk_metadata_spec.rb} +33 -15
- data/spec/models/slim_group_spec.rb +8 -8
- data/spec/models/slim_user_spec.rb +8 -8
- data/spec/models/stripe_plan_spec.rb +8 -8
- data/spec/models/suggested_queries_request_spec.rb +8 -8
- data/spec/models/suggested_queries_response_spec.rb +8 -8
- data/spec/models/topic_spec.rb +8 -8
- data/spec/models/update_chunk_by_tracking_id_data_spec.rb +20 -8
- data/spec/models/update_chunk_data_spec.rb +20 -8
- data/spec/models/update_chunk_group_data_spec.rb +14 -8
- data/spec/models/update_dataset_request_spec.rb +8 -8
- data/spec/models/update_group_by_tracking_id_data_spec.rb +8 -8
- data/spec/models/update_organization_data_spec.rb +8 -8
- data/spec/models/update_topic_data_spec.rb +8 -8
- data/spec/models/update_user_data_spec.rb +8 -8
- data/spec/models/upload_file_data_spec.rb +8 -8
- data/spec/models/upload_file_result_spec.rb +8 -8
- data/spec/models/user_organization_spec.rb +8 -8
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.5.0.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +52 -7
- data/docs/StripeSubscription.md +0 -30
- data/trieve_ruby_client-0.3.5.gem +0 -0
@@ -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.5.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -19,8 +19,8 @@ module TrieveRubyClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Create Chunk
|
23
|
-
# Create Chunk Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
|
22
|
+
# Create or Upsert Chunk or Chunks
|
23
|
+
# 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.
|
24
24
|
# @param tr_dataset [String] The dataset id to use for the request
|
25
25
|
# @param create_chunk_data [CreateChunkData] JSON request payload to create a new chunk (chunk)
|
26
26
|
# @param [Hash] opts the optional parameters
|
@@ -30,8 +30,8 @@ module TrieveRubyClient
|
|
30
30
|
data
|
31
31
|
end
|
32
32
|
|
33
|
-
# Create Chunk
|
34
|
-
# Create Chunk Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
|
33
|
+
# Create or Upsert Chunk or Chunks
|
34
|
+
# 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.
|
35
35
|
# @param tr_dataset [String] The dataset id to use for the request
|
36
36
|
# @param create_chunk_data [CreateChunkData] JSON request payload to create a new chunk (chunk)
|
37
37
|
# @param [Hash] opts the optional parameters
|
@@ -172,23 +172,21 @@ module TrieveRubyClient
|
|
172
172
|
# Delete Chunk
|
173
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.
|
174
174
|
# @param tr_dataset [String] The dataset id to use for the request
|
175
|
-
# @param
|
176
|
-
# @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
|
175
|
+
# @param chunk_id [String] Id of the chunk you want to fetch.
|
177
176
|
# @param [Hash] opts the optional parameters
|
178
177
|
# @return [nil]
|
179
|
-
def delete_chunk(tr_dataset,
|
180
|
-
delete_chunk_with_http_info(tr_dataset,
|
178
|
+
def delete_chunk(tr_dataset, chunk_id, opts = {})
|
179
|
+
delete_chunk_with_http_info(tr_dataset, chunk_id, opts)
|
181
180
|
nil
|
182
181
|
end
|
183
182
|
|
184
183
|
# Delete Chunk
|
185
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.
|
186
185
|
# @param tr_dataset [String] The dataset id to use for the request
|
187
|
-
# @param
|
188
|
-
# @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
|
186
|
+
# @param chunk_id [String] Id of the chunk you want to fetch.
|
189
187
|
# @param [Hash] opts the optional parameters
|
190
188
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
191
|
-
def delete_chunk_with_http_info(tr_dataset,
|
189
|
+
def delete_chunk_with_http_info(tr_dataset, chunk_id, opts = {})
|
192
190
|
if @api_client.config.debugging
|
193
191
|
@api_client.config.logger.debug 'Calling API: ChunkApi.delete_chunk ...'
|
194
192
|
end
|
@@ -196,12 +194,12 @@ module TrieveRubyClient
|
|
196
194
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
197
195
|
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.delete_chunk"
|
198
196
|
end
|
199
|
-
# verify the required parameter '
|
200
|
-
if @api_client.config.client_side_validation &&
|
201
|
-
fail ArgumentError, "Missing the required parameter '
|
197
|
+
# verify the required parameter 'chunk_id' is set
|
198
|
+
if @api_client.config.client_side_validation && chunk_id.nil?
|
199
|
+
fail ArgumentError, "Missing the required parameter 'chunk_id' when calling ChunkApi.delete_chunk"
|
202
200
|
end
|
203
201
|
# resource path
|
204
|
-
local_var_path = '/api/chunk/{
|
202
|
+
local_var_path = '/api/chunk/{chunk_id}'.sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s))
|
205
203
|
|
206
204
|
# query parameters
|
207
205
|
query_params = opts[:query_params] || {}
|
@@ -311,8 +309,8 @@ module TrieveRubyClient
|
|
311
309
|
return data, status_code, headers
|
312
310
|
end
|
313
311
|
|
314
|
-
# RAG on
|
315
|
-
# RAG on
|
312
|
+
# RAG on Specified Chunks
|
313
|
+
# RAG on Specified Chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.
|
316
314
|
# @param tr_dataset [String] The dataset id to use for the request
|
317
315
|
# @param generate_chunks_request [GenerateChunksRequest] JSON request payload to perform RAG on some chunks (chunks)
|
318
316
|
# @param [Hash] opts the optional parameters
|
@@ -322,8 +320,8 @@ module TrieveRubyClient
|
|
322
320
|
data
|
323
321
|
end
|
324
322
|
|
325
|
-
# RAG on
|
326
|
-
# RAG on
|
323
|
+
# RAG on Specified Chunks
|
324
|
+
# RAG on Specified Chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.
|
327
325
|
# @param tr_dataset [String] The dataset id to use for the request
|
328
326
|
# @param generate_chunks_request [GenerateChunksRequest] JSON request payload to perform RAG on some chunks (chunks)
|
329
327
|
# @param [Hash] opts the optional parameters
|
@@ -389,23 +387,21 @@ module TrieveRubyClient
|
|
389
387
|
# Get Chunk By Id
|
390
388
|
# Get Chunk By Id Get a singular chunk by id.
|
391
389
|
# @param tr_dataset [String] The dataset id to use for the request
|
392
|
-
# @param
|
393
|
-
# @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
|
390
|
+
# @param chunk_id [String] Id of the chunk you want to fetch.
|
394
391
|
# @param [Hash] opts the optional parameters
|
395
392
|
# @return [ChunkMetadata]
|
396
|
-
def get_chunk_by_id(tr_dataset,
|
397
|
-
data, _status_code, _headers = get_chunk_by_id_with_http_info(tr_dataset,
|
393
|
+
def get_chunk_by_id(tr_dataset, chunk_id, opts = {})
|
394
|
+
data, _status_code, _headers = get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts)
|
398
395
|
data
|
399
396
|
end
|
400
397
|
|
401
398
|
# Get Chunk By Id
|
402
399
|
# Get Chunk By Id Get a singular chunk by id.
|
403
400
|
# @param tr_dataset [String] The dataset id to use for the request
|
404
|
-
# @param
|
405
|
-
# @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
|
401
|
+
# @param chunk_id [String] Id of the chunk you want to fetch.
|
406
402
|
# @param [Hash] opts the optional parameters
|
407
403
|
# @return [Array<(ChunkMetadata, Integer, Hash)>] ChunkMetadata data, response status code and response headers
|
408
|
-
def get_chunk_by_id_with_http_info(tr_dataset,
|
404
|
+
def get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts = {})
|
409
405
|
if @api_client.config.debugging
|
410
406
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_chunk_by_id ...'
|
411
407
|
end
|
@@ -413,12 +409,12 @@ module TrieveRubyClient
|
|
413
409
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
414
410
|
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.get_chunk_by_id"
|
415
411
|
end
|
416
|
-
# verify the required parameter '
|
417
|
-
if @api_client.config.client_side_validation &&
|
418
|
-
fail ArgumentError, "Missing the required parameter '
|
412
|
+
# verify the required parameter 'chunk_id' is set
|
413
|
+
if @api_client.config.client_side_validation && chunk_id.nil?
|
414
|
+
fail ArgumentError, "Missing the required parameter 'chunk_id' when calling ChunkApi.get_chunk_by_id"
|
419
415
|
end
|
420
416
|
# resource path
|
421
|
-
local_var_path = '/api/chunk/{
|
417
|
+
local_var_path = '/api/chunk/{chunk_id}'.sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s))
|
422
418
|
|
423
419
|
# query parameters
|
424
420
|
query_params = opts[:query_params] || {}
|
@@ -533,7 +529,7 @@ module TrieveRubyClient
|
|
533
529
|
# @param tr_dataset [String] The dataset id to use for the request
|
534
530
|
# @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
535
531
|
# @param [Hash] opts the optional parameters
|
536
|
-
# @return [
|
532
|
+
# @return [RecommendChunksResponseTypes]
|
537
533
|
def get_recommended_chunks(tr_dataset, recommend_chunks_request, opts = {})
|
538
534
|
data, _status_code, _headers = get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts)
|
539
535
|
data
|
@@ -544,7 +540,7 @@ module TrieveRubyClient
|
|
544
540
|
# @param tr_dataset [String] The dataset id to use for the request
|
545
541
|
# @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
546
542
|
# @param [Hash] opts the optional parameters
|
547
|
-
# @return [Array<(
|
543
|
+
# @return [Array<(RecommendChunksResponseTypes, Integer, Hash)>] RecommendChunksResponseTypes data, response status code and response headers
|
548
544
|
def get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts = {})
|
549
545
|
if @api_client.config.debugging
|
550
546
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_recommended_chunks ...'
|
@@ -581,7 +577,7 @@ module TrieveRubyClient
|
|
581
577
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(recommend_chunks_request)
|
582
578
|
|
583
579
|
# return_type
|
584
|
-
return_type = opts[:debug_return_type] || '
|
580
|
+
return_type = opts[:debug_return_type] || 'RecommendChunksResponseTypes'
|
585
581
|
|
586
582
|
# auth_names
|
587
583
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -608,7 +604,7 @@ module TrieveRubyClient
|
|
608
604
|
# @param tr_dataset [String] The dataset id to use for the request
|
609
605
|
# @param search_chunk_data [SearchChunkData] JSON request payload to semantically search for chunks (chunks)
|
610
606
|
# @param [Hash] opts the optional parameters
|
611
|
-
# @return [
|
607
|
+
# @return [SearchChunkResponseTypes]
|
612
608
|
def search_chunk(tr_dataset, search_chunk_data, opts = {})
|
613
609
|
data, _status_code, _headers = search_chunk_with_http_info(tr_dataset, search_chunk_data, opts)
|
614
610
|
data
|
@@ -619,7 +615,7 @@ module TrieveRubyClient
|
|
619
615
|
# @param tr_dataset [String] The dataset id to use for the request
|
620
616
|
# @param search_chunk_data [SearchChunkData] JSON request payload to semantically search for chunks (chunks)
|
621
617
|
# @param [Hash] opts the optional parameters
|
622
|
-
# @return [Array<(
|
618
|
+
# @return [Array<(SearchChunkResponseTypes, Integer, Hash)>] SearchChunkResponseTypes data, response status code and response headers
|
623
619
|
def search_chunk_with_http_info(tr_dataset, search_chunk_data, opts = {})
|
624
620
|
if @api_client.config.debugging
|
625
621
|
@api_client.config.logger.debug 'Calling API: ChunkApi.search_chunk ...'
|
@@ -656,7 +652,7 @@ module TrieveRubyClient
|
|
656
652
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_chunk_data)
|
657
653
|
|
658
654
|
# return_type
|
659
|
-
return_type = opts[:debug_return_type] || '
|
655
|
+
return_type = opts[:debug_return_type] || 'SearchChunkResponseTypes'
|
660
656
|
|
661
657
|
# auth_names
|
662
658
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -708,7 +704,7 @@ module TrieveRubyClient
|
|
708
704
|
fail ArgumentError, "Missing the required parameter 'update_chunk_data' when calling ChunkApi.update_chunk"
|
709
705
|
end
|
710
706
|
# resource path
|
711
|
-
local_var_path = '/api/chunk
|
707
|
+
local_var_path = '/api/chunk'
|
712
708
|
|
713
709
|
# query parameters
|
714
710
|
query_params = opts[:query_params] || {}
|
@@ -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.5.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -20,7 +20,7 @@ module TrieveRubyClient
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Add Chunk to Group
|
23
|
-
# Add Chunk to Group Route to add a chunk to a group
|
23
|
+
# Add Chunk to Group Route to add a chunk to a group.
|
24
24
|
# @param tr_dataset [String] The dataset id to use for the request
|
25
25
|
# @param group_id [String] Id of the group to add the chunk to as a bookmark
|
26
26
|
# @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
|
@@ -32,7 +32,7 @@ module TrieveRubyClient
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# Add Chunk to Group
|
35
|
-
# Add Chunk to Group Route to add a chunk to a group
|
35
|
+
# Add Chunk to Group Route to add a chunk to a group.
|
36
36
|
# @param tr_dataset [String] The dataset id to use for the request
|
37
37
|
# @param group_id [String] Id of the group to add the chunk to as a bookmark
|
38
38
|
# @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
|
@@ -101,7 +101,7 @@ module TrieveRubyClient
|
|
101
101
|
end
|
102
102
|
|
103
103
|
# Add Chunk to Group by Tracking ID
|
104
|
-
# Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
|
104
|
+
# Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
|
105
105
|
# @param tr_dataset [String] The dataset id to use for the request
|
106
106
|
# @param tracking_id [String] Id of the group to add the chunk to as a bookmark
|
107
107
|
# @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
|
@@ -113,7 +113,7 @@ module TrieveRubyClient
|
|
113
113
|
end
|
114
114
|
|
115
115
|
# Add Chunk to Group by Tracking ID
|
116
|
-
# Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
|
116
|
+
# Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
|
117
117
|
# @param tr_dataset [String] The dataset id to use for the request
|
118
118
|
# @param tracking_id [String] Id of the group to add the chunk to as a bookmark
|
119
119
|
# @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
|
@@ -182,7 +182,7 @@ module TrieveRubyClient
|
|
182
182
|
end
|
183
183
|
|
184
184
|
# Create Chunk Group
|
185
|
-
# Create Chunk Group Create a new chunk_group.
|
185
|
+
# 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.
|
186
186
|
# @param tr_dataset [String] The dataset id to use for the request
|
187
187
|
# @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
|
188
188
|
# @param [Hash] opts the optional parameters
|
@@ -193,7 +193,7 @@ module TrieveRubyClient
|
|
193
193
|
end
|
194
194
|
|
195
195
|
# Create Chunk Group
|
196
|
-
# Create Chunk Group Create a new chunk_group.
|
196
|
+
# 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.
|
197
197
|
# @param tr_dataset [String] The dataset id to use for the request
|
198
198
|
# @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
|
199
199
|
# @param [Hash] opts the optional parameters
|
@@ -259,25 +259,23 @@ module TrieveRubyClient
|
|
259
259
|
# Delete Group
|
260
260
|
# Delete Group This will delete a chunk_group. This will not delete the chunks that are in the group. We will soon support deleting a chunk_group along with its member chunks.
|
261
261
|
# @param tr_dataset [String] The dataset id to use for the request
|
262
|
-
# @param
|
263
|
-
# @param group_id [String] Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.
|
262
|
+
# @param group_id [String] Id of the group you want to fetch.
|
264
263
|
# @param delete_chunks [Boolean] Delete the chunks within the group
|
265
264
|
# @param [Hash] opts the optional parameters
|
266
265
|
# @return [nil]
|
267
|
-
def delete_chunk_group(tr_dataset,
|
268
|
-
delete_chunk_group_with_http_info(tr_dataset,
|
266
|
+
def delete_chunk_group(tr_dataset, group_id, delete_chunks, opts = {})
|
267
|
+
delete_chunk_group_with_http_info(tr_dataset, group_id, delete_chunks, opts)
|
269
268
|
nil
|
270
269
|
end
|
271
270
|
|
272
271
|
# Delete Group
|
273
272
|
# Delete Group This will delete a chunk_group. This will not delete the chunks that are in the group. We will soon support deleting a chunk_group along with its member chunks.
|
274
273
|
# @param tr_dataset [String] The dataset id to use for the request
|
275
|
-
# @param
|
276
|
-
# @param group_id [String] Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.
|
274
|
+
# @param group_id [String] Id of the group you want to fetch.
|
277
275
|
# @param delete_chunks [Boolean] Delete the chunks within the group
|
278
276
|
# @param [Hash] opts the optional parameters
|
279
277
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
280
|
-
def delete_chunk_group_with_http_info(tr_dataset,
|
278
|
+
def delete_chunk_group_with_http_info(tr_dataset, group_id, delete_chunks, opts = {})
|
281
279
|
if @api_client.config.debugging
|
282
280
|
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.delete_chunk_group ...'
|
283
281
|
end
|
@@ -285,16 +283,16 @@ module TrieveRubyClient
|
|
285
283
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
286
284
|
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.delete_chunk_group"
|
287
285
|
end
|
288
|
-
# verify the required parameter '
|
289
|
-
if @api_client.config.client_side_validation &&
|
290
|
-
fail ArgumentError, "Missing the required parameter '
|
286
|
+
# verify the required parameter 'group_id' is set
|
287
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
288
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.delete_chunk_group"
|
291
289
|
end
|
292
290
|
# verify the required parameter 'delete_chunks' is set
|
293
291
|
if @api_client.config.client_side_validation && delete_chunks.nil?
|
294
292
|
fail ArgumentError, "Missing the required parameter 'delete_chunks' when calling ChunkGroupApi.delete_chunk_group"
|
295
293
|
end
|
296
294
|
# resource path
|
297
|
-
local_var_path = '/api/chunk_group/{
|
295
|
+
local_var_path = '/api/chunk_group/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
298
296
|
|
299
297
|
# query parameters
|
300
298
|
query_params = opts[:query_params] || {}
|
@@ -408,23 +406,21 @@ module TrieveRubyClient
|
|
408
406
|
# Get Group
|
409
407
|
# Get Group Fetch the group with the given id. get_group
|
410
408
|
# @param tr_dataset [String] The dataset id to use for the request
|
411
|
-
# @param
|
412
|
-
# @param group_id [String] Id of the group you want to fetch. This can be either the group_id or the tracking_id.
|
409
|
+
# @param group_id [String] Id of the group you want to fetch.
|
413
410
|
# @param [Hash] opts the optional parameters
|
414
411
|
# @return [ChunkGroup]
|
415
|
-
def get_chunk_group(tr_dataset,
|
416
|
-
data, _status_code, _headers = get_chunk_group_with_http_info(tr_dataset,
|
412
|
+
def get_chunk_group(tr_dataset, group_id, opts = {})
|
413
|
+
data, _status_code, _headers = get_chunk_group_with_http_info(tr_dataset, group_id, opts)
|
417
414
|
data
|
418
415
|
end
|
419
416
|
|
420
417
|
# Get Group
|
421
418
|
# Get Group Fetch the group with the given id. get_group
|
422
419
|
# @param tr_dataset [String] The dataset id to use for the request
|
423
|
-
# @param
|
424
|
-
# @param group_id [String] Id of the group you want to fetch. This can be either the group_id or the tracking_id.
|
420
|
+
# @param group_id [String] Id of the group you want to fetch.
|
425
421
|
# @param [Hash] opts the optional parameters
|
426
422
|
# @return [Array<(ChunkGroup, Integer, Hash)>] ChunkGroup data, response status code and response headers
|
427
|
-
def get_chunk_group_with_http_info(tr_dataset,
|
423
|
+
def get_chunk_group_with_http_info(tr_dataset, group_id, opts = {})
|
428
424
|
if @api_client.config.debugging
|
429
425
|
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_chunk_group ...'
|
430
426
|
end
|
@@ -432,12 +428,12 @@ module TrieveRubyClient
|
|
432
428
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
433
429
|
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_chunk_group"
|
434
430
|
end
|
435
|
-
# verify the required parameter '
|
436
|
-
if @api_client.config.client_side_validation &&
|
437
|
-
fail ArgumentError, "Missing the required parameter '
|
431
|
+
# verify the required parameter 'group_id' is set
|
432
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
433
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.get_chunk_group"
|
438
434
|
end
|
439
435
|
# resource path
|
440
|
-
local_var_path = '/api/chunk_group/{
|
436
|
+
local_var_path = '/api/chunk_group/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
441
437
|
|
442
438
|
# query parameters
|
443
439
|
query_params = opts[:query_params] || {}
|
@@ -480,25 +476,23 @@ module TrieveRubyClient
|
|
480
476
|
# Get Chunks in Group
|
481
477
|
# Get Chunks in Group Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.
|
482
478
|
# @param tr_dataset [String] The dataset id to use for the request
|
483
|
-
# @param
|
484
|
-
# @param group_id [String] Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.
|
479
|
+
# @param group_id [String] Id of the group you want to fetch.
|
485
480
|
# @param page [Integer] The page of chunks to get from the group
|
486
481
|
# @param [Hash] opts the optional parameters
|
487
482
|
# @return [BookmarkData]
|
488
|
-
def get_chunks_in_group(tr_dataset,
|
489
|
-
data, _status_code, _headers = get_chunks_in_group_with_http_info(tr_dataset,
|
483
|
+
def get_chunks_in_group(tr_dataset, group_id, page, opts = {})
|
484
|
+
data, _status_code, _headers = get_chunks_in_group_with_http_info(tr_dataset, group_id, page, opts)
|
490
485
|
data
|
491
486
|
end
|
492
487
|
|
493
488
|
# Get Chunks in Group
|
494
489
|
# Get Chunks in Group Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.
|
495
490
|
# @param tr_dataset [String] The dataset id to use for the request
|
496
|
-
# @param
|
497
|
-
# @param group_id [String] Id of the group you want to fetch. This can be either the group_id or the tracking_id. If both are provided, the group_id will be used.
|
491
|
+
# @param group_id [String] Id of the group you want to fetch.
|
498
492
|
# @param page [Integer] The page of chunks to get from the group
|
499
493
|
# @param [Hash] opts the optional parameters
|
500
494
|
# @return [Array<(BookmarkData, Integer, Hash)>] BookmarkData data, response status code and response headers
|
501
|
-
def get_chunks_in_group_with_http_info(tr_dataset,
|
495
|
+
def get_chunks_in_group_with_http_info(tr_dataset, group_id, page, opts = {})
|
502
496
|
if @api_client.config.debugging
|
503
497
|
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_chunks_in_group ...'
|
504
498
|
end
|
@@ -506,20 +500,16 @@ module TrieveRubyClient
|
|
506
500
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
507
501
|
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.get_chunks_in_group"
|
508
502
|
end
|
509
|
-
# verify the required parameter '
|
510
|
-
if @api_client.config.client_side_validation &&
|
511
|
-
fail ArgumentError, "Missing the required parameter '
|
512
|
-
end
|
513
|
-
# verify the required parameter 'page' is set
|
514
|
-
if @api_client.config.client_side_validation && page.nil?
|
515
|
-
fail ArgumentError, "Missing the required parameter 'page' when calling ChunkGroupApi.get_chunks_in_group"
|
503
|
+
# verify the required parameter 'group_id' is set
|
504
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
505
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.get_chunks_in_group"
|
516
506
|
end
|
517
507
|
if @api_client.config.client_side_validation && page < 0
|
518
508
|
fail ArgumentError, 'invalid value for "page" when calling ChunkGroupApi.get_chunks_in_group, must be greater than or equal to 0.'
|
519
509
|
end
|
520
510
|
|
521
511
|
# resource path
|
522
|
-
local_var_path = '/api/chunk_group/{
|
512
|
+
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))
|
523
513
|
|
524
514
|
# query parameters
|
525
515
|
query_params = opts[:query_params] || {}
|
@@ -789,7 +779,7 @@ module TrieveRubyClient
|
|
789
779
|
# @param tr_dataset [String] The dataset id to use for the request
|
790
780
|
# @param reccomend_group_chunks_request [ReccomendGroupChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
791
781
|
# @param [Hash] opts the optional parameters
|
792
|
-
# @return [
|
782
|
+
# @return [RecommendGroupChunkResponseTypes]
|
793
783
|
def get_recommended_groups(tr_dataset, reccomend_group_chunks_request, opts = {})
|
794
784
|
data, _status_code, _headers = get_recommended_groups_with_http_info(tr_dataset, reccomend_group_chunks_request, opts)
|
795
785
|
data
|
@@ -800,7 +790,7 @@ module TrieveRubyClient
|
|
800
790
|
# @param tr_dataset [String] The dataset id to use for the request
|
801
791
|
# @param reccomend_group_chunks_request [ReccomendGroupChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
802
792
|
# @param [Hash] opts the optional parameters
|
803
|
-
# @return [Array<(
|
793
|
+
# @return [Array<(RecommendGroupChunkResponseTypes, Integer, Hash)>] RecommendGroupChunkResponseTypes data, response status code and response headers
|
804
794
|
def get_recommended_groups_with_http_info(tr_dataset, reccomend_group_chunks_request, opts = {})
|
805
795
|
if @api_client.config.debugging
|
806
796
|
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.get_recommended_groups ...'
|
@@ -837,7 +827,7 @@ module TrieveRubyClient
|
|
837
827
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(reccomend_group_chunks_request)
|
838
828
|
|
839
829
|
# return_type
|
840
|
-
return_type = opts[:debug_return_type] || '
|
830
|
+
return_type = opts[:debug_return_type] || 'RecommendGroupChunkResponseTypes'
|
841
831
|
|
842
832
|
# auth_names
|
843
833
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -1018,23 +1008,29 @@ module TrieveRubyClient
|
|
1018
1008
|
|
1019
1009
|
# Search Over Groups
|
1020
1010
|
# Search Over Groups This route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes.
|
1011
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
1021
1012
|
# @param search_over_groups_data [SearchOverGroupsData] JSON request payload to semantically search over groups
|
1022
1013
|
# @param [Hash] opts the optional parameters
|
1023
|
-
# @return [
|
1024
|
-
def search_over_groups(search_over_groups_data, opts = {})
|
1025
|
-
data, _status_code, _headers = search_over_groups_with_http_info(search_over_groups_data, opts)
|
1014
|
+
# @return [SearchOverGroupsResponseTypes]
|
1015
|
+
def search_over_groups(tr_dataset, search_over_groups_data, opts = {})
|
1016
|
+
data, _status_code, _headers = search_over_groups_with_http_info(tr_dataset, search_over_groups_data, opts)
|
1026
1017
|
data
|
1027
1018
|
end
|
1028
1019
|
|
1029
1020
|
# Search Over Groups
|
1030
1021
|
# Search Over Groups This route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes.
|
1022
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
1031
1023
|
# @param search_over_groups_data [SearchOverGroupsData] JSON request payload to semantically search over groups
|
1032
1024
|
# @param [Hash] opts the optional parameters
|
1033
|
-
# @return [Array<(
|
1034
|
-
def search_over_groups_with_http_info(search_over_groups_data, opts = {})
|
1025
|
+
# @return [Array<(SearchOverGroupsResponseTypes, Integer, Hash)>] SearchOverGroupsResponseTypes data, response status code and response headers
|
1026
|
+
def search_over_groups_with_http_info(tr_dataset, search_over_groups_data, opts = {})
|
1035
1027
|
if @api_client.config.debugging
|
1036
1028
|
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.search_over_groups ...'
|
1037
1029
|
end
|
1030
|
+
# verify the required parameter 'tr_dataset' is set
|
1031
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
1032
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.search_over_groups"
|
1033
|
+
end
|
1038
1034
|
# verify the required parameter 'search_over_groups_data' is set
|
1039
1035
|
if @api_client.config.client_side_validation && search_over_groups_data.nil?
|
1040
1036
|
fail ArgumentError, "Missing the required parameter 'search_over_groups_data' when calling ChunkGroupApi.search_over_groups"
|
@@ -1054,6 +1050,7 @@ module TrieveRubyClient
|
|
1054
1050
|
if !content_type.nil?
|
1055
1051
|
header_params['Content-Type'] = content_type
|
1056
1052
|
end
|
1053
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
1057
1054
|
|
1058
1055
|
# form parameters
|
1059
1056
|
form_params = opts[:form_params] || {}
|
@@ -1062,10 +1059,10 @@ module TrieveRubyClient
|
|
1062
1059
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_over_groups_data)
|
1063
1060
|
|
1064
1061
|
# return_type
|
1065
|
-
return_type = opts[:debug_return_type] || '
|
1062
|
+
return_type = opts[:debug_return_type] || 'SearchOverGroupsResponseTypes'
|
1066
1063
|
|
1067
1064
|
# auth_names
|
1068
|
-
auth_names = opts[:debug_auth_names] || []
|
1065
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
1069
1066
|
|
1070
1067
|
new_options = opts.merge(
|
1071
1068
|
:operation => :"ChunkGroupApi.search_over_groups",
|
@@ -1089,7 +1086,7 @@ module TrieveRubyClient
|
|
1089
1086
|
# @param tr_dataset [String] The dataset id to use for the request
|
1090
1087
|
# @param search_within_group_data [SearchWithinGroupData] JSON request payload to semantically search a group
|
1091
1088
|
# @param [Hash] opts the optional parameters
|
1092
|
-
# @return [
|
1089
|
+
# @return [SearchWithinGroupResponseTypes]
|
1093
1090
|
def search_within_group(tr_dataset, search_within_group_data, opts = {})
|
1094
1091
|
data, _status_code, _headers = search_within_group_with_http_info(tr_dataset, search_within_group_data, opts)
|
1095
1092
|
data
|
@@ -1100,7 +1097,7 @@ module TrieveRubyClient
|
|
1100
1097
|
# @param tr_dataset [String] The dataset id to use for the request
|
1101
1098
|
# @param search_within_group_data [SearchWithinGroupData] JSON request payload to semantically search a group
|
1102
1099
|
# @param [Hash] opts the optional parameters
|
1103
|
-
# @return [Array<(
|
1100
|
+
# @return [Array<(SearchWithinGroupResponseTypes, Integer, Hash)>] SearchWithinGroupResponseTypes data, response status code and response headers
|
1104
1101
|
def search_within_group_with_http_info(tr_dataset, search_within_group_data, opts = {})
|
1105
1102
|
if @api_client.config.debugging
|
1106
1103
|
@api_client.config.logger.debug 'Calling API: ChunkGroupApi.search_within_group ...'
|
@@ -1137,7 +1134,7 @@ module TrieveRubyClient
|
|
1137
1134
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_within_group_data)
|
1138
1135
|
|
1139
1136
|
# return_type
|
1140
|
-
return_type = opts[:debug_return_type] || '
|
1137
|
+
return_type = opts[:debug_return_type] || 'SearchWithinGroupResponseTypes'
|
1141
1138
|
|
1142
1139
|
# auth_names
|
1143
1140
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -1160,7 +1157,7 @@ module TrieveRubyClient
|
|
1160
1157
|
end
|
1161
1158
|
|
1162
1159
|
# Update Group
|
1163
|
-
# Update Group Update a chunk_group.
|
1160
|
+
# Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail.
|
1164
1161
|
# @param tr_dataset [String] The dataset id to use for the request
|
1165
1162
|
# @param update_chunk_group_data [UpdateChunkGroupData] JSON request payload to update a chunkGroup
|
1166
1163
|
# @param [Hash] opts the optional parameters
|
@@ -1171,7 +1168,7 @@ module TrieveRubyClient
|
|
1171
1168
|
end
|
1172
1169
|
|
1173
1170
|
# Update Group
|
1174
|
-
# Update Group Update a chunk_group.
|
1171
|
+
# Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail.
|
1175
1172
|
# @param tr_dataset [String] The dataset id to use for the request
|
1176
1173
|
# @param update_chunk_group_data [UpdateChunkGroupData] JSON request payload to update a chunkGroup
|
1177
1174
|
# @param [Hash] opts the optional parameters
|
@@ -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.5.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -97,21 +97,21 @@ module TrieveRubyClient
|
|
97
97
|
# Delete Dataset
|
98
98
|
# Delete Dataset Delete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.
|
99
99
|
# @param tr_organization [String] The organization id to use for the request
|
100
|
-
# @param
|
100
|
+
# @param dataset_id [String] The id of the dataset you want to delete.
|
101
101
|
# @param [Hash] opts the optional parameters
|
102
102
|
# @return [nil]
|
103
|
-
def delete_dataset(tr_organization,
|
104
|
-
delete_dataset_with_http_info(tr_organization,
|
103
|
+
def delete_dataset(tr_organization, dataset_id, opts = {})
|
104
|
+
delete_dataset_with_http_info(tr_organization, dataset_id, opts)
|
105
105
|
nil
|
106
106
|
end
|
107
107
|
|
108
108
|
# Delete Dataset
|
109
109
|
# Delete Dataset Delete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.
|
110
110
|
# @param tr_organization [String] The organization id to use for the request
|
111
|
-
# @param
|
111
|
+
# @param dataset_id [String] The id of the dataset you want to delete.
|
112
112
|
# @param [Hash] opts the optional parameters
|
113
113
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
114
|
-
def delete_dataset_with_http_info(tr_organization,
|
114
|
+
def delete_dataset_with_http_info(tr_organization, dataset_id, opts = {})
|
115
115
|
if @api_client.config.debugging
|
116
116
|
@api_client.config.logger.debug 'Calling API: DatasetApi.delete_dataset ...'
|
117
117
|
end
|
@@ -119,12 +119,12 @@ module TrieveRubyClient
|
|
119
119
|
if @api_client.config.client_side_validation && tr_organization.nil?
|
120
120
|
fail ArgumentError, "Missing the required parameter 'tr_organization' when calling DatasetApi.delete_dataset"
|
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 'dataset_id' is set
|
123
|
+
if @api_client.config.client_side_validation && dataset_id.nil?
|
124
|
+
fail ArgumentError, "Missing the required parameter 'dataset_id' when calling DatasetApi.delete_dataset"
|
125
125
|
end
|
126
126
|
# resource path
|
127
|
-
local_var_path = '/api/dataset'
|
127
|
+
local_var_path = '/api/dataset/{dataset_id}'.sub('{' + 'dataset_id' + '}', CGI.escape(dataset_id.to_s))
|
128
128
|
|
129
129
|
# query parameters
|
130
130
|
query_params = opts[:query_params] || {}
|
@@ -133,18 +133,13 @@ module TrieveRubyClient
|
|
133
133
|
header_params = opts[:header_params] || {}
|
134
134
|
# HTTP header 'Accept' (if needed)
|
135
135
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
136
|
-
# HTTP header 'Content-Type'
|
137
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
138
|
-
if !content_type.nil?
|
139
|
-
header_params['Content-Type'] = content_type
|
140
|
-
end
|
141
136
|
header_params[:'TR-Organization'] = tr_organization
|
142
137
|
|
143
138
|
# form parameters
|
144
139
|
form_params = opts[:form_params] || {}
|
145
140
|
|
146
141
|
# http body (model)
|
147
|
-
post_body = opts[:debug_body]
|
142
|
+
post_body = opts[:debug_body]
|
148
143
|
|
149
144
|
# return_type
|
150
145
|
return_type = opts[:debug_return_type]
|
@@ -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.5.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|