omniai 1.8.2 → 1.8.4

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: fca0a46de30a2f54bfab6cc05b65c5fb78b2292c147928c5fe2781e3e5bd3c68
4
- data.tar.gz: dd6fcf4d76afeca2ff6a289ddb4a4c1d4bed13e976dd03e34da369ab2b3308b0
3
+ metadata.gz: 38eed1bd7e34d8cd092630356e9de0d6ec31ad1943d2657d866f9f2bc62a3b3c
4
+ data.tar.gz: 457d415c96fd8e79b37f8502288dcbaec8fccaca1454405be5d3168bc25d8280
5
5
  SHA512:
6
- metadata.gz: bead375cec92e44876ca250ec8d9ba7e9e98e9b847dd6d41b5633fa1a9de32f134474bfaea6b85cd5f4c522e4389e6e2aadd91287e35b175e66d441affdd697f
7
- data.tar.gz: f6a7202e05bbdf3bbf994d721960e267e72ecf8846aececda62ae8ecceb34448470e3282818e747a4408177ec37165f0e937f945dc76943af07cf4caa930ad33
6
+ metadata.gz: 83d6770055e2b05a25e4e68dcb3ef3be825ce63326b25c492d206fe88b772d7689e7474f56ed1a4e9ad7e0d42f9afc7e6b2a44d9b7c7021297869550e126c8a2
7
+ data.tar.gz: 99b584ab83c1e2c5c4f4e4ad73fd803263b5d60a47c8f27c24758bffb5a618f9b23df8a34cfdde43e23adf55252b281dd10c7f67034affdc78498e39f833ea31
@@ -144,6 +144,24 @@ module OmniAI
144
144
  def user(content = nil, &)
145
145
  message(content, role: Role::USER, &)
146
146
  end
147
+
148
+ # @example
149
+ # prompt.assistant('the capital of Canada is Ottawa.')
150
+ #
151
+ # @example
152
+ # prompt.assistant do |message|
153
+ # message.text 'the capital of Canada is Ottawa.'
154
+ # end
155
+ #
156
+ # @param content [String, nil]
157
+ #
158
+ # @yield [builder]
159
+ # @yieldparam builder [Message::Builder]
160
+ #
161
+ # @return [Message]
162
+ def assistant(content = nil, &)
163
+ message(content, role: Role::ASSISTANT, &)
164
+ end
147
165
  end
148
166
  end
149
167
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniAI
4
- VERSION = '1.8.2'
4
+ VERSION = '1.8.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-19 00:00:00.000000000 Z
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: event_stream_parser