trieve_ruby_client 0.8.0 → 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 +2 -0
- data/docs/ChunkFilter.md +3 -3
- data/docs/ChunkGroup.md +1 -1
- data/docs/ChunkGroupApi.md +35 -33
- data/docs/ChunkMetadata.md +5 -3
- data/docs/ChunkMetadataStringTagSet.md +46 -0
- data/docs/ChunkMetadataTypes.md +51 -0
- data/docs/ChunkMetadataWithScore.md +0 -2
- 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/GroupScoreSlimChunks.md +4 -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/RecommendChunksRequest.md +1 -1
- data/docs/RecommendGroupChunksRequest.md +1 -1
- data/docs/RegenerateMessageReqPayload.md +40 -0
- data/docs/RemoveChunkFromGroupReqPayload.md +18 -0
- data/docs/ScoreChunkDTO.md +3 -1
- data/docs/SearchChunkData.md +12 -6
- data/docs/SearchChunksReqPayload.md +54 -0
- data/docs/SearchOverGroupsData.md +12 -4
- data/docs/SearchWithinGroupData.md +16 -6
- 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 +15 -2
- 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 -20
- 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 +2 -18
- 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/group_score_slim_chunks.rb +22 -2
- 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 +2 -2
- data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +2 -2
- 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/score_slim_chunks.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +49 -14
- 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 +95 -6
- data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +119 -17
- data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_slim_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 -7784
- 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.0.gem +0 -0
- 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 +105 -2
@@ -0,0 +1,240 @@
|
|
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
|
+
# Boost is useful for when you want to boost certain phrases in the fulltext search results for official listings. I.e. making sure that the listing for AirBNB itself ranks higher than companies who make software for AirBNB hosts by boosting the AirBNB token for its official listing.
|
18
|
+
class BoostPhrase
|
19
|
+
# Amount to multiplicatevly increase the frequency of the tokens in the phrase by
|
20
|
+
attr_accessor :boost_factor
|
21
|
+
|
22
|
+
# The phrase to boost in the fulltext document frequency index
|
23
|
+
attr_accessor :phrase
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'boost_factor' => :'boost_factor',
|
29
|
+
:'phrase' => :'phrase'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'boost_factor' => :'Float',
|
42
|
+
:'phrase' => :'String'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# List of attributes with nullable: true
|
47
|
+
def self.openapi_nullable
|
48
|
+
Set.new([
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
if (!attributes.is_a?(Hash))
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::BoostPhrase` initialize method"
|
57
|
+
end
|
58
|
+
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::BoostPhrase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'boost_factor')
|
68
|
+
self.boost_factor = attributes[:'boost_factor']
|
69
|
+
else
|
70
|
+
self.boost_factor = nil
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'phrase')
|
74
|
+
self.phrase = attributes[:'phrase']
|
75
|
+
else
|
76
|
+
self.phrase = nil
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
|
+
invalid_properties = Array.new
|
85
|
+
if @boost_factor.nil?
|
86
|
+
invalid_properties.push('invalid value for "boost_factor", boost_factor cannot be nil.')
|
87
|
+
end
|
88
|
+
|
89
|
+
if @phrase.nil?
|
90
|
+
invalid_properties.push('invalid value for "phrase", phrase cannot be nil.')
|
91
|
+
end
|
92
|
+
|
93
|
+
invalid_properties
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check to see if the all the properties in the model are valid
|
97
|
+
# @return true if the model is valid
|
98
|
+
def valid?
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
100
|
+
return false if @boost_factor.nil?
|
101
|
+
return false if @phrase.nil?
|
102
|
+
true
|
103
|
+
end
|
104
|
+
|
105
|
+
# Checks equality by comparing each attribute.
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def ==(o)
|
108
|
+
return true if self.equal?(o)
|
109
|
+
self.class == o.class &&
|
110
|
+
boost_factor == o.boost_factor &&
|
111
|
+
phrase == o.phrase
|
112
|
+
end
|
113
|
+
|
114
|
+
# @see the `==` method
|
115
|
+
# @param [Object] Object to be compared
|
116
|
+
def eql?(o)
|
117
|
+
self == o
|
118
|
+
end
|
119
|
+
|
120
|
+
# Calculates hash code according to all attributes.
|
121
|
+
# @return [Integer] Hash code
|
122
|
+
def hash
|
123
|
+
[boost_factor, phrase].hash
|
124
|
+
end
|
125
|
+
|
126
|
+
# Builds the object from hash
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
+
# @return [Object] Returns the model itself
|
129
|
+
def self.build_from_hash(attributes)
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
132
|
+
transformed_hash = {}
|
133
|
+
openapi_types.each_pair do |key, type|
|
134
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = nil
|
136
|
+
elsif type =~ /\AArray<(.*)>/i
|
137
|
+
# check to ensure the input is an array given that the attribute
|
138
|
+
# is documented as an array but the input is not
|
139
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
140
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
141
|
+
end
|
142
|
+
elsif !attributes[attribute_map[key]].nil?
|
143
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
144
|
+
end
|
145
|
+
end
|
146
|
+
new(transformed_hash)
|
147
|
+
end
|
148
|
+
|
149
|
+
# Deserializes the data based on type
|
150
|
+
# @param string type Data type
|
151
|
+
# @param string value Value to be deserialized
|
152
|
+
# @return [Object] Deserialized data
|
153
|
+
def self._deserialize(type, value)
|
154
|
+
case type.to_sym
|
155
|
+
when :Time
|
156
|
+
Time.parse(value)
|
157
|
+
when :Date
|
158
|
+
Date.parse(value)
|
159
|
+
when :String
|
160
|
+
value.to_s
|
161
|
+
when :Integer
|
162
|
+
value.to_i
|
163
|
+
when :Float
|
164
|
+
value.to_f
|
165
|
+
when :Boolean
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
167
|
+
true
|
168
|
+
else
|
169
|
+
false
|
170
|
+
end
|
171
|
+
when :Object
|
172
|
+
# generic object (usually a Hash), return directly
|
173
|
+
value
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
180
|
+
{}.tap do |hash|
|
181
|
+
value.each do |k, v|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
else # model
|
186
|
+
# models (e.g. Pet) or oneOf
|
187
|
+
klass = TrieveRubyClient.const_get(type)
|
188
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the string representation of the object
|
193
|
+
# @return [String] String presentation of the object
|
194
|
+
def to_s
|
195
|
+
to_hash.to_s
|
196
|
+
end
|
197
|
+
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_body
|
201
|
+
to_hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the object in the form of hash
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_hash
|
207
|
+
hash = {}
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
209
|
+
value = self.send(attr)
|
210
|
+
if value.nil?
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
213
|
+
end
|
214
|
+
|
215
|
+
hash[param] = _to_hash(value)
|
216
|
+
end
|
217
|
+
hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Outputs non-array value in the form of hash
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
222
|
+
# @param [Object] value Any valid value
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
224
|
+
def _to_hash(value)
|
225
|
+
if value.is_a?(Array)
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
227
|
+
elsif value.is_a?(Hash)
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
230
|
+
end
|
231
|
+
elsif value.respond_to? :to_hash
|
232
|
+
value.to_hash
|
233
|
+
else
|
234
|
+
value
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
239
|
+
|
240
|
+
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.8.
|
6
|
+
The version of the OpenAPI document: 0.8.5
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -30,6 +30,9 @@ module TrieveRubyClient
|
|
30
30
|
# Group tracking_ids are the tracking_ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response.
|
31
31
|
attr_accessor :group_tracking_ids
|
32
32
|
|
33
|
+
# Image urls are a list of urls to images that are associated with the chunk. This is useful for when you want to associate images with a chunk.
|
34
|
+
attr_accessor :image_urls
|
35
|
+
|
33
36
|
# Link to the chunk. This can also be any string. Frequently, this is a link to the source of the chunk. The link value will not affect the embedding creation.
|
34
37
|
attr_accessor :link
|
35
38
|
|
@@ -64,6 +67,7 @@ module TrieveRubyClient
|
|
64
67
|
:'convert_html_to_text' => :'convert_html_to_text',
|
65
68
|
:'group_ids' => :'group_ids',
|
66
69
|
:'group_tracking_ids' => :'group_tracking_ids',
|
70
|
+
:'image_urls' => :'image_urls',
|
67
71
|
:'link' => :'link',
|
68
72
|
:'location' => :'location',
|
69
73
|
:'metadata' => :'metadata',
|
@@ -89,6 +93,7 @@ module TrieveRubyClient
|
|
89
93
|
:'convert_html_to_text' => :'Boolean',
|
90
94
|
:'group_ids' => :'Array<String>',
|
91
95
|
:'group_tracking_ids' => :'Array<String>',
|
96
|
+
:'image_urls' => :'Array<String>',
|
92
97
|
:'link' => :'String',
|
93
98
|
:'location' => :'GeoInfo',
|
94
99
|
:'metadata' => :'Object',
|
@@ -109,6 +114,7 @@ module TrieveRubyClient
|
|
109
114
|
:'convert_html_to_text',
|
110
115
|
:'group_ids',
|
111
116
|
:'group_tracking_ids',
|
117
|
+
:'image_urls',
|
112
118
|
:'link',
|
113
119
|
:'location',
|
114
120
|
:'metadata',
|
@@ -162,6 +168,12 @@ module TrieveRubyClient
|
|
162
168
|
end
|
163
169
|
end
|
164
170
|
|
171
|
+
if attributes.key?(:'image_urls')
|
172
|
+
if (value = attributes[:'image_urls']).is_a?(Array)
|
173
|
+
self.image_urls = value
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
165
177
|
if attributes.key?(:'link')
|
166
178
|
self.link = attributes[:'link']
|
167
179
|
end
|
@@ -226,6 +238,7 @@ module TrieveRubyClient
|
|
226
238
|
convert_html_to_text == o.convert_html_to_text &&
|
227
239
|
group_ids == o.group_ids &&
|
228
240
|
group_tracking_ids == o.group_tracking_ids &&
|
241
|
+
image_urls == o.image_urls &&
|
229
242
|
link == o.link &&
|
230
243
|
location == o.location &&
|
231
244
|
metadata == o.metadata &&
|
@@ -246,7 +259,7 @@ module TrieveRubyClient
|
|
246
259
|
# Calculates hash code according to all attributes.
|
247
260
|
# @return [Integer] Hash code
|
248
261
|
def hash
|
249
|
-
[chunk_html, chunk_vector, convert_html_to_text, group_ids, group_tracking_ids, link, location, metadata, split_avg, tag_set, time_stamp, tracking_id, upsert_by_tracking_id, weight].hash
|
262
|
+
[chunk_html, chunk_vector, convert_html_to_text, group_ids, group_tracking_ids, image_urls, link, location, metadata, split_avg, tag_set, time_stamp, tracking_id, upsert_by_tracking_id, weight].hash
|
250
263
|
end
|
251
264
|
|
252
265
|
# Builds the object from hash
|
@@ -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
|
@@ -41,9 +41,9 @@ module TrieveRubyClient
|
|
41
41
|
# Attribute type mapping.
|
42
42
|
def self.openapi_types
|
43
43
|
{
|
44
|
-
:'must' => :'Array<
|
45
|
-
:'must_not' => :'Array<
|
46
|
-
:'should' => :'Array<
|
44
|
+
:'must' => :'Array<ConditionType>',
|
45
|
+
:'must_not' => :'Array<ConditionType>',
|
46
|
+
:'should' => :'Array<ConditionType>'
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
@@ -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
|
@@ -62,7 +62,7 @@ module TrieveRubyClient
|
|
62
62
|
:'id' => :'String',
|
63
63
|
:'metadata' => :'Object',
|
64
64
|
:'name' => :'String',
|
65
|
-
:'tag_set' => :'String',
|
65
|
+
:'tag_set' => :'Array<String>',
|
66
66
|
:'tracking_id' => :'String',
|
67
67
|
:'updated_at' => :'Time'
|
68
68
|
}
|
@@ -127,7 +127,9 @@ module TrieveRubyClient
|
|
127
127
|
end
|
128
128
|
|
129
129
|
if attributes.key?(:'tag_set')
|
130
|
-
|
130
|
+
if (value = attributes[:'tag_set']).is_a?(Array)
|
131
|
+
self.tag_set = value
|
132
|
+
end
|
131
133
|
end
|
132
134
|
|
133
135
|
if attributes.key?(:'tracking_id')
|
@@ -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
|
@@ -17,20 +17,22 @@ module TrieveRubyClient
|
|
17
17
|
class ChunkMetadata
|
18
18
|
attr_accessor :chunk_html
|
19
19
|
|
20
|
-
attr_accessor :content
|
21
|
-
|
22
20
|
attr_accessor :created_at
|
23
21
|
|
24
22
|
attr_accessor :dataset_id
|
25
23
|
|
26
24
|
attr_accessor :id
|
27
25
|
|
26
|
+
attr_accessor :image_urls
|
27
|
+
|
28
28
|
attr_accessor :link
|
29
29
|
|
30
30
|
attr_accessor :location
|
31
31
|
|
32
32
|
attr_accessor :metadata
|
33
33
|
|
34
|
+
attr_accessor :num_value
|
35
|
+
|
34
36
|
attr_accessor :qdrant_point_id
|
35
37
|
|
36
38
|
attr_accessor :tag_set
|
@@ -47,13 +49,14 @@ module TrieveRubyClient
|
|
47
49
|
def self.attribute_map
|
48
50
|
{
|
49
51
|
:'chunk_html' => :'chunk_html',
|
50
|
-
:'content' => :'content',
|
51
52
|
:'created_at' => :'created_at',
|
52
53
|
:'dataset_id' => :'dataset_id',
|
53
54
|
:'id' => :'id',
|
55
|
+
:'image_urls' => :'image_urls',
|
54
56
|
:'link' => :'link',
|
55
57
|
:'location' => :'location',
|
56
58
|
:'metadata' => :'metadata',
|
59
|
+
:'num_value' => :'num_value',
|
57
60
|
:'qdrant_point_id' => :'qdrant_point_id',
|
58
61
|
:'tag_set' => :'tag_set',
|
59
62
|
:'time_stamp' => :'time_stamp',
|
@@ -72,15 +75,16 @@ module TrieveRubyClient
|
|
72
75
|
def self.openapi_types
|
73
76
|
{
|
74
77
|
:'chunk_html' => :'String',
|
75
|
-
:'content' => :'String',
|
76
78
|
:'created_at' => :'Time',
|
77
79
|
:'dataset_id' => :'String',
|
78
80
|
:'id' => :'String',
|
81
|
+
:'image_urls' => :'Array<String>',
|
79
82
|
:'link' => :'String',
|
80
83
|
:'location' => :'GeoInfo',
|
81
84
|
:'metadata' => :'Object',
|
85
|
+
:'num_value' => :'Float',
|
82
86
|
:'qdrant_point_id' => :'String',
|
83
|
-
:'tag_set' => :'String',
|
87
|
+
:'tag_set' => :'Array<String>',
|
84
88
|
:'time_stamp' => :'Time',
|
85
89
|
:'tracking_id' => :'String',
|
86
90
|
:'updated_at' => :'Time',
|
@@ -92,9 +96,11 @@ module TrieveRubyClient
|
|
92
96
|
def self.openapi_nullable
|
93
97
|
Set.new([
|
94
98
|
:'chunk_html',
|
99
|
+
:'image_urls',
|
95
100
|
:'link',
|
96
101
|
:'location',
|
97
102
|
:'metadata',
|
103
|
+
:'num_value',
|
98
104
|
:'qdrant_point_id',
|
99
105
|
:'tag_set',
|
100
106
|
:'time_stamp',
|
@@ -121,12 +127,6 @@ module TrieveRubyClient
|
|
121
127
|
self.chunk_html = attributes[:'chunk_html']
|
122
128
|
end
|
123
129
|
|
124
|
-
if attributes.key?(:'content')
|
125
|
-
self.content = attributes[:'content']
|
126
|
-
else
|
127
|
-
self.content = nil
|
128
|
-
end
|
129
|
-
|
130
130
|
if attributes.key?(:'created_at')
|
131
131
|
self.created_at = attributes[:'created_at']
|
132
132
|
else
|
@@ -145,6 +145,12 @@ module TrieveRubyClient
|
|
145
145
|
self.id = nil
|
146
146
|
end
|
147
147
|
|
148
|
+
if attributes.key?(:'image_urls')
|
149
|
+
if (value = attributes[:'image_urls']).is_a?(Array)
|
150
|
+
self.image_urls = value
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
148
154
|
if attributes.key?(:'link')
|
149
155
|
self.link = attributes[:'link']
|
150
156
|
end
|
@@ -157,12 +163,18 @@ module TrieveRubyClient
|
|
157
163
|
self.metadata = attributes[:'metadata']
|
158
164
|
end
|
159
165
|
|
166
|
+
if attributes.key?(:'num_value')
|
167
|
+
self.num_value = attributes[:'num_value']
|
168
|
+
end
|
169
|
+
|
160
170
|
if attributes.key?(:'qdrant_point_id')
|
161
171
|
self.qdrant_point_id = attributes[:'qdrant_point_id']
|
162
172
|
end
|
163
173
|
|
164
174
|
if attributes.key?(:'tag_set')
|
165
|
-
|
175
|
+
if (value = attributes[:'tag_set']).is_a?(Array)
|
176
|
+
self.tag_set = value
|
177
|
+
end
|
166
178
|
end
|
167
179
|
|
168
180
|
if attributes.key?(:'time_stamp')
|
@@ -191,10 +203,6 @@ module TrieveRubyClient
|
|
191
203
|
def list_invalid_properties
|
192
204
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
193
205
|
invalid_properties = Array.new
|
194
|
-
if @content.nil?
|
195
|
-
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
196
|
-
end
|
197
|
-
|
198
206
|
if @created_at.nil?
|
199
207
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
200
208
|
end
|
@@ -222,7 +230,6 @@ module TrieveRubyClient
|
|
222
230
|
# @return true if the model is valid
|
223
231
|
def valid?
|
224
232
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
225
|
-
return false if @content.nil?
|
226
233
|
return false if @created_at.nil?
|
227
234
|
return false if @dataset_id.nil?
|
228
235
|
return false if @id.nil?
|
@@ -237,13 +244,14 @@ module TrieveRubyClient
|
|
237
244
|
return true if self.equal?(o)
|
238
245
|
self.class == o.class &&
|
239
246
|
chunk_html == o.chunk_html &&
|
240
|
-
content == o.content &&
|
241
247
|
created_at == o.created_at &&
|
242
248
|
dataset_id == o.dataset_id &&
|
243
249
|
id == o.id &&
|
250
|
+
image_urls == o.image_urls &&
|
244
251
|
link == o.link &&
|
245
252
|
location == o.location &&
|
246
253
|
metadata == o.metadata &&
|
254
|
+
num_value == o.num_value &&
|
247
255
|
qdrant_point_id == o.qdrant_point_id &&
|
248
256
|
tag_set == o.tag_set &&
|
249
257
|
time_stamp == o.time_stamp &&
|
@@ -261,7 +269,7 @@ module TrieveRubyClient
|
|
261
269
|
# Calculates hash code according to all attributes.
|
262
270
|
# @return [Integer] Hash code
|
263
271
|
def hash
|
264
|
-
[chunk_html,
|
272
|
+
[chunk_html, created_at, dataset_id, id, image_urls, link, location, metadata, num_value, qdrant_point_id, tag_set, time_stamp, tracking_id, updated_at, weight].hash
|
265
273
|
end
|
266
274
|
|
267
275
|
# Builds the object from hash
|