venice_client 1.0.12 → 1.0.13
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/Gemfile.lock +1 -1
- data/lib/venice_client/models/assistant_message.rb +3 -3
- data/lib/venice_client/models/create_chat_completion200_response.rb +18 -11
- data/lib/venice_client/models/create_chat_completion200_response_choices_inner.rb +3 -3
- data/lib/venice_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1fea21274a651104fc6d5d5668445eb9d70d11e825add0111ebf79b76d333264
|
|
4
|
+
data.tar.gz: 126a55a6407d45e9c1dbd59c9b9ef2597698a3ae3f26f3a6f80fa0bdf25d483e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7fd52103906809b44a7048acb0525d078031e1c2df2af08684d8593cbd93a53f2980ffd9356690c51479a4b9580210fabb61b93e913f21d308097668cabc59a5
|
|
7
|
+
data.tar.gz: 74c940b775de6d19d4423b5fa829c91b5ef5b204e0481b0fd940437bdd50bbf423e0a5de553519ab29210b14f4a2e8178a58604cc32780d592676ed21c6c9435
|
data/Gemfile.lock
CHANGED
|
@@ -99,9 +99,9 @@ module VeniceClient
|
|
|
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
101
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
105
|
h[k.to_sym] = v
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
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>.+)
|
|
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>.+)
|
|
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
|
|
@@ -100,9 +100,9 @@ module VeniceClient
|
|
|
100
100
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
101
101
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
102
102
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VeniceClient::CreateChatCompletion200ResponseChoicesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
105
|
+
end
|
|
106
106
|
h[k.to_sym] = v
|
|
107
107
|
}
|
|
108
108
|
|