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
@@ -0,0 +1,368 @@
|
|
1
|
+
=begin
|
2
|
+
#Trieve API
|
3
|
+
|
4
|
+
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
|
+
Contact: developers@trieve.ai
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TrieveRubyClient
|
17
|
+
class UploadFileReqPayload
|
18
|
+
# Base64 encoded file. This is the standard base64url encoding.
|
19
|
+
attr_accessor :base64_file
|
20
|
+
|
21
|
+
# Create chunks is a boolean which determines whether or not to create chunks from the file. If false, you can manually chunk the file and send the chunks to the create_chunk endpoint with the file_id to associate chunks with the file. Meant mostly for advanced users.
|
22
|
+
attr_accessor :create_chunks
|
23
|
+
|
24
|
+
# Description is an optional convience field so you do not have to remember what the file contains or is about. It will be included on the group resulting from the file which will hold its chunk.
|
25
|
+
attr_accessor :description
|
26
|
+
|
27
|
+
# Name of the file being uploaded, including the extension.
|
28
|
+
attr_accessor :file_name
|
29
|
+
|
30
|
+
# Group tracking id is an optional field which allows you to specify the tracking id of the group that is created from the file. Chunks created will be created with the tracking id of `group_tracking_id|<index of chunk>`
|
31
|
+
attr_accessor :group_tracking_id
|
32
|
+
|
33
|
+
# Link to the file. This can also be any string. This can be used to filter when searching for the file's resulting chunks. The link value will not affect embedding creation.
|
34
|
+
attr_accessor :link
|
35
|
+
|
36
|
+
# Metadata is a JSON object which can be used to filter chunks. This is useful for when you want to filter chunks by arbitrary metadata. Unlike with tag filtering, there is a performance hit for filtering on metadata. Will be passed down to the file's chunks.
|
37
|
+
attr_accessor :metadata
|
38
|
+
|
39
|
+
# Rebalance chunks is an optional field which allows you to specify whether or not to rebalance the chunks created from the file. If not specified, the default true is used. If true, Trieve will evenly distribute remainder splits across chunks such that 66 splits with a `target_splits_per_chunk` of 20 will result in 3 chunks with 22 splits each.
|
40
|
+
attr_accessor :rebalance_chunks
|
41
|
+
|
42
|
+
# Split delimiters is an optional field which allows you to specify the delimiters to use when splitting the file before chunking the text. If not specified, the default [.!?\\n] are used to split into sentences. However, you may want to use spaces or other delimiters.
|
43
|
+
attr_accessor :split_delimiters
|
44
|
+
|
45
|
+
# Tag set is a comma separated list of tags which will be passed down to the chunks made from the file. Tags are used to filter chunks when searching. HNSW indices are created for each tag such that there is no performance loss when filtering on them.
|
46
|
+
attr_accessor :tag_set
|
47
|
+
|
48
|
+
# Target splits per chunk. This is an optional field which allows you to specify the number of splits you want per chunk. If not specified, the default 20 is used. However, you may want to use a different number.
|
49
|
+
attr_accessor :target_splits_per_chunk
|
50
|
+
|
51
|
+
# Time stamp should be an ISO 8601 combined date and time without timezone. Time_stamp is used for time window filtering and recency-biasing search results. Will be passed down to the file's chunks.
|
52
|
+
attr_accessor :time_stamp
|
53
|
+
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
55
|
+
def self.attribute_map
|
56
|
+
{
|
57
|
+
:'base64_file' => :'base64_file',
|
58
|
+
:'create_chunks' => :'create_chunks',
|
59
|
+
:'description' => :'description',
|
60
|
+
:'file_name' => :'file_name',
|
61
|
+
:'group_tracking_id' => :'group_tracking_id',
|
62
|
+
:'link' => :'link',
|
63
|
+
:'metadata' => :'metadata',
|
64
|
+
:'rebalance_chunks' => :'rebalance_chunks',
|
65
|
+
:'split_delimiters' => :'split_delimiters',
|
66
|
+
:'tag_set' => :'tag_set',
|
67
|
+
:'target_splits_per_chunk' => :'target_splits_per_chunk',
|
68
|
+
:'time_stamp' => :'time_stamp'
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
# Returns all the JSON keys this model knows about
|
73
|
+
def self.acceptable_attributes
|
74
|
+
attribute_map.values
|
75
|
+
end
|
76
|
+
|
77
|
+
# Attribute type mapping.
|
78
|
+
def self.openapi_types
|
79
|
+
{
|
80
|
+
:'base64_file' => :'String',
|
81
|
+
:'create_chunks' => :'Boolean',
|
82
|
+
:'description' => :'String',
|
83
|
+
:'file_name' => :'String',
|
84
|
+
:'group_tracking_id' => :'String',
|
85
|
+
:'link' => :'String',
|
86
|
+
:'metadata' => :'Object',
|
87
|
+
:'rebalance_chunks' => :'Boolean',
|
88
|
+
:'split_delimiters' => :'Array<String>',
|
89
|
+
:'tag_set' => :'Array<String>',
|
90
|
+
:'target_splits_per_chunk' => :'Integer',
|
91
|
+
:'time_stamp' => :'String'
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
# List of attributes with nullable: true
|
96
|
+
def self.openapi_nullable
|
97
|
+
Set.new([
|
98
|
+
:'create_chunks',
|
99
|
+
:'description',
|
100
|
+
:'group_tracking_id',
|
101
|
+
:'link',
|
102
|
+
:'metadata',
|
103
|
+
:'rebalance_chunks',
|
104
|
+
:'split_delimiters',
|
105
|
+
:'tag_set',
|
106
|
+
:'target_splits_per_chunk',
|
107
|
+
:'time_stamp'
|
108
|
+
])
|
109
|
+
end
|
110
|
+
|
111
|
+
# Initializes the object
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
def initialize(attributes = {})
|
114
|
+
if (!attributes.is_a?(Hash))
|
115
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::UploadFileReqPayload` initialize method"
|
116
|
+
end
|
117
|
+
|
118
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
119
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
120
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
121
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::UploadFileReqPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
122
|
+
end
|
123
|
+
h[k.to_sym] = v
|
124
|
+
}
|
125
|
+
|
126
|
+
if attributes.key?(:'base64_file')
|
127
|
+
self.base64_file = attributes[:'base64_file']
|
128
|
+
else
|
129
|
+
self.base64_file = nil
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'create_chunks')
|
133
|
+
self.create_chunks = attributes[:'create_chunks']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'description')
|
137
|
+
self.description = attributes[:'description']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'file_name')
|
141
|
+
self.file_name = attributes[:'file_name']
|
142
|
+
else
|
143
|
+
self.file_name = nil
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'group_tracking_id')
|
147
|
+
self.group_tracking_id = attributes[:'group_tracking_id']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'link')
|
151
|
+
self.link = attributes[:'link']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'metadata')
|
155
|
+
self.metadata = attributes[:'metadata']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.key?(:'rebalance_chunks')
|
159
|
+
self.rebalance_chunks = attributes[:'rebalance_chunks']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.key?(:'split_delimiters')
|
163
|
+
if (value = attributes[:'split_delimiters']).is_a?(Array)
|
164
|
+
self.split_delimiters = value
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
if attributes.key?(:'tag_set')
|
169
|
+
if (value = attributes[:'tag_set']).is_a?(Array)
|
170
|
+
self.tag_set = value
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'target_splits_per_chunk')
|
175
|
+
self.target_splits_per_chunk = attributes[:'target_splits_per_chunk']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'time_stamp')
|
179
|
+
self.time_stamp = attributes[:'time_stamp']
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
184
|
+
# @return Array for valid properties with the reasons
|
185
|
+
def list_invalid_properties
|
186
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
187
|
+
invalid_properties = Array.new
|
188
|
+
if @base64_file.nil?
|
189
|
+
invalid_properties.push('invalid value for "base64_file", base64_file cannot be nil.')
|
190
|
+
end
|
191
|
+
|
192
|
+
if @file_name.nil?
|
193
|
+
invalid_properties.push('invalid value for "file_name", file_name cannot be nil.')
|
194
|
+
end
|
195
|
+
|
196
|
+
if !@target_splits_per_chunk.nil? && @target_splits_per_chunk < 0
|
197
|
+
invalid_properties.push('invalid value for "target_splits_per_chunk", must be greater than or equal to 0.')
|
198
|
+
end
|
199
|
+
|
200
|
+
invalid_properties
|
201
|
+
end
|
202
|
+
|
203
|
+
# Check to see if the all the properties in the model are valid
|
204
|
+
# @return true if the model is valid
|
205
|
+
def valid?
|
206
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
207
|
+
return false if @base64_file.nil?
|
208
|
+
return false if @file_name.nil?
|
209
|
+
return false if !@target_splits_per_chunk.nil? && @target_splits_per_chunk < 0
|
210
|
+
true
|
211
|
+
end
|
212
|
+
|
213
|
+
# Custom attribute writer method with validation
|
214
|
+
# @param [Object] target_splits_per_chunk Value to be assigned
|
215
|
+
def target_splits_per_chunk=(target_splits_per_chunk)
|
216
|
+
if !target_splits_per_chunk.nil? && target_splits_per_chunk < 0
|
217
|
+
fail ArgumentError, 'invalid value for "target_splits_per_chunk", must be greater than or equal to 0.'
|
218
|
+
end
|
219
|
+
|
220
|
+
@target_splits_per_chunk = target_splits_per_chunk
|
221
|
+
end
|
222
|
+
|
223
|
+
# Checks equality by comparing each attribute.
|
224
|
+
# @param [Object] Object to be compared
|
225
|
+
def ==(o)
|
226
|
+
return true if self.equal?(o)
|
227
|
+
self.class == o.class &&
|
228
|
+
base64_file == o.base64_file &&
|
229
|
+
create_chunks == o.create_chunks &&
|
230
|
+
description == o.description &&
|
231
|
+
file_name == o.file_name &&
|
232
|
+
group_tracking_id == o.group_tracking_id &&
|
233
|
+
link == o.link &&
|
234
|
+
metadata == o.metadata &&
|
235
|
+
rebalance_chunks == o.rebalance_chunks &&
|
236
|
+
split_delimiters == o.split_delimiters &&
|
237
|
+
tag_set == o.tag_set &&
|
238
|
+
target_splits_per_chunk == o.target_splits_per_chunk &&
|
239
|
+
time_stamp == o.time_stamp
|
240
|
+
end
|
241
|
+
|
242
|
+
# @see the `==` method
|
243
|
+
# @param [Object] Object to be compared
|
244
|
+
def eql?(o)
|
245
|
+
self == o
|
246
|
+
end
|
247
|
+
|
248
|
+
# Calculates hash code according to all attributes.
|
249
|
+
# @return [Integer] Hash code
|
250
|
+
def hash
|
251
|
+
[base64_file, create_chunks, description, file_name, group_tracking_id, link, metadata, rebalance_chunks, split_delimiters, tag_set, target_splits_per_chunk, time_stamp].hash
|
252
|
+
end
|
253
|
+
|
254
|
+
# Builds the object from hash
|
255
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
256
|
+
# @return [Object] Returns the model itself
|
257
|
+
def self.build_from_hash(attributes)
|
258
|
+
return nil unless attributes.is_a?(Hash)
|
259
|
+
attributes = attributes.transform_keys(&:to_sym)
|
260
|
+
transformed_hash = {}
|
261
|
+
openapi_types.each_pair do |key, type|
|
262
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
263
|
+
transformed_hash["#{key}"] = nil
|
264
|
+
elsif type =~ /\AArray<(.*)>/i
|
265
|
+
# check to ensure the input is an array given that the attribute
|
266
|
+
# is documented as an array but the input is not
|
267
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
268
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
269
|
+
end
|
270
|
+
elsif !attributes[attribute_map[key]].nil?
|
271
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
272
|
+
end
|
273
|
+
end
|
274
|
+
new(transformed_hash)
|
275
|
+
end
|
276
|
+
|
277
|
+
# Deserializes the data based on type
|
278
|
+
# @param string type Data type
|
279
|
+
# @param string value Value to be deserialized
|
280
|
+
# @return [Object] Deserialized data
|
281
|
+
def self._deserialize(type, value)
|
282
|
+
case type.to_sym
|
283
|
+
when :Time
|
284
|
+
Time.parse(value)
|
285
|
+
when :Date
|
286
|
+
Date.parse(value)
|
287
|
+
when :String
|
288
|
+
value.to_s
|
289
|
+
when :Integer
|
290
|
+
value.to_i
|
291
|
+
when :Float
|
292
|
+
value.to_f
|
293
|
+
when :Boolean
|
294
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
295
|
+
true
|
296
|
+
else
|
297
|
+
false
|
298
|
+
end
|
299
|
+
when :Object
|
300
|
+
# generic object (usually a Hash), return directly
|
301
|
+
value
|
302
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
303
|
+
inner_type = Regexp.last_match[:inner_type]
|
304
|
+
value.map { |v| _deserialize(inner_type, v) }
|
305
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
306
|
+
k_type = Regexp.last_match[:k_type]
|
307
|
+
v_type = Regexp.last_match[:v_type]
|
308
|
+
{}.tap do |hash|
|
309
|
+
value.each do |k, v|
|
310
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
311
|
+
end
|
312
|
+
end
|
313
|
+
else # model
|
314
|
+
# models (e.g. Pet) or oneOf
|
315
|
+
klass = TrieveRubyClient.const_get(type)
|
316
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
# Returns the string representation of the object
|
321
|
+
# @return [String] String presentation of the object
|
322
|
+
def to_s
|
323
|
+
to_hash.to_s
|
324
|
+
end
|
325
|
+
|
326
|
+
# to_body is an alias to to_hash (backward compatibility)
|
327
|
+
# @return [Hash] Returns the object in the form of hash
|
328
|
+
def to_body
|
329
|
+
to_hash
|
330
|
+
end
|
331
|
+
|
332
|
+
# Returns the object in the form of hash
|
333
|
+
# @return [Hash] Returns the object in the form of hash
|
334
|
+
def to_hash
|
335
|
+
hash = {}
|
336
|
+
self.class.attribute_map.each_pair do |attr, param|
|
337
|
+
value = self.send(attr)
|
338
|
+
if value.nil?
|
339
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
340
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
341
|
+
end
|
342
|
+
|
343
|
+
hash[param] = _to_hash(value)
|
344
|
+
end
|
345
|
+
hash
|
346
|
+
end
|
347
|
+
|
348
|
+
# Outputs non-array value in the form of hash
|
349
|
+
# For object, use to_hash. Otherwise, just return the value
|
350
|
+
# @param [Object] value Any valid value
|
351
|
+
# @return [Hash] Returns the value in the form of hash
|
352
|
+
def _to_hash(value)
|
353
|
+
if value.is_a?(Array)
|
354
|
+
value.compact.map { |v| _to_hash(v) }
|
355
|
+
elsif value.is_a?(Hash)
|
356
|
+
{}.tap do |hash|
|
357
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
358
|
+
end
|
359
|
+
elsif value.respond_to? :to_hash
|
360
|
+
value.to_hash
|
361
|
+
else
|
362
|
+
value
|
363
|
+
end
|
364
|
+
end
|
365
|
+
|
366
|
+
end
|
367
|
+
|
368
|
+
end
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -11,5 +11,5 @@ Generator version: 7.4.0
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module TrieveRubyClient
|
14
|
-
VERSION = '0.
|
14
|
+
VERSION = '0.10.7'
|
15
15
|
end
|
data/lib/trieve_ruby_client.rb
CHANGED
@@ -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
|
@@ -18,32 +18,39 @@ require 'trieve_ruby_client/configuration'
|
|
18
18
|
|
19
19
|
# Models
|
20
20
|
require 'trieve_ruby_client/models/add_chunk_to_group_data'
|
21
|
-
require 'trieve_ruby_client/models/
|
21
|
+
require 'trieve_ruby_client/models/api_key_resp_body'
|
22
22
|
require 'trieve_ruby_client/models/auth_query'
|
23
|
+
require 'trieve_ruby_client/models/autocomplete_req_payload'
|
23
24
|
require 'trieve_ruby_client/models/batch_queued_chunk_response'
|
24
25
|
require 'trieve_ruby_client/models/bookmark_data'
|
25
26
|
require 'trieve_ruby_client/models/bookmark_group_result'
|
27
|
+
require 'trieve_ruby_client/models/boost_phrase'
|
26
28
|
require 'trieve_ruby_client/models/chat_message_proxy'
|
27
|
-
require 'trieve_ruby_client/models/chunk_data'
|
28
29
|
require 'trieve_ruby_client/models/chunk_filter'
|
29
30
|
require 'trieve_ruby_client/models/chunk_group'
|
30
31
|
require 'trieve_ruby_client/models/chunk_group_and_file'
|
31
32
|
require 'trieve_ruby_client/models/chunk_metadata'
|
33
|
+
require 'trieve_ruby_client/models/chunk_metadata_string_tag_set'
|
34
|
+
require 'trieve_ruby_client/models/chunk_metadata_types'
|
32
35
|
require 'trieve_ruby_client/models/chunk_metadata_with_score'
|
36
|
+
require 'trieve_ruby_client/models/chunk_req_payload'
|
33
37
|
require 'trieve_ruby_client/models/client_dataset_configuration'
|
34
|
-
require 'trieve_ruby_client/models/
|
35
|
-
require 'trieve_ruby_client/models/
|
38
|
+
require 'trieve_ruby_client/models/condition_type'
|
39
|
+
require 'trieve_ruby_client/models/content_chunk_metadata'
|
40
|
+
require 'trieve_ruby_client/models/create_chunk_group_req_payload'
|
41
|
+
require 'trieve_ruby_client/models/create_chunk_req_payload_enum'
|
36
42
|
require 'trieve_ruby_client/models/create_dataset_request'
|
37
|
-
require 'trieve_ruby_client/models/
|
43
|
+
require 'trieve_ruby_client/models/create_message_req_payload'
|
38
44
|
require 'trieve_ruby_client/models/create_organization_data'
|
39
|
-
require 'trieve_ruby_client/models/
|
45
|
+
require 'trieve_ruby_client/models/create_topic_req_payload'
|
40
46
|
require 'trieve_ruby_client/models/dataset'
|
41
47
|
require 'trieve_ruby_client/models/dataset_and_usage'
|
42
48
|
require 'trieve_ruby_client/models/dataset_dto'
|
43
49
|
require 'trieve_ruby_client/models/dataset_usage_count'
|
50
|
+
require 'trieve_ruby_client/models/date_range'
|
44
51
|
require 'trieve_ruby_client/models/delete_topic_data'
|
45
52
|
require 'trieve_ruby_client/models/delete_user_api_key_request'
|
46
|
-
require 'trieve_ruby_client/models/
|
53
|
+
require 'trieve_ruby_client/models/edit_message_req_payload'
|
47
54
|
require 'trieve_ruby_client/models/error_response_body'
|
48
55
|
require 'trieve_ruby_client/models/event'
|
49
56
|
require 'trieve_ruby_client/models/event_return'
|
@@ -54,12 +61,13 @@ require 'trieve_ruby_client/models/generate_chunks_request'
|
|
54
61
|
require 'trieve_ruby_client/models/geo_info'
|
55
62
|
require 'trieve_ruby_client/models/geo_types'
|
56
63
|
require 'trieve_ruby_client/models/get_chunks_data'
|
64
|
+
require 'trieve_ruby_client/models/get_datasets_pagination'
|
57
65
|
require 'trieve_ruby_client/models/get_events_data'
|
58
66
|
require 'trieve_ruby_client/models/get_groups_for_chunks_data'
|
59
67
|
require 'trieve_ruby_client/models/get_tracking_chunks_data'
|
60
68
|
require 'trieve_ruby_client/models/group_data'
|
61
69
|
require 'trieve_ruby_client/models/group_score_chunk'
|
62
|
-
require 'trieve_ruby_client/models/
|
70
|
+
require 'trieve_ruby_client/models/has_id_condition'
|
63
71
|
require 'trieve_ruby_client/models/invitation_data'
|
64
72
|
require 'trieve_ruby_client/models/location_bounding_box'
|
65
73
|
require 'trieve_ruby_client/models/location_polygon'
|
@@ -72,19 +80,16 @@ require 'trieve_ruby_client/models/range'
|
|
72
80
|
require 'trieve_ruby_client/models/range_condition'
|
73
81
|
require 'trieve_ruby_client/models/recommend_chunks_request'
|
74
82
|
require 'trieve_ruby_client/models/recommend_group_chunks_request'
|
75
|
-
require 'trieve_ruby_client/models/
|
83
|
+
require 'trieve_ruby_client/models/regenerate_message_req_payload'
|
84
|
+
require 'trieve_ruby_client/models/remove_chunk_from_group_req_payload'
|
76
85
|
require 'trieve_ruby_client/models/return_queued_chunk'
|
77
86
|
require 'trieve_ruby_client/models/score_chunk_dto'
|
78
|
-
require 'trieve_ruby_client/models/score_slim_chunks'
|
79
|
-
require 'trieve_ruby_client/models/search_chunk_data'
|
80
87
|
require 'trieve_ruby_client/models/search_chunk_query_response_body'
|
88
|
+
require 'trieve_ruby_client/models/search_chunks_req_payload'
|
81
89
|
require 'trieve_ruby_client/models/search_over_groups_data'
|
82
90
|
require 'trieve_ruby_client/models/search_over_groups_results'
|
83
|
-
require 'trieve_ruby_client/models/search_over_groups_slim_results'
|
84
|
-
require 'trieve_ruby_client/models/search_slim_chunk_query_response_body'
|
85
91
|
require 'trieve_ruby_client/models/search_within_group_data'
|
86
92
|
require 'trieve_ruby_client/models/search_within_group_results'
|
87
|
-
require 'trieve_ruby_client/models/search_within_group_slim_results'
|
88
93
|
require 'trieve_ruby_client/models/set_user_api_key_request'
|
89
94
|
require 'trieve_ruby_client/models/set_user_api_key_response'
|
90
95
|
require 'trieve_ruby_client/models/single_queued_chunk_response'
|
@@ -93,18 +98,18 @@ require 'trieve_ruby_client/models/slim_chunk_metadata_with_score'
|
|
93
98
|
require 'trieve_ruby_client/models/slim_group'
|
94
99
|
require 'trieve_ruby_client/models/slim_user'
|
95
100
|
require 'trieve_ruby_client/models/stripe_plan'
|
96
|
-
require 'trieve_ruby_client/models/
|
101
|
+
require 'trieve_ruby_client/models/suggested_queries_req_payload'
|
97
102
|
require 'trieve_ruby_client/models/suggested_queries_response'
|
98
103
|
require 'trieve_ruby_client/models/topic'
|
99
104
|
require 'trieve_ruby_client/models/update_chunk_by_tracking_id_data'
|
100
|
-
require 'trieve_ruby_client/models/update_chunk_data'
|
101
105
|
require 'trieve_ruby_client/models/update_chunk_group_data'
|
106
|
+
require 'trieve_ruby_client/models/update_chunk_req_payload'
|
102
107
|
require 'trieve_ruby_client/models/update_dataset_request'
|
103
|
-
require 'trieve_ruby_client/models/
|
108
|
+
require 'trieve_ruby_client/models/update_group_by_tracking_id_req_payload'
|
104
109
|
require 'trieve_ruby_client/models/update_organization_data'
|
105
|
-
require 'trieve_ruby_client/models/
|
110
|
+
require 'trieve_ruby_client/models/update_topic_req_payload'
|
106
111
|
require 'trieve_ruby_client/models/update_user_org_role_data'
|
107
|
-
require 'trieve_ruby_client/models/
|
112
|
+
require 'trieve_ruby_client/models/upload_file_req_payload'
|
108
113
|
require 'trieve_ruby_client/models/upload_file_result'
|
109
114
|
require 'trieve_ruby_client/models/user_organization'
|
110
115
|
|
data/openapi-generator.yaml
CHANGED