omniai 1.6.0 → 1.6.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/omniai/chat.rb +4 -0
- data/lib/omniai/client.rb +4 -1
- data/lib/omniai/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: fc0ef904482119dedd44057ac782fdf5c0c43a72f4a212c9a10736ba6389bd9d
|
4
|
+
data.tar.gz: 9d8c20309d3652207719f0d95253df5d4bb422658f42d724aa509bec0595721b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00462515ed1392ccc2a94dcdc1bc61e18ce316306dbbaf77523938a47e49e33d7f6e17d37ecc921edc82b04f8f7a8de7a122fdd0eeb787cabf95cf8c42092309
|
7
|
+
data.tar.gz: 894271b6a222be666bad5a2502ab4b040ab4e8c7f31c6c3e3dd3226b296a8198a0f3030e31c75de0fea30db8d0b5e27c0601b13d99127ab0121dbbef5b128943
|
data/lib/omniai/chat.rb
CHANGED
@@ -57,7 +57,11 @@ module OmniAI
|
|
57
57
|
# @param stream [Proc, IO, nil] optional
|
58
58
|
# @param tools [Array<OmniAI::Tool>] optional
|
59
59
|
# @param format [Symbol, nil] optional - :json
|
60
|
+
#
|
60
61
|
# @yield [prompt] optional
|
62
|
+
# @yieldparam prompt [OmniAI::Chat::Prompt]
|
63
|
+
#
|
64
|
+
# @return [OmniAi::Chat]
|
61
65
|
def initialize(prompt = nil, client:, model:, temperature: nil, stream: nil, tools: nil, format: nil, &block)
|
62
66
|
raise ArgumentError, 'prompt or block is required' if !prompt && !block
|
63
67
|
|
data/lib/omniai/client.rb
CHANGED
@@ -131,8 +131,11 @@ module OmniAI
|
|
131
131
|
# @param stream [Proc, nil] optional
|
132
132
|
# @param tools [Array<OmniAI::Tool>] optional
|
133
133
|
#
|
134
|
+
# @yield [prompt] optional
|
135
|
+
# @yieldparam prompt [OmniAI::Chat::Prompt]
|
136
|
+
#
|
134
137
|
# @return [OmniAI::Chat::Completion]
|
135
|
-
def chat(messages, model:, temperature: nil, format: nil, stream: nil, tools: nil)
|
138
|
+
def chat(messages, model:, temperature: nil, format: nil, stream: nil, tools: nil, &)
|
136
139
|
raise NotImplementedError, "#{self.class.name}#chat undefined"
|
137
140
|
end
|
138
141
|
|
data/lib/omniai/version.rb
CHANGED