omniai 1.6.0 → 1.6.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b44fd75b138e1f46f517e7077367e02bdbcf1f798ee000087c5ba4c97bb7494b
4
- data.tar.gz: 88002c5d7018fc5a940b30bfa644a93e93e9b93d0cbdd993306bf15943ea790d
3
+ metadata.gz: ee3875380bef07417246342465e621d52dcaf30bf7fff0beb99e341cb61d5258
4
+ data.tar.gz: 9bc2db4fd5dbdc456810753e0738c4da0481670c84d3c18f6f7ca310cd0d5514
5
5
  SHA512:
6
- metadata.gz: f3bc56ecbeaaf50d776c87eb07ba571b85f2ab001b8181cff66875a9a282289fdec9bfa2c2a716637758f61a76d0c3ddf8b794abee6e3adba6117ad4b4fc4ccd
7
- data.tar.gz: 233f99eb1daf1a75173559ad2649461aa1b1e1bc1f53eba65c5113690f38017258db79f4ba8d83e525c363adcd76caae9997fda49cf32c01198917c030b2b8f7
6
+ metadata.gz: d61725b7ed361b560d90a5887084dcaee519dca4b509fbf0a4335f10106647a577b6f852c51fd2341fa9f3be361e29d5341fd1572f068317f278651fbe6323e9
7
+ data.tar.gz: 7ed311f56483076821f7906f30c6ebc8ce21798f4a03bf2bfaab4d5bab66c56c5f9a61ffb95cc32f988e91bcac32d90fc1b15df0bca14a0e7bbfe858037b510b
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
@@ -124,15 +124,18 @@ module OmniAI
124
124
 
125
125
  # @raise [OmniAI::Error]
126
126
  #
127
- # @param messages [String, Array, Hash]
127
+ # @param messages [String] optional
128
128
  # @param model [String] optional
129
129
  # @param format [Symbol] optional :text or :json
130
130
  # @param temperature [Float, nil] optional
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 = nil, model:, temperature: nil, format: nil, stream: nil, tools: nil, &)
136
139
  raise NotImplementedError, "#{self.class.name}#chat undefined"
137
140
  end
138
141
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniAI
4
- VERSION = '1.6.0'
4
+ VERSION = '1.6.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre