venice_client 1.0.10 → 1.0.11
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 341b01002920ec031d4591524f824de29e5ea2f491add43537bf80330dbdec9e
|
|
4
|
+
data.tar.gz: ec7da27db6e32c602b0423be62a6821369e6debc4f6ebdedb9ded12e7cb0db38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f35bec7031e62105dbb9ece0159cf3abc42c459ad3e3a7bdd467b704ecf2185f98252df0e21f341b1201493fa83acbf050dbc402f5a59727625e32f1a8151e53
|
|
7
|
+
data.tar.gz: 62c8fd6900949af4e380de085dd4f1d2a0acadc941c0d8c4d8511e5c7e843e9c418c99ce321dbf91c361ca7fc375cc2b9647255a1169fb107f277416fe83ba8e
|
data/Gemfile.lock
CHANGED
|
@@ -98,12 +98,12 @@ module VeniceClient
|
|
|
98
98
|
|
|
99
99
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
100
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
101
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
#attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
|
+
# if (!acceptable_attribute_map.key?(k.to_sym))
|
|
103
|
+
# fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::AssistantMessage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
104
|
+
# end
|
|
105
|
+
# h[k.to_sym] = v
|
|
106
|
+
# }
|
|
107
107
|
|
|
108
108
|
if attributes.key?(:'content')
|
|
109
109
|
self.content = attributes[:'content']
|
|
@@ -36,8 +36,6 @@ module VeniceClient
|
|
|
36
36
|
|
|
37
37
|
attr_accessor :venice_parameters
|
|
38
38
|
|
|
39
|
-
attr_accessor :additional_properties
|
|
40
|
-
|
|
41
39
|
class EnumAttributeValidator
|
|
42
40
|
attr_reader :datatype
|
|
43
41
|
attr_reader :allowable_values
|
|
@@ -112,18 +110,14 @@ module VeniceClient
|
|
|
112
110
|
fail ArgumentError, "The input argument (attributes) must be a hash in `VeniceClient::CreateChatCompletion200Response` initialize method"
|
|
113
111
|
end
|
|
114
112
|
|
|
115
|
-
@additional_properties = {}
|
|
116
113
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
117
114
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
new_attributes[k.to_sym] = v
|
|
122
|
-
else
|
|
123
|
-
@additional_properties[k.to_sym] = v
|
|
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
|
|
124
118
|
end
|
|
125
|
-
|
|
126
|
-
|
|
119
|
+
h[k.to_sym] = v
|
|
120
|
+
}
|
|
127
121
|
|
|
128
122
|
if attributes.key?(:'choices')
|
|
129
123
|
if (value = attributes[:'choices']).is_a?(Array)
|
|
@@ -293,8 +287,7 @@ module VeniceClient
|
|
|
293
287
|
object == o.object &&
|
|
294
288
|
prompt_logprobs == o.prompt_logprobs &&
|
|
295
289
|
usage == o.usage &&
|
|
296
|
-
venice_parameters == o.venice_parameters
|
|
297
|
-
additional_properties == o.additional_properties
|
|
290
|
+
venice_parameters == o.venice_parameters
|
|
298
291
|
end
|
|
299
292
|
|
|
300
293
|
# @see the `==` method
|
|
@@ -306,7 +299,7 @@ module VeniceClient
|
|
|
306
299
|
# Calculates hash code according to all attributes.
|
|
307
300
|
# @return [Integer] Hash code
|
|
308
301
|
def hash
|
|
309
|
-
[choices, created, id, model, object, prompt_logprobs, usage, venice_parameters
|
|
302
|
+
[choices, created, id, model, object, prompt_logprobs, usage, venice_parameters].hash
|
|
310
303
|
end
|
|
311
304
|
|
|
312
305
|
# Builds the object from hash
|
|
@@ -357,10 +350,10 @@ module VeniceClient
|
|
|
357
350
|
when :Object
|
|
358
351
|
# generic object (usually a Hash), return directly
|
|
359
352
|
value
|
|
360
|
-
when /\AArray<(?<inner_type>.+)
|
|
353
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
361
354
|
inner_type = Regexp.last_match[:inner_type]
|
|
362
355
|
value.map { |v| _deserialize(inner_type, v) }
|
|
363
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)
|
|
356
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
364
357
|
k_type = Regexp.last_match[:k_type]
|
|
365
358
|
v_type = Regexp.last_match[:v_type]
|
|
366
359
|
{}.tap do |hash|
|
|
@@ -400,7 +393,7 @@ module VeniceClient
|
|
|
400
393
|
|
|
401
394
|
hash[param] = _to_hash(value)
|
|
402
395
|
end
|
|
403
|
-
hash.merge!(@additional_properties
|
|
396
|
+
hash.merge!(@additional_properties)
|
|
404
397
|
hash
|
|
405
398
|
end
|
|
406
399
|
|
|
@@ -424,4 +417,4 @@ module VeniceClient
|
|
|
424
417
|
|
|
425
418
|
end
|
|
426
419
|
|
|
427
|
-
end
|
|
420
|
+
end
|