venice_client 1.0.13 → 1.0.15
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/chat_completion_request_messages_inner.rb +1 -1
- data/lib/venice_client/models/create_chat_completion200_response_choices_inner.rb +3 -3
- data/lib/venice_client/version.rb +1 -1
- data/spec/api/chat_api_spec.rb +20 -2
- 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: 680ff3b155c8d8a3632ab0743be5c6ed989dbba80a92abe674993db2f54fe6a5
|
|
4
|
+
data.tar.gz: 56290703b36039cd8e9febb942f1da4353e04e367d0f789ac8d15ed43ab5e7ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b7288e4dc13e12f490164121c1ebc25ac578298777bdf5d941a9923bc7d8b6b471b0c63ce73e34ea38687e6aa057b45b4856e5068dd4ad22c84a186a1a5691e
|
|
7
|
+
data.tar.gz: f8337a1f980f9d3de3a4d40a51592541302bdcb33fb1e364fdc1aab78483a17caacd531ea6589bc9f85ce730615e461acd450970d15ea0d91fd8f669fbe64346
|
data/Gemfile.lock
CHANGED
|
@@ -89,7 +89,7 @@ module VeniceClient
|
|
|
89
89
|
return model if model
|
|
90
90
|
else
|
|
91
91
|
# raise if data contains keys that are not known to the model
|
|
92
|
-
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
92
|
+
# raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
93
93
|
model = const.build_from_hash(data)
|
|
94
94
|
return model if model
|
|
95
95
|
end
|
|
@@ -192,9 +192,9 @@ module VeniceClient
|
|
|
192
192
|
# Custom attribute writer method with validation
|
|
193
193
|
# @param [Object] message Value to be assigned
|
|
194
194
|
def message=(message)
|
|
195
|
-
if message.nil?
|
|
196
|
-
|
|
197
|
-
end
|
|
195
|
+
# if message.nil?
|
|
196
|
+
# fail ArgumentError, 'message cannot be nil'
|
|
197
|
+
# end
|
|
198
198
|
|
|
199
199
|
@message = message
|
|
200
200
|
end
|
data/spec/api/chat_api_spec.rb
CHANGED
|
@@ -40,8 +40,26 @@ describe 'ChatApi' do
|
|
|
40
40
|
# @option opts [ChatCompletionRequest] :chat_completion_request
|
|
41
41
|
# @return [CreateChatCompletion200Response]
|
|
42
42
|
describe 'create_chat_completion test' do
|
|
43
|
-
it 'should work' do
|
|
44
|
-
#
|
|
43
|
+
it 'should work with venice-uncensored model' do
|
|
44
|
+
# Create a user message
|
|
45
|
+
user_message = VeniceClient::UserMessage.new(
|
|
46
|
+
role: 'user',
|
|
47
|
+
content: 'Hello, world!'
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
# Create the chat completion request
|
|
51
|
+
chat_completion_request = VeniceClient::ChatCompletionRequest.new(
|
|
52
|
+
model: 'venice-uncensored',
|
|
53
|
+
messages: [user_message],
|
|
54
|
+
parallel_tool_calls: false
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
# Make the API call
|
|
58
|
+
result = @api_instance.create_chat_completion(chat_completion_request: chat_completion_request)
|
|
59
|
+
|
|
60
|
+
# Add assertions
|
|
61
|
+
expect(result).to be_instance_of(VeniceClient::CreateChatCompletion200Response)
|
|
62
|
+
expect(result.choices).not_to be_empty
|
|
45
63
|
end
|
|
46
64
|
end
|
|
47
65
|
|