omniai 0.1.4 → 0.1.5

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: 5d90d000047c670a17478146fa35fca9c993127067b01b11113cc46e739d15e2
4
- data.tar.gz: d025855eb6ea4ae79bc7c126a2853fff7a6a0e21d597fa86b2efb6b8d1c3ddf1
3
+ metadata.gz: 4e387dddb26068bab8b4aa35a8e990d6db7aed7f034ae4593105b680282e5d43
4
+ data.tar.gz: 20f9b49d315dea539937521507058a16b8d6f8b0aaeea26f1b6be2cacf07122c
5
5
  SHA512:
6
- metadata.gz: 77247cd74f88fdaa527b377940f32cfaad187c26f8ae4c6f373c708c866ce5c956c0436194786acb474ae07f423ea83511df6bbd5029c91247aff4b5d8ee2891
7
- data.tar.gz: c7d3a40a6c21fe1827b162e94eae0dd0d2f66014797e4d878fa6c7aacf17c443412fcefa2f4bc0ad008f7b64b41ab4e2d583109990d6418d77451f1ba67b4fbd
6
+ metadata.gz: 8c3f503fe81921c2d690f169bc22d3d55b00b590920dc31c47c625a93dd142c995e369a9ffa3675c82bf7d04d3861e3b6e09b98b6e3afbd72bfed91b606e8473
7
+ data.tar.gz: 443d264b0f4c39058fd759b379e604cb631435334fff5fe7528b06cf8502af40c2fbfdca86300e5135029e90ab6104bb0c2b86e5198bd69fcd9c8071e6fbc07a
@@ -6,7 +6,7 @@ module OmniAI
6
6
  #
7
7
  # Usage:
8
8
  #
9
- # class OmniAI::OpenAI::ChatGPT::Completion < OmniAI::Chat::Completion
9
+ # class OmniAI::OpenAI::ChatGPT::Request < OmniAI::Chat::Request
10
10
  # module Model
11
11
  # CHAT = "davinci"
12
12
  # end
@@ -23,7 +23,7 @@ module OmniAI
23
23
  # @param model [String] required
24
24
  # @param temperature [Float, nil] optional
25
25
  # @param stream [Proc, nil] optional
26
- # @param format [Symbol, nil] optional - :text or :json
26
+ # @param format [Symbol, nil] optional - :json
27
27
  def initialize(client:, messages:, model:, temperature: nil, stream: nil, format: nil)
28
28
  @client = client
29
29
  @messages = messages
@@ -44,12 +44,12 @@ module OmniAI
44
44
  protected
45
45
 
46
46
  # @param response [HTTP::Response]
47
- # @return [OmniAI::Chat::Completion::Response]
47
+ # @return [OmniAI::Chat::Completion]
48
48
  def parse!(response:)
49
49
  if @stream
50
50
  stream!(response:)
51
51
  else
52
- OmniAI::OpenAI::Chat::Completion.new(data: response.parse)
52
+ OmniAI::Chat::Completion.new(data: response.parse)
53
53
  end
54
54
  end
55
55
 
@@ -62,7 +62,7 @@ module OmniAI
62
62
  parser.feed(chunk) do |_, data|
63
63
  break if data.eql?('[DONE]')
64
64
 
65
- chunk = OmniAI::OpenAI::Chat::Chunk.new(data: JSON.parse(data))
65
+ chunk = OmniAI::Chat::Chunk.new(data: JSON.parse(data))
66
66
  @stream.call(chunk)
67
67
  end
68
68
  end
data/lib/omniai/config.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OmniAI
2
4
  # A configuration for each agent w/ `api_key` / `host` / `logger`.
3
5
  class Config
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniAI
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
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.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre