omniai 1.9.3 → 1.9.5
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 +1 -1
- data/README.md +14 -0
- data/lib/omniai/chat/stream.rb +2 -2
- data/lib/omniai/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c57a422d4d3213f3d952940908890c4da086668972a6596f4ce69530af1bf547
|
4
|
+
data.tar.gz: a66bb5326ce64219cc58ab1f072ef40741ae03a83aecd86d96a6417767911c5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 832c57105c19df9bf3675a1050cae1bdb775cd117a4222b81ee7032abf5356007fa04f7282017585da7563855d0e6ddc55aa8f330a9dfdceb22b0b9f632c2f96
|
7
|
+
data.tar.gz: d202c4bc08eaefa7b5ec08c3192c0fa08f6938fbd3feade8018d65c4a46cb56d078194b072b2b483388c6fca736fa334e3f717fb14d607123425ce250f969488
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
OmniAI standardizes the APIs of various AI / LLM companies such as Anthropic, Google, Mistral and OpenAI for the generation of text, the conversion of text-to-speech, the conversion of speech-to-text, the generation of embeddings, and more. It offers a unified API regardless of the provider and task.
|
10
10
|
|
11
11
|
- [OmniAI::Anthropic](https://github.com/ksylvest/omniai-anthropic)
|
12
|
+
- [OmniAI::DeepSeek](https://github.com/ksylvest/omniai-deepseek)
|
12
13
|
- [OmniAI::Google](https://github.com/ksylvest/omniai-google)
|
13
14
|
- [OmniAI::Mistral](https://github.com/ksylvest/omniai-mistral)
|
14
15
|
- [OmniAI::OpenAI](https://github.com/ksylvest/omniai-openai)
|
@@ -167,12 +168,17 @@ search('Who do you call to fix a toilet?')
|
|
167
168
|
|
168
169
|
## Installation
|
169
170
|
|
171
|
+
The main `omniai` gem is installed with:
|
172
|
+
|
170
173
|
```sh
|
171
174
|
gem install omniai
|
172
175
|
```
|
173
176
|
|
177
|
+
Specific provider gems are installed with:
|
178
|
+
|
174
179
|
```sh
|
175
180
|
gem install omniai-anthropic
|
181
|
+
gem install omniai-deepseek
|
176
182
|
gem install omniai-mistral
|
177
183
|
gem install omniai-google
|
178
184
|
gem install omniai-openai
|
@@ -192,6 +198,14 @@ require 'omniai/anthropic'
|
|
192
198
|
client = OmniAI::Anthropic::Client.new
|
193
199
|
```
|
194
200
|
|
201
|
+
#### [OmniAI::DeepSeek](https://github.com/ksylvest/omniai-deepseek)
|
202
|
+
|
203
|
+
```ruby
|
204
|
+
require 'omniai/deepseek'
|
205
|
+
|
206
|
+
client = OmniAI::DeepSeek::Client.new
|
207
|
+
```
|
208
|
+
|
195
209
|
#### [OmniAI::Google](https://github.com/ksylvest/omniai-google)
|
196
210
|
|
197
211
|
```ruby
|
data/lib/omniai/chat/stream.rb
CHANGED
@@ -15,10 +15,10 @@ module OmniAI
|
|
15
15
|
|
16
16
|
# @yield [payload]
|
17
17
|
# @yieldparam payload [OmniAI::Chat::Payload]
|
18
|
-
def stream!(&)
|
18
|
+
def stream!(&block)
|
19
19
|
@body.each do |chunk|
|
20
20
|
parser.feed(chunk) do |type, data, id|
|
21
|
-
process!(type, data, id, &)
|
21
|
+
process!(type, data, id, &block)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/lib/omniai/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Sylvestre
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-30 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: event_stream_parser
|
@@ -37,6 +37,20 @@ dependencies:
|
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '0'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: logger
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
40
54
|
- !ruby/object:Gem::Dependency
|
41
55
|
name: zeitwerk
|
42
56
|
requirement: !ruby/object:Gem::Requirement
|