omniai 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53ccc1363252abefa6089ff068b11b3ac15b5817339dc935ae9b78cf1d146b20
4
- data.tar.gz: 1b4fe76443ef245f7198c1d55edab1fa6d985afbef1638705caf3d40a1b88c05
3
+ metadata.gz: b478ff0decf827e07f67c3c85973ad576f546980417f82ff5f71949c99157e22
4
+ data.tar.gz: edcd0f60037d10fca5aec3ecc6cbd08c0c9b1c42aa9353506c232821cbd0fe0f
5
5
  SHA512:
6
- metadata.gz: f687cd00e0cbed7994d8a172c657d135741e8ca5afdc8f4bcff53ffb6ec6746f553f26cfeeddcf08a81a261e72e7dcd0b4aee06e0b9e336016a1843189bb4a29
7
- data.tar.gz: 6d89697cc18301852e6648b2a323634a59df9bf90032146d35837ead4a4746bad13527aeef8c67af8cd0290bdaae3177de50d29c220c8fff86f844f081484970
6
+ metadata.gz: 69d8116cf9313da66fc89857332d8efb9e2005f007474dd377ec8c34ffb5c18e22155740390acb793f255447399f176605f0306e94c99c0e160346581fd1e597
7
+ data.tar.gz: 5c7975664071ff8158d5fd9e33fac37f7874b856d319edb0555deeefb78ac70e1dd7c13ffde015a5b0029c4b1ad26554d34ba0ca294bbf8acc81365adef1705c
@@ -19,23 +19,20 @@ module OmniAI
19
19
  # client.chat.completion(messages, model: "...", temperature: 0.0, format: :text)
20
20
  class Request
21
21
  # @param client [OmniAI::Client] the client
22
- # @param messages [String]
23
- # @param model [String]
24
- # @param temperature [Float]
25
- # @param format [Symbol] either :text or :json
26
- def initialize(client:, messages:, model:, temperature: 0.0, format: :text)
22
+ # @param messages [String] required
23
+ # @param model [String] required
24
+ # @param temperature [Float, nil] optional
25
+ # @param stream [Proc, nil] optional
26
+ # @param format [Symbol, nil] optional - :text or :json
27
+ def initialize(client:, messages:, model:, temperature: nil, stream: nil, format: nil)
27
28
  @client = client
28
29
  @messages = messages
29
30
  @model = model
30
31
  @temperature = temperature
32
+ @stream = stream
31
33
  @format = format
32
34
  end
33
35
 
34
- # @param prompt [String, Message]
35
- # @param model [String]
36
- # @param format [Symbol] either :text or :json
37
- # @param temperature [Float]
38
- # @return [Hash]
39
36
  # @raise [ExecutionError]
40
37
  def process!
41
38
  response = request!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniAI
4
- VERSION = '0.0.7'
4
+ VERSION = '0.0.8'
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: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre