omniai-openai 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniai/openai/client.rb +5 -2
- data/lib/omniai/openai/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: 3ff87839fda74772081155dca341df25a7112ac9fb40940d3a9ce027702f78fa
|
4
|
+
data.tar.gz: c4f892dc84bf3c9c6f914dbf19912c34add5f30d486ddaef5d4a72122ecc42bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecea745e019e298450b06485dc8283d66e2a3bb0e0562a54ee6c55c358b1e687afb1c7f9f34e9b45a495189ca282651183fdd47983492f554ce68a6125277529
|
7
|
+
data.tar.gz: e1834ffed43d4db32b430bdf7150af21250d7757adf87c5dbc5912162598038f661ba24b24aaa6ac4cf078c9db7d32e7ec1d0a1c79c79e52dac94d2f27f74991
|
data/lib/omniai/openai/client.rb
CHANGED
@@ -69,9 +69,12 @@ module OmniAI
|
|
69
69
|
# @param stream [Proc, nil] optional
|
70
70
|
# @param tools [Array<OmniAI::Tool>, nil] optional
|
71
71
|
#
|
72
|
+
# @yield [prompt]
|
73
|
+
# @yieldparam prompt [OmniAI::Chat::Prompt]
|
74
|
+
#
|
72
75
|
# @return [OmniAI::Chat::Completion]
|
73
|
-
def chat(messages, model: Chat::DEFAULT_MODEL, temperature: nil, format: nil, stream: nil, tools: nil)
|
74
|
-
Chat.process!(messages, model:, temperature:, format:, stream:, tools:, client: self)
|
76
|
+
def chat(messages, model: Chat::DEFAULT_MODEL, temperature: nil, format: nil, stream: nil, tools: nil, &)
|
77
|
+
Chat.process!(messages, model:, temperature:, format:, stream:, tools:, client: self, &)
|
75
78
|
end
|
76
79
|
|
77
80
|
# @raise [OmniAI::Error]
|