venice_client 1.0.9 → 1.0.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c74ceec1cc8ab9ad00174e37ec75bbf14f8ff771989652f485d3fe8451464781
4
- data.tar.gz: fbf3d9078463a0397d47b64e5bf6ea7665c9371f40a892f85817160f548d57f4
3
+ metadata.gz: d8fbc8be533e1ba20843526813cc73eef17e56efae4c830028d89a2eb1ceaacb
4
+ data.tar.gz: 2764d27f214635647c6e1d23f201c543211e2847e736c9a46e51be36629558da
5
5
  SHA512:
6
- metadata.gz: a96e5816b7872a78295775cd8df00088706f9a018b286b95aebb6308bf170ef1eb1c2abc8b280254c8a5f4f91f7df9751f5670ef7195f3b4a387b77182cf9d9b
7
- data.tar.gz: 3534e7657b57fe54b522c67ae592b9af65cf2566d1e12f8e2a1d6a7d115321ebefe6b7c7ed2dc993f2f3221993b023b2c651258527cd703d02627139343669c9
6
+ metadata.gz: 21644af74fe3dc42a4c434b46fe418f4422188cbc2a106225f9e6b785ffb56bff5136d4de5147b90b2bbd76eb2440d28ed852a66fabf302f9fb40c465455651d
7
+ data.tar.gz: 9d888a66857d717bd9c9c5efcee8ec3f06d28bd159535393547c35123da150cd9219aaf59888a327d63bbdac2a02f971897f807663f1479620614237afb3b045
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- venice_client (1.0.9)
4
+ venice_client (1.0.10)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -36,6 +36,8 @@ module VeniceClient
36
36
 
37
37
  attr_accessor :venice_parameters
38
38
 
39
+ attr_accessor :additional_properties
40
+
39
41
  class EnumAttributeValidator
40
42
  attr_reader :datatype
41
43
  attr_reader :allowable_values
@@ -110,14 +112,18 @@ module VeniceClient
110
112
  fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::CreateChatCompletion200Response` initialize method"
111
113
  end
112
114
 
115
+ @additional_properties = {}
113
116
  # check to see if the attribute exists and convert string to symbol for hash key
114
117
  acceptable_attribute_map = self.class.acceptable_attribute_map
115
- attributes = attributes.each_with_object({}) { |(k, v), h|
116
- if (!acceptable_attribute_map.key?(k.to_sym))
117
- fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::CreateChatCompletion200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
118
+ new_attributes = {}
119
+ attributes.each do |k, v|
120
+ if (acceptable_attribute_map.key?(k.to_sym))
121
+ new_attributes[k.to_sym] = v
122
+ else
123
+ @additional_properties[k.to_sym] = v
118
124
  end
119
- h[k.to_sym] = v
120
- }
125
+ end
126
+ attributes = new_attributes
121
127
 
122
128
  if attributes.key?(:'choices')
123
129
  if (value = attributes[:'choices']).is_a?(Array)
@@ -287,7 +293,8 @@ module VeniceClient
287
293
  object == o.object &&
288
294
  prompt_logprobs == o.prompt_logprobs &&
289
295
  usage == o.usage &&
290
- venice_parameters == o.venice_parameters
296
+ venice_parameters == o.venice_parameters &&
297
+ additional_properties == o.additional_properties
291
298
  end
292
299
 
293
300
  # @see the `==` method
@@ -299,7 +306,7 @@ module VeniceClient
299
306
  # Calculates hash code according to all attributes.
300
307
  # @return [Integer] Hash code
301
308
  def hash
302
- [choices, created, id, model, object, prompt_logprobs, usage, venice_parameters].hash
309
+ [choices, created, id, model, object, prompt_logprobs, usage, venice_parameters, additional_properties].hash
303
310
  end
304
311
 
305
312
  # Builds the object from hash
@@ -350,10 +357,10 @@ module VeniceClient
350
357
  when :Object
351
358
  # generic object (usually a Hash), return directly
352
359
  value
353
- when /\AArray<(?<inner_type>.+)>\z/
360
+ when /\AArray<(?<inner_type>.+)>/i
354
361
  inner_type = Regexp.last_match[:inner_type]
355
362
  value.map { |v| _deserialize(inner_type, v) }
356
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
363
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>/i
357
364
  k_type = Regexp.last_match[:k_type]
358
365
  v_type = Regexp.last_match[:v_type]
359
366
  {}.tap do |hash|
@@ -393,7 +400,7 @@ module VeniceClient
393
400
 
394
401
  hash[param] = _to_hash(value)
395
402
  end
396
- hash.merge!(@additional_properties)
403
+ hash.merge!(@additional_properties || {})
397
404
  hash
398
405
  end
399
406
 
@@ -417,4 +424,4 @@ module VeniceClient
417
424
 
418
425
  end
419
426
 
420
- end
427
+ end
@@ -11,5 +11,5 @@ Generator version: 7.14.0
11
11
  =end
12
12
 
13
13
  module VeniceClient
14
- VERSION = '1.0.9'
14
+ VERSION = '1.0.10'
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: venice_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator