ru_token 0.1.16-arm64-darwin → 0.1.20-arm64-darwin

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: 21f9cae9913e9effad93ad585963d8b5b73895f23c5d5f7a49408ddab71461c2
4
- data.tar.gz: b5137ac42443f351abed701bae90dd2803d18b50c4e777e7bf64627cb9f413c9
3
+ metadata.gz: c15c74cf960c16470ab8ad3e3bddff35ea79ba13a16062d73c9b02b4689ce112
4
+ data.tar.gz: bdad83f84b44aed0fea8486e988a64e3615c97e423c454e5fbea944094a7f633
5
5
  SHA512:
6
- metadata.gz: a3a0908f8fc45131cb564382c00009cbb98aeccee207240bd7ad24095e7f0feeb214850d398696062ca0b46a0c8bac3ee932ae17c72d48f72c8b091da8ee4bd8
7
- data.tar.gz: 2aef6769909012ec6ae401d53a727a47bb33f52669e7626e3a951c7860a099ad927a23263ce73d5fa28235f8db66dfbe0123749befacf41d17a32696dd9beff5
6
+ metadata.gz: 56c311323ff1318d901dea18bad1f6dce245574a59c6484ccec68fb9a10c339f9277e9936b1086ba857050b6b816e875311602895259d128633371f0f2df32f5
7
+ data.tar.gz: 0d721cafeef3b7c0aa77bb7c9cd02b59b8bfd7405b7de1424465eaafedb2186b43cf7b2dd93e835e501dae4bcdae05a3ca802ae898f672dec126002611d72052
data/CHANGELOG.md CHANGED
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ---
11
+ ## [0.1.20] - 2025-07-31
12
+ ### Change
13
+ - Remove x64-mingw32 from Gemfile.lock
14
+ - Update README
15
+
16
+ ---
17
+ ## [0.1.19] - 2025-07-31
18
+ ### No Change
19
+ - Bumping to retry RubyGems deploy
20
+
21
+ ---
22
+ ## [0.1.18] - 2025-07-31
23
+ ### Change
24
+ - Update README
25
+
26
+ ---
27
+ ## [0.1.17] - 2025-07-31
28
+ ### Change
29
+ - Update gemspec license entry
30
+ - Remove platform x64-mingw-ucrt from Gemfile.lock
31
+
10
32
  ---
11
33
  ## [0.1.16] - 2025-07-31
12
34
  ### Change
data/README.md CHANGED
@@ -1,16 +1,24 @@
1
- # RuToken 🦕
1
+ # RuToken [🦕](https://youtu.be/0MX31NTNrho?si=NgLE4-UL3zgiUVd7)
2
+
2
3
  RuToken provides a high-performance, native Ruby interface for counting tokens using the powerful [tiktoken-rs](https://github.com/zurawiki/tiktoken-rs) library. It leverages the speed of Rust to offer a fast and efficient way to calculate token counts for various OpenAI models.
3
4
 
4
5
  The gem ships with pre-compiled native extensions for Linux and macOS, so your end-users don't need a Rust toolchain installed.
5
6
 
6
7
  Supports Ruby >= 2.7.0
7
8
 
8
- Features
9
- High Performance ⚡️: Uses a native Rust implementation for blazing-fast tokenization.
9
+ Extensive Model Support: Includes tokenizers for all modern and legacy OpenAI models, recognizing dozens of model aliases automatically.
10
10
 
11
- Simple API: A clean and straightforward interface for counting tokens.
11
+ [https://rubygems.org/gems/ru_token](https://rubygems.org/gems/ru_token)
12
12
 
13
- Extensive Model Support: Includes tokenizers for all modern and legacy OpenAI models, recognizing dozens of model aliases automatically.
13
+ ## Install
14
+
15
+ #### Gemfile
16
+ `gem 'ru_token', '~> 0.1.20'`
17
+
18
+ #### Command Line
19
+ `gem install ru_token -v '~> 0.1.20'`
20
+
21
+ ## Use
14
22
 
15
23
  ### Count tokens for a specific model (the model keyword is required)
16
24
  ```Ruby
@@ -19,7 +27,7 @@ count = RuToken::Tokenizer.count("hello world!", model: "gpt-4.1")
19
27
 
20
28
  ### The gem recognizes many aliases, including older models
21
29
  ```Ruby
22
- count = RuToken::Tokenizer.count(1234, model: "text-davinci-003")
30
+ count = RuToken::Tokenizer.count("hello world!", model: "text-davinci-003")
23
31
  ```
24
32
 
25
33
  ### The count method calls .to_s on the argument if it is not a string
@@ -41,7 +49,9 @@ The gem automatically maps dozens of model names and prefixes to the correct und
41
49
  ## Developing RuToken Locally
42
50
 
43
51
  ### Install Ruby and Rust dependencies
44
- Ruby >= 2.7 required
52
+ Ruby >= 2.7.0
53
+
54
+ RubyGems >= 3.0.0
45
55
 
46
56
  Rust edtion 2021
47
57
 
@@ -55,10 +65,12 @@ Specs:
55
65
  Both:
56
66
  `bundle exec rake`
57
67
 
58
- You can open an interactive console for experimentation with bin/console.
68
+ Interactive console for experimentation: `bin/console`
69
+
70
+ ## Contributing
59
71
 
60
- Contributing
61
72
  Bug reports and pull requests are welcome on GitHub at https://github.com/LoganBresnahan/ru_token.
62
73
 
63
- License
74
+ ## License
75
+
64
76
  The gem is available as open source under the terms of the MIT License.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RuToken
4
- VERSION = "0.1.16"
4
+ VERSION = "0.1.20"
5
5
  end
data/ru_token.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = "Ruby wrapper for the tiktoken Rust library, providing fast tokenization for OpenAI models."
12
12
  spec.description = "RuToken is a Ruby gem that wraps the tiktoken Rust library, enabling fast and efficient tokenization for OpenAI models. It supports multiple models including o200k_base, cl100k_base, p50k_base, and r50k_base."
13
13
  spec.homepage = "https://github.com/LoganBresnahan/ru_token"
14
- spec.license = "GPL-3.0-or-later"
14
+ spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 2.7.0"
16
16
  spec.required_rubygems_version = ">= 3.0.0"
17
17
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ru_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.20
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Logan Bresnahan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-31 00:00:00.000000000 Z
11
+ date: 2025-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,7 +78,7 @@ files:
78
78
  - sig/ru_token.rbs
79
79
  homepage: https://github.com/LoganBresnahan/ru_token
80
80
  licenses:
81
- - GPL-3.0-or-later
81
+ - MIT
82
82
  metadata:
83
83
  allowed_push_host: https://rubygems.org
84
84
  homepage_uri: https://github.com/LoganBresnahan/ru_token