omniai 2.1.0 → 2.1.1

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: c58b1fbebfaaaa7bcd77fe9754d0bf0bddc7b55c07b76ae31cbae0ae24b2024f
4
- data.tar.gz: d4462dbf00a04ce81db7f8bf7c4f45018aaab994fd2699483e8b2de324546ab2
3
+ metadata.gz: 90c0c98df3552c3e1351671ebf9d02847f96a4cf8c92163a25cd1e119d3b3e7d
4
+ data.tar.gz: 509907dabedafa041381621aea668747547cd60da6edd78d9fdfd325c224c1a5
5
5
  SHA512:
6
- metadata.gz: b7857bee4ec80f63d8e2a8ae3a6534c36f21ae622ba3a672653ae6aa2017e929baa2d4f89d9bcd783ab645bf17c9e65c6dfa8fa18fc757a38106d59375305bb8
7
- data.tar.gz: d0c5f8a0ab434740df1a6abc4f5f9d96590d067fe5d6e4e1a9849edea9647bcfa4c5768fdfe74c14a520ff6a9849e8b51f56b764ca8f28424bdb614a87d47f0e
6
+ metadata.gz: e96e2441296a6283ce5bfe9f3025c2a3838466d1f2c44ff4bc95f1f4b84a7dd7559c227f909382e7d01fb676b13eb344b3b164c0c96e0963b52bf377c2bb73d8
7
+ data.tar.gz: bcc1d3f357c57c010b0064ba2e2becc74df572263d9378351a22d0a9f17b4fa3336b9645e7f221a78d620d72a2afe2c922f2f337b56f6c955a752e7188457f38
data/README.md CHANGED
@@ -119,7 +119,7 @@ end
119
119
  The weather is 24° Celsius in London and 42° Fahrenheit in Madrid.
120
120
  ```
121
121
 
122
- ### Example #5: Chat w/ CLI
122
+ ### Example #5: [Chat w/ CLI](https://github.com/ksylvest/omniai/blob/main/examples/chat_with_cli)
123
123
 
124
124
  The `OmniAI` gem also ships with a CLI to simplify quick tests.
125
125
 
@@ -35,8 +35,8 @@ module OmniAI
35
35
  deserialize = context&.deserializer(:usage)
36
36
  return deserialize.call(data, context:) if deserialize
37
37
 
38
- input_tokens = data["input_tokens"]
39
- output_tokens = data["output_tokens"]
38
+ input_tokens = data["input_tokens"] || data["prompt_tokens"]
39
+ output_tokens = data["output_tokens"] || data["completion_tokens"]
40
40
  total_tokens = data["total_tokens"]
41
41
 
42
42
  new(input_tokens:, output_tokens:, total_tokens:)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniAI
4
- VERSION = "2.1.0"
4
+ VERSION = "2.1.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-03-17 00:00:00.000000000 Z
10
+ date: 2025-03-24 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: event_stream_parser