trieve_ruby_client 0.6.0 → 0.6.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 +15 -19
- data/docs/BookmarkData.md +1 -1
- data/docs/ChunkApi.md +9 -9
- data/docs/ChunkData.md +2 -0
- data/docs/ChunkGroupApi.md +14 -14
- data/docs/ChunkMetadataWithScore.md +44 -0
- data/docs/CreateChunkGroupData.md +1 -1
- data/docs/FileApi.md +1 -1
- data/docs/GetEventsData.md +1 -1
- data/docs/GroupScoreChunk.md +24 -0
- data/docs/GroupScoreSlimChunks.md +20 -0
- data/docs/ScoreChunkDTO.md +1 -1
- data/docs/SearchOverGroupsResults.md +20 -0
- data/docs/SearchOverGroupsSlimResults.md +20 -0
- data/docs/SearchWithinGroupResults.md +22 -0
- data/docs/SearchWithinGroupSlimResults.md +22 -0
- data/docs/SlimChunkMetadataWithScore.md +38 -0
- data/docs/UpdateChunkByTrackingIdData.md +2 -0
- data/docs/UpdateChunkData.md +2 -0
- data/docs/UploadFileData.md +2 -2
- data/docs/UserApi.md +2 -2
- data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_api.rb +9 -9
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +10 -10
- data/lib/trieve_ruby_client/api/dataset_api.rb +1 -1
- 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 +1 -1
- data/lib/trieve_ruby_client/api/user_api.rb +3 -3
- 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/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 +2 -2
- 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 +13 -2
- 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_score.rb +387 -0
- 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 +2 -8
- 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_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.rb +259 -0
- data/lib/trieve_ruby_client/models/group_score_slim_chunks.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 +1 -1
- data/lib/trieve_ruby_client/models/range_condition.rb +1 -1
- 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/return_queued_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +2 -2
- data/lib/trieve_ruby_client/models/score_slim_chunks.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_results.rb +239 -0
- data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +239 -0
- 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 +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_results.rb +255 -0
- data/lib/trieve_ruby_client/models/search_within_group_slim_results.rb +255 -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/slim_chunk_metadata.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +345 -0
- 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_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 +13 -2
- data/lib/trieve_ruby_client/models/update_chunk_data.rb +13 -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 +1 -1
- data/lib/trieve_ruby_client/models/upload_file_data.rb +13 -19
- 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 +9 -13
- data/openapi-generator.yaml +1 -1
- data/openapi.json +279 -198
- data/spec/models/chunk_metadata_with_score_spec.rb +114 -0
- data/spec/models/group_score_chunk_spec.rb +48 -0
- data/spec/models/group_score_slim_chunks_spec.rb +42 -0
- data/spec/models/search_over_groups_results_spec.rb +42 -0
- data/spec/models/search_over_groups_slim_results_spec.rb +42 -0
- data/spec/models/search_within_group_results_spec.rb +48 -0
- data/spec/models/search_within_group_slim_results_spec.rb +48 -0
- data/spec/models/slim_chunk_metadata_with_score_spec.rb +96 -0
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.6.0.gem +0 -0
- data/trieve_ruby_client-0.6.2.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +36 -2
@@ -0,0 +1,345 @@
|
|
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.6.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 SlimChunkMetadataWithScore
|
18
|
+
attr_accessor :created_at
|
19
|
+
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
attr_accessor :link
|
23
|
+
|
24
|
+
attr_accessor :metadata
|
25
|
+
|
26
|
+
attr_accessor :qdrant_point_id
|
27
|
+
|
28
|
+
attr_accessor :score
|
29
|
+
|
30
|
+
attr_accessor :tag_set
|
31
|
+
|
32
|
+
attr_accessor :time_stamp
|
33
|
+
|
34
|
+
attr_accessor :tracking_id
|
35
|
+
|
36
|
+
attr_accessor :updated_at
|
37
|
+
|
38
|
+
attr_accessor :weight
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'created_at' => :'created_at',
|
44
|
+
:'id' => :'id',
|
45
|
+
:'link' => :'link',
|
46
|
+
:'metadata' => :'metadata',
|
47
|
+
:'qdrant_point_id' => :'qdrant_point_id',
|
48
|
+
:'score' => :'score',
|
49
|
+
:'tag_set' => :'tag_set',
|
50
|
+
:'time_stamp' => :'time_stamp',
|
51
|
+
:'tracking_id' => :'tracking_id',
|
52
|
+
:'updated_at' => :'updated_at',
|
53
|
+
:'weight' => :'weight'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Returns all the JSON keys this model knows about
|
58
|
+
def self.acceptable_attributes
|
59
|
+
attribute_map.values
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute type mapping.
|
63
|
+
def self.openapi_types
|
64
|
+
{
|
65
|
+
:'created_at' => :'Time',
|
66
|
+
:'id' => :'String',
|
67
|
+
:'link' => :'String',
|
68
|
+
:'metadata' => :'Object',
|
69
|
+
:'qdrant_point_id' => :'String',
|
70
|
+
:'score' => :'Float',
|
71
|
+
:'tag_set' => :'String',
|
72
|
+
:'time_stamp' => :'Time',
|
73
|
+
:'tracking_id' => :'String',
|
74
|
+
:'updated_at' => :'Time',
|
75
|
+
:'weight' => :'Float'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# List of attributes with nullable: true
|
80
|
+
def self.openapi_nullable
|
81
|
+
Set.new([
|
82
|
+
:'link',
|
83
|
+
:'metadata',
|
84
|
+
:'qdrant_point_id',
|
85
|
+
:'tag_set',
|
86
|
+
:'time_stamp',
|
87
|
+
:'tracking_id',
|
88
|
+
])
|
89
|
+
end
|
90
|
+
|
91
|
+
# Initializes the object
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
def initialize(attributes = {})
|
94
|
+
if (!attributes.is_a?(Hash))
|
95
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::SlimChunkMetadataWithScore` initialize method"
|
96
|
+
end
|
97
|
+
|
98
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
99
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
100
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
101
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::SlimChunkMetadataWithScore`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
102
|
+
end
|
103
|
+
h[k.to_sym] = v
|
104
|
+
}
|
105
|
+
|
106
|
+
if attributes.key?(:'created_at')
|
107
|
+
self.created_at = attributes[:'created_at']
|
108
|
+
else
|
109
|
+
self.created_at = nil
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'id')
|
113
|
+
self.id = attributes[:'id']
|
114
|
+
else
|
115
|
+
self.id = nil
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'link')
|
119
|
+
self.link = attributes[:'link']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'metadata')
|
123
|
+
self.metadata = attributes[:'metadata']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'qdrant_point_id')
|
127
|
+
self.qdrant_point_id = attributes[:'qdrant_point_id']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'score')
|
131
|
+
self.score = attributes[:'score']
|
132
|
+
else
|
133
|
+
self.score = nil
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'tag_set')
|
137
|
+
self.tag_set = attributes[:'tag_set']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'time_stamp')
|
141
|
+
self.time_stamp = attributes[:'time_stamp']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'tracking_id')
|
145
|
+
self.tracking_id = attributes[:'tracking_id']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'updated_at')
|
149
|
+
self.updated_at = attributes[:'updated_at']
|
150
|
+
else
|
151
|
+
self.updated_at = nil
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'weight')
|
155
|
+
self.weight = attributes[:'weight']
|
156
|
+
else
|
157
|
+
self.weight = nil
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
162
|
+
# @return Array for valid properties with the reasons
|
163
|
+
def list_invalid_properties
|
164
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
165
|
+
invalid_properties = Array.new
|
166
|
+
if @created_at.nil?
|
167
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
168
|
+
end
|
169
|
+
|
170
|
+
if @id.nil?
|
171
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
172
|
+
end
|
173
|
+
|
174
|
+
if @score.nil?
|
175
|
+
invalid_properties.push('invalid value for "score", score cannot be nil.')
|
176
|
+
end
|
177
|
+
|
178
|
+
if @updated_at.nil?
|
179
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
180
|
+
end
|
181
|
+
|
182
|
+
if @weight.nil?
|
183
|
+
invalid_properties.push('invalid value for "weight", weight cannot be nil.')
|
184
|
+
end
|
185
|
+
|
186
|
+
invalid_properties
|
187
|
+
end
|
188
|
+
|
189
|
+
# Check to see if the all the properties in the model are valid
|
190
|
+
# @return true if the model is valid
|
191
|
+
def valid?
|
192
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
193
|
+
return false if @created_at.nil?
|
194
|
+
return false if @id.nil?
|
195
|
+
return false if @score.nil?
|
196
|
+
return false if @updated_at.nil?
|
197
|
+
return false if @weight.nil?
|
198
|
+
true
|
199
|
+
end
|
200
|
+
|
201
|
+
# Checks equality by comparing each attribute.
|
202
|
+
# @param [Object] Object to be compared
|
203
|
+
def ==(o)
|
204
|
+
return true if self.equal?(o)
|
205
|
+
self.class == o.class &&
|
206
|
+
created_at == o.created_at &&
|
207
|
+
id == o.id &&
|
208
|
+
link == o.link &&
|
209
|
+
metadata == o.metadata &&
|
210
|
+
qdrant_point_id == o.qdrant_point_id &&
|
211
|
+
score == o.score &&
|
212
|
+
tag_set == o.tag_set &&
|
213
|
+
time_stamp == o.time_stamp &&
|
214
|
+
tracking_id == o.tracking_id &&
|
215
|
+
updated_at == o.updated_at &&
|
216
|
+
weight == o.weight
|
217
|
+
end
|
218
|
+
|
219
|
+
# @see the `==` method
|
220
|
+
# @param [Object] Object to be compared
|
221
|
+
def eql?(o)
|
222
|
+
self == o
|
223
|
+
end
|
224
|
+
|
225
|
+
# Calculates hash code according to all attributes.
|
226
|
+
# @return [Integer] Hash code
|
227
|
+
def hash
|
228
|
+
[created_at, id, link, metadata, qdrant_point_id, score, tag_set, time_stamp, tracking_id, updated_at, weight].hash
|
229
|
+
end
|
230
|
+
|
231
|
+
# Builds the object from hash
|
232
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
233
|
+
# @return [Object] Returns the model itself
|
234
|
+
def self.build_from_hash(attributes)
|
235
|
+
return nil unless attributes.is_a?(Hash)
|
236
|
+
attributes = attributes.transform_keys(&:to_sym)
|
237
|
+
transformed_hash = {}
|
238
|
+
openapi_types.each_pair do |key, type|
|
239
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
240
|
+
transformed_hash["#{key}"] = nil
|
241
|
+
elsif type =~ /\AArray<(.*)>/i
|
242
|
+
# check to ensure the input is an array given that the attribute
|
243
|
+
# is documented as an array but the input is not
|
244
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
245
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
246
|
+
end
|
247
|
+
elsif !attributes[attribute_map[key]].nil?
|
248
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
249
|
+
end
|
250
|
+
end
|
251
|
+
new(transformed_hash)
|
252
|
+
end
|
253
|
+
|
254
|
+
# Deserializes the data based on type
|
255
|
+
# @param string type Data type
|
256
|
+
# @param string value Value to be deserialized
|
257
|
+
# @return [Object] Deserialized data
|
258
|
+
def self._deserialize(type, value)
|
259
|
+
case type.to_sym
|
260
|
+
when :Time
|
261
|
+
Time.parse(value)
|
262
|
+
when :Date
|
263
|
+
Date.parse(value)
|
264
|
+
when :String
|
265
|
+
value.to_s
|
266
|
+
when :Integer
|
267
|
+
value.to_i
|
268
|
+
when :Float
|
269
|
+
value.to_f
|
270
|
+
when :Boolean
|
271
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
272
|
+
true
|
273
|
+
else
|
274
|
+
false
|
275
|
+
end
|
276
|
+
when :Object
|
277
|
+
# generic object (usually a Hash), return directly
|
278
|
+
value
|
279
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
280
|
+
inner_type = Regexp.last_match[:inner_type]
|
281
|
+
value.map { |v| _deserialize(inner_type, v) }
|
282
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
283
|
+
k_type = Regexp.last_match[:k_type]
|
284
|
+
v_type = Regexp.last_match[:v_type]
|
285
|
+
{}.tap do |hash|
|
286
|
+
value.each do |k, v|
|
287
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
else # model
|
291
|
+
# models (e.g. Pet) or oneOf
|
292
|
+
klass = TrieveRubyClient.const_get(type)
|
293
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
# Returns the string representation of the object
|
298
|
+
# @return [String] String presentation of the object
|
299
|
+
def to_s
|
300
|
+
to_hash.to_s
|
301
|
+
end
|
302
|
+
|
303
|
+
# to_body is an alias to to_hash (backward compatibility)
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
305
|
+
def to_body
|
306
|
+
to_hash
|
307
|
+
end
|
308
|
+
|
309
|
+
# Returns the object in the form of hash
|
310
|
+
# @return [Hash] Returns the object in the form of hash
|
311
|
+
def to_hash
|
312
|
+
hash = {}
|
313
|
+
self.class.attribute_map.each_pair do |attr, param|
|
314
|
+
value = self.send(attr)
|
315
|
+
if value.nil?
|
316
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
317
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
318
|
+
end
|
319
|
+
|
320
|
+
hash[param] = _to_hash(value)
|
321
|
+
end
|
322
|
+
hash
|
323
|
+
end
|
324
|
+
|
325
|
+
# Outputs non-array value in the form of hash
|
326
|
+
# For object, use to_hash. Otherwise, just return the value
|
327
|
+
# @param [Object] value Any valid value
|
328
|
+
# @return [Hash] Returns the value in the form of hash
|
329
|
+
def _to_hash(value)
|
330
|
+
if value.is_a?(Array)
|
331
|
+
value.compact.map { |v| _to_hash(v) }
|
332
|
+
elsif value.is_a?(Hash)
|
333
|
+
{}.tap do |hash|
|
334
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
335
|
+
end
|
336
|
+
elsif value.respond_to? :to_hash
|
337
|
+
value.to_hash
|
338
|
+
else
|
339
|
+
value
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
end
|
344
|
+
|
345
|
+
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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -18,6 +18,9 @@ module TrieveRubyClient
|
|
18
18
|
# HTML content of the chunk you want to update. This can also be plaintext. The innerText of the HTML will be used to create the embedding vector. The point of using HTML is for convienience, as some users have applications where users submit HTML content. If no chunk_html is provided, the existing chunk_html will be used.
|
19
19
|
attr_accessor :chunk_html
|
20
20
|
|
21
|
+
# Convert HTML to raw text before processing to avoid adding noise to the vector embeddings. By default this is true. If you are using HTML content that you want to be included in the vector embeddings, set this to false.
|
22
|
+
attr_accessor :convert_html_to_text
|
23
|
+
|
21
24
|
# Group ids are the ids of the groups that the chunk should be placed into. This is useful for when you want to update a chunk and add it to a group or multiple groups in one request.
|
22
25
|
attr_accessor :group_ids
|
23
26
|
|
@@ -43,6 +46,7 @@ module TrieveRubyClient
|
|
43
46
|
def self.attribute_map
|
44
47
|
{
|
45
48
|
:'chunk_html' => :'chunk_html',
|
49
|
+
:'convert_html_to_text' => :'convert_html_to_text',
|
46
50
|
:'group_ids' => :'group_ids',
|
47
51
|
:'group_tracking_ids' => :'group_tracking_ids',
|
48
52
|
:'link' => :'link',
|
@@ -62,6 +66,7 @@ module TrieveRubyClient
|
|
62
66
|
def self.openapi_types
|
63
67
|
{
|
64
68
|
:'chunk_html' => :'String',
|
69
|
+
:'convert_html_to_text' => :'Boolean',
|
65
70
|
:'group_ids' => :'Array<String>',
|
66
71
|
:'group_tracking_ids' => :'Array<String>',
|
67
72
|
:'link' => :'String',
|
@@ -76,6 +81,7 @@ module TrieveRubyClient
|
|
76
81
|
def self.openapi_nullable
|
77
82
|
Set.new([
|
78
83
|
:'chunk_html',
|
84
|
+
:'convert_html_to_text',
|
79
85
|
:'group_ids',
|
80
86
|
:'group_tracking_ids',
|
81
87
|
:'link',
|
@@ -104,6 +110,10 @@ module TrieveRubyClient
|
|
104
110
|
self.chunk_html = attributes[:'chunk_html']
|
105
111
|
end
|
106
112
|
|
113
|
+
if attributes.key?(:'convert_html_to_text')
|
114
|
+
self.convert_html_to_text = attributes[:'convert_html_to_text']
|
115
|
+
end
|
116
|
+
|
107
117
|
if attributes.key?(:'group_ids')
|
108
118
|
if (value = attributes[:'group_ids']).is_a?(Array)
|
109
119
|
self.group_ids = value
|
@@ -165,6 +175,7 @@ module TrieveRubyClient
|
|
165
175
|
return true if self.equal?(o)
|
166
176
|
self.class == o.class &&
|
167
177
|
chunk_html == o.chunk_html &&
|
178
|
+
convert_html_to_text == o.convert_html_to_text &&
|
168
179
|
group_ids == o.group_ids &&
|
169
180
|
group_tracking_ids == o.group_tracking_ids &&
|
170
181
|
link == o.link &&
|
@@ -183,7 +194,7 @@ module TrieveRubyClient
|
|
183
194
|
# Calculates hash code according to all attributes.
|
184
195
|
# @return [Integer] Hash code
|
185
196
|
def hash
|
186
|
-
[chunk_html, group_ids, group_tracking_ids, link, metadata, time_stamp, tracking_id, weight].hash
|
197
|
+
[chunk_html, convert_html_to_text, group_ids, group_tracking_ids, link, metadata, time_stamp, tracking_id, weight].hash
|
187
198
|
end
|
188
199
|
|
189
200
|
# 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.
|
6
|
+
The version of the OpenAPI document: 0.6.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -21,6 +21,9 @@ module TrieveRubyClient
|
|
21
21
|
# Id of the chunk you want to update. You can provide either the chunk_id or the tracking_id. If both are provided, the chunk_id will be used.
|
22
22
|
attr_accessor :chunk_id
|
23
23
|
|
24
|
+
# Convert HTML to raw text before processing to avoid adding noise to the vector embeddings. By default this is true. If you are using HTML content that you want to be included in the vector embeddings, set this to false.
|
25
|
+
attr_accessor :convert_html_to_text
|
26
|
+
|
24
27
|
# Group ids are the ids of the groups that the chunk should be placed into. This is useful for when you want to update a chunk and add it to a group or multiple groups in one request.
|
25
28
|
attr_accessor :group_ids
|
26
29
|
|
@@ -50,6 +53,7 @@ module TrieveRubyClient
|
|
50
53
|
{
|
51
54
|
:'chunk_html' => :'chunk_html',
|
52
55
|
:'chunk_id' => :'chunk_id',
|
56
|
+
:'convert_html_to_text' => :'convert_html_to_text',
|
53
57
|
:'group_ids' => :'group_ids',
|
54
58
|
:'group_tracking_ids' => :'group_tracking_ids',
|
55
59
|
:'link' => :'link',
|
@@ -71,6 +75,7 @@ module TrieveRubyClient
|
|
71
75
|
{
|
72
76
|
:'chunk_html' => :'String',
|
73
77
|
:'chunk_id' => :'String',
|
78
|
+
:'convert_html_to_text' => :'Boolean',
|
74
79
|
:'group_ids' => :'Array<String>',
|
75
80
|
:'group_tracking_ids' => :'Array<String>',
|
76
81
|
:'link' => :'String',
|
@@ -87,6 +92,7 @@ module TrieveRubyClient
|
|
87
92
|
Set.new([
|
88
93
|
:'chunk_html',
|
89
94
|
:'chunk_id',
|
95
|
+
:'convert_html_to_text',
|
90
96
|
:'group_ids',
|
91
97
|
:'group_tracking_ids',
|
92
98
|
:'link',
|
@@ -121,6 +127,10 @@ module TrieveRubyClient
|
|
121
127
|
self.chunk_id = attributes[:'chunk_id']
|
122
128
|
end
|
123
129
|
|
130
|
+
if attributes.key?(:'convert_html_to_text')
|
131
|
+
self.convert_html_to_text = attributes[:'convert_html_to_text']
|
132
|
+
end
|
133
|
+
|
124
134
|
if attributes.key?(:'group_ids')
|
125
135
|
if (value = attributes[:'group_ids']).is_a?(Array)
|
126
136
|
self.group_ids = value
|
@@ -182,6 +192,7 @@ module TrieveRubyClient
|
|
182
192
|
self.class == o.class &&
|
183
193
|
chunk_html == o.chunk_html &&
|
184
194
|
chunk_id == o.chunk_id &&
|
195
|
+
convert_html_to_text == o.convert_html_to_text &&
|
185
196
|
group_ids == o.group_ids &&
|
186
197
|
group_tracking_ids == o.group_tracking_ids &&
|
187
198
|
link == o.link &&
|
@@ -201,7 +212,7 @@ module TrieveRubyClient
|
|
201
212
|
# Calculates hash code according to all attributes.
|
202
213
|
# @return [Integer] Hash code
|
203
214
|
def hash
|
204
|
-
[chunk_html, chunk_id, group_ids, group_tracking_ids, link, metadata, tag_set, time_stamp, tracking_id, weight].hash
|
215
|
+
[chunk_html, chunk_id, convert_html_to_text, group_ids, group_tracking_ids, link, metadata, tag_set, time_stamp, tracking_id, weight].hash
|
205
216
|
end
|
206
217
|
|
207
218
|
# 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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.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.
|
6
|
+
The version of the OpenAPI document: 0.6.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|