trieve_ruby_client 0.7.2 → 0.7.6

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.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -6
  3. data/docs/ChunkApi.md +158 -10
  4. data/docs/ChunkData.md +2 -0
  5. data/docs/ChunkMetadata.md +2 -0
  6. data/docs/CreateMessageData.md +0 -2
  7. data/docs/CreateTopicData.md +0 -2
  8. data/docs/EditMessageData.md +0 -2
  9. data/docs/FieldCondition.md +6 -0
  10. data/docs/GenerateChunksRequest.md +0 -2
  11. data/docs/GeoInfo.md +20 -0
  12. data/docs/GeoTypes.md +49 -0
  13. data/docs/GetChunksData.md +18 -0
  14. data/docs/GetTrackingChunksData.md +18 -0
  15. data/docs/LocationBoundingBox.md +20 -0
  16. data/docs/LocationPolygon.md +20 -0
  17. data/docs/LocationRadius.md +20 -0
  18. data/docs/RangeCondition.md +2 -0
  19. data/docs/RegenerateMessageData.md +0 -2
  20. data/docs/SlimChunkMetadata.md +4 -0
  21. data/docs/UpdateChunkData.md +2 -0
  22. data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
  23. data/lib/trieve_ruby_client/api/chunk_api.rb +161 -11
  24. data/lib/trieve_ruby_client/api/chunk_group_api.rb +1 -1
  25. data/lib/trieve_ruby_client/api/dataset_api.rb +1 -1
  26. data/lib/trieve_ruby_client/api/events_api.rb +1 -1
  27. data/lib/trieve_ruby_client/api/file_api.rb +1 -1
  28. data/lib/trieve_ruby_client/api/health_api.rb +1 -1
  29. data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
  30. data/lib/trieve_ruby_client/api/message_api.rb +1 -1
  31. data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
  32. data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
  33. data/lib/trieve_ruby_client/api/topic_api.rb +1 -1
  34. data/lib/trieve_ruby_client/api/user_api.rb +1 -1
  35. data/lib/trieve_ruby_client/api_client.rb +1 -1
  36. data/lib/trieve_ruby_client/api_error.rb +1 -1
  37. data/lib/trieve_ruby_client/configuration.rb +1 -1
  38. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  39. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  40. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  41. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  42. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  43. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  44. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  45. data/lib/trieve_ruby_client/models/chunk_data.rb +12 -2
  46. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  47. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  48. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  49. data/lib/trieve_ruby_client/models/chunk_metadata.rb +12 -2
  50. data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +1 -1
  51. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
  52. data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
  53. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  54. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  55. data/lib/trieve_ruby_client/models/create_message_data.rb +2 -13
  56. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  57. data/lib/trieve_ruby_client/models/create_topic_data.rb +2 -13
  58. data/lib/trieve_ruby_client/models/dataset.rb +1 -1
  59. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  60. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  61. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  62. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  63. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  64. data/lib/trieve_ruby_client/models/edit_message_data.rb +2 -13
  65. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  66. data/lib/trieve_ruby_client/models/event.rb +1 -1
  67. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  68. data/lib/trieve_ruby_client/models/field_condition.rb +32 -2
  69. data/lib/trieve_ruby_client/models/file.rb +1 -1
  70. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  71. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +2 -13
  72. data/lib/trieve_ruby_client/models/geo_info.rb +237 -0
  73. data/lib/trieve_ruby_client/models/geo_types.rb +105 -0
  74. data/lib/trieve_ruby_client/models/get_chunks_data.rb +223 -0
  75. data/lib/trieve_ruby_client/models/get_events_data.rb +1 -1
  76. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  77. data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +223 -0
  78. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  79. data/lib/trieve_ruby_client/models/group_score_chunk.rb +1 -1
  80. data/lib/trieve_ruby_client/models/group_score_slim_chunks.rb +1 -1
  81. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  82. data/lib/trieve_ruby_client/models/location_bounding_box.rb +237 -0
  83. data/lib/trieve_ruby_client/models/location_polygon.rb +235 -0
  84. data/lib/trieve_ruby_client/models/location_radius.rb +237 -0
  85. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  86. data/lib/trieve_ruby_client/models/message.rb +1 -1
  87. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  88. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  89. data/lib/trieve_ruby_client/models/range.rb +1 -1
  90. data/lib/trieve_ruby_client/models/range_condition.rb +2 -1
  91. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
  92. data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +1 -1
  93. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +2 -13
  94. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  95. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  96. data/lib/trieve_ruby_client/models/score_slim_chunks.rb +1 -1
  97. data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
  98. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  99. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
  100. data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
  101. data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +1 -1
  102. data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +1 -1
  103. data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
  104. data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
  105. data/lib/trieve_ruby_client/models/search_within_group_slim_results.rb +1 -1
  106. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  107. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  108. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  109. data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +28 -2
  110. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
  111. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  112. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  113. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  114. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  115. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  116. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  117. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  118. data/lib/trieve_ruby_client/models/update_chunk_data.rb +12 -2
  119. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  120. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  121. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  122. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  123. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  124. data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +1 -1
  125. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  126. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  127. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  128. data/lib/trieve_ruby_client/version.rb +2 -2
  129. data/lib/trieve_ruby_client.rb +8 -1
  130. data/openapi-generator.yaml +1 -1
  131. data/openapi.json +322 -28
  132. data/spec/models/geo_info_spec.rb +42 -0
  133. data/spec/models/geo_types_spec.rb +32 -0
  134. data/spec/models/get_chunks_data_spec.rb +36 -0
  135. data/spec/models/get_tracking_chunks_data_spec.rb +36 -0
  136. data/spec/models/location_bounding_box_spec.rb +42 -0
  137. data/spec/models/location_polygon_spec.rb +42 -0
  138. data/spec/models/location_radius_spec.rb +42 -0
  139. data/spec/spec_helper.rb +1 -1
  140. data/trieve_ruby_client-0.7.2.gem +0 -0
  141. data/trieve_ruby_client.gemspec +1 -1
  142. metadata +31 -2
@@ -0,0 +1,235 @@
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.7.6
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 LocationPolygon
18
+ attr_accessor :exterior
19
+
20
+ attr_accessor :interior
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'exterior' => :'exterior',
26
+ :'interior' => :'interior'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'exterior' => :'Array<GeoInfo>',
39
+ :'interior' => :'Array<Array<GeoInfo>>'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ :'interior'
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::LocationPolygon` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::LocationPolygon`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'exterior')
66
+ if (value = attributes[:'exterior']).is_a?(Array)
67
+ self.exterior = value
68
+ end
69
+ else
70
+ self.exterior = nil
71
+ end
72
+
73
+ if attributes.key?(:'interior')
74
+ if (value = attributes[:'interior']).is_a?(Array)
75
+ self.interior = value
76
+ end
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 @exterior.nil?
86
+ invalid_properties.push('invalid value for "exterior", exterior cannot be nil.')
87
+ end
88
+
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ warn '[DEPRECATED] the `valid?` method is obsolete'
96
+ return false if @exterior.nil?
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ exterior == o.exterior &&
106
+ interior == o.interior
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Integer] Hash code
117
+ def hash
118
+ [exterior, interior].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def self.build_from_hash(attributes)
125
+ return nil unless attributes.is_a?(Hash)
126
+ attributes = attributes.transform_keys(&:to_sym)
127
+ transformed_hash = {}
128
+ openapi_types.each_pair do |key, type|
129
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
130
+ transformed_hash["#{key}"] = nil
131
+ elsif type =~ /\AArray<(.*)>/i
132
+ # check to ensure the input is an array given that the attribute
133
+ # is documented as an array but the input is not
134
+ if attributes[attribute_map[key]].is_a?(Array)
135
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
+ end
137
+ elsif !attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
139
+ end
140
+ end
141
+ new(transformed_hash)
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def self._deserialize(type, value)
149
+ case type.to_sym
150
+ when :Time
151
+ Time.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :Boolean
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ # models (e.g. Pet) or oneOf
182
+ klass = TrieveRubyClient.const_get(type)
183
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
184
+ end
185
+ end
186
+
187
+ # Returns the string representation of the object
188
+ # @return [String] String presentation of the object
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_hash (backward compatibility)
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_body
196
+ to_hash
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ if value.nil?
206
+ is_nullable = self.class.openapi_nullable.include?(attr)
207
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
+ end
209
+
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+
235
+ end
@@ -0,0 +1,237 @@
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.7.6
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 LocationRadius
18
+ attr_accessor :center
19
+
20
+ attr_accessor :radius
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'center' => :'center',
26
+ :'radius' => :'radius'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'center' => :'GeoInfo',
39
+ :'radius' => :'Float'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::LocationRadius` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::LocationRadius`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'center')
65
+ self.center = attributes[:'center']
66
+ else
67
+ self.center = nil
68
+ end
69
+
70
+ if attributes.key?(:'radius')
71
+ self.radius = attributes[:'radius']
72
+ else
73
+ self.radius = nil
74
+ end
75
+ end
76
+
77
+ # Show invalid properties with the reasons. Usually used together with valid?
78
+ # @return Array for valid properties with the reasons
79
+ def list_invalid_properties
80
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
+ invalid_properties = Array.new
82
+ if @center.nil?
83
+ invalid_properties.push('invalid value for "center", center cannot be nil.')
84
+ end
85
+
86
+ if @radius.nil?
87
+ invalid_properties.push('invalid value for "radius", radius cannot be nil.')
88
+ end
89
+
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ warn '[DEPRECATED] the `valid?` method is obsolete'
97
+ return false if @center.nil?
98
+ return false if @radius.nil?
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ center == o.center &&
108
+ radius == o.radius
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [center, radius].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def self._deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = TrieveRubyClient.const_get(type)
185
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ 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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -20,6 +20,7 @@ module TrieveRubyClient
20
20
  def openapi_one_of
21
21
  [
22
22
  :'Float',
23
+ :'Integer',
23
24
  :'String'
24
25
  ]
25
26
  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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -21,9 +21,6 @@ module TrieveRubyClient
21
21
  # The delimiters to use for highlighting the citations. If this is not included, the default delimiters will be used. Default is `[\".\", \"!\", \"?\", \"\\n\", \"\\t\", \",\"]`.
22
22
  attr_accessor :highlight_delimiters
23
23
 
24
- # The model to use for the assistant generative inferences. This can be any model from the openrouter model list. If no model is provided, the gpt-3.5-turbo will be used.~
25
- attr_accessor :model
26
-
27
24
  # Whether or not to stream the response. If this is set to true or not included, the response will be a stream. If this is set to false, the response will be a normal JSON response. Default is true.
28
25
  attr_accessor :stream_response
29
26
 
@@ -35,7 +32,6 @@ module TrieveRubyClient
35
32
  {
36
33
  :'highlight_citations' => :'highlight_citations',
37
34
  :'highlight_delimiters' => :'highlight_delimiters',
38
- :'model' => :'model',
39
35
  :'stream_response' => :'stream_response',
40
36
  :'topic_id' => :'topic_id'
41
37
  }
@@ -51,7 +47,6 @@ module TrieveRubyClient
51
47
  {
52
48
  :'highlight_citations' => :'Boolean',
53
49
  :'highlight_delimiters' => :'Array<String>',
54
- :'model' => :'String',
55
50
  :'stream_response' => :'Boolean',
56
51
  :'topic_id' => :'String'
57
52
  }
@@ -62,7 +57,6 @@ module TrieveRubyClient
62
57
  Set.new([
63
58
  :'highlight_citations',
64
59
  :'highlight_delimiters',
65
- :'model',
66
60
  :'stream_response',
67
61
  ])
68
62
  end
@@ -92,10 +86,6 @@ module TrieveRubyClient
92
86
  end
93
87
  end
94
88
 
95
- if attributes.key?(:'model')
96
- self.model = attributes[:'model']
97
- end
98
-
99
89
  if attributes.key?(:'stream_response')
100
90
  self.stream_response = attributes[:'stream_response']
101
91
  end
@@ -134,7 +124,6 @@ module TrieveRubyClient
134
124
  self.class == o.class &&
135
125
  highlight_citations == o.highlight_citations &&
136
126
  highlight_delimiters == o.highlight_delimiters &&
137
- model == o.model &&
138
127
  stream_response == o.stream_response &&
139
128
  topic_id == o.topic_id
140
129
  end
@@ -148,7 +137,7 @@ module TrieveRubyClient
148
137
  # Calculates hash code according to all attributes.
149
138
  # @return [Integer] Hash code
150
139
  def hash
151
- [highlight_citations, highlight_delimiters, model, stream_response, topic_id].hash
140
+ [highlight_citations, highlight_delimiters, stream_response, topic_id].hash
152
141
  end
153
142
 
154
143
  # 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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
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.7.2
6
+ The version of the OpenAPI document: 0.7.6
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0