rasti-ai 1.0.0 → 1.0.1
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/lib/rasti/ai/open_ai/client.rb +4 -2
- data/lib/rasti/ai/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9410e72e90cbc69453db4573c4ea4f611719feafc816c389f0490fe003f5f7ee
|
4
|
+
data.tar.gz: 3e5776057dd26b4adf2a138d94511a79a88fa55418ca0b2c834aeb62ada9d70f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 889f7e24c2438cba3e7f434e6d1578c734a0bbc6b2ef867da7ee8a74a69d6b6451c4c20da3bc34944f4b2113d679991fb3aa40f761e285266ad6d3cb4a0881ae
|
7
|
+
data.tar.gz: ddafe4e189697dfcc5980da19bb9339387867f1ceacab79fa4f74aba50ebf84d92754863c066e2db86586d7dd637075ce7fd36ced4ea948ca59c67b09f88aba7
|
@@ -10,7 +10,7 @@ module Rasti
|
|
10
10
|
@logger = logger || Rasti::AI.logger
|
11
11
|
end
|
12
12
|
|
13
|
-
def chat_completions(messages:, model:nil, tools:[])
|
13
|
+
def chat_completions(messages:, model:nil, tools:[], response_format: nil)
|
14
14
|
body = {
|
15
15
|
model: model || Rasti::AI.openai_default_model,
|
16
16
|
messages: messages,
|
@@ -18,6 +18,8 @@ module Rasti
|
|
18
18
|
tool_choice: tools.empty? ? 'none' : 'auto'
|
19
19
|
}
|
20
20
|
|
21
|
+
body[:response_format] = response_format unless response_format.nil?
|
22
|
+
|
21
23
|
post '/chat/completions', body
|
22
24
|
end
|
23
25
|
|
@@ -54,4 +56,4 @@ module Rasti
|
|
54
56
|
end
|
55
57
|
|
56
58
|
end
|
57
|
-
end
|
59
|
+
end
|
data/lib/rasti/ai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rasti-ai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Naiman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_require
|
@@ -210,7 +210,7 @@ homepage: https://github.com/gabynaiman/rasti-ai
|
|
210
210
|
licenses:
|
211
211
|
- MIT
|
212
212
|
metadata: {}
|
213
|
-
post_install_message:
|
213
|
+
post_install_message:
|
214
214
|
rdoc_options: []
|
215
215
|
require_paths:
|
216
216
|
- lib
|
@@ -225,8 +225,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
225
|
- !ruby/object:Gem::Version
|
226
226
|
version: '0'
|
227
227
|
requirements: []
|
228
|
-
rubygems_version: 3.
|
229
|
-
signing_key:
|
228
|
+
rubygems_version: 3.0.9
|
229
|
+
signing_key:
|
230
230
|
specification_version: 4
|
231
231
|
summary: AI for apps
|
232
232
|
test_files:
|