j_r_r_token 1.0.3-aarch64-linux-musl → 1.1.0-aarch64-linux-musl
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 +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +7 -7
- data/lib/j_r_r_token/2.7/j_r_r_token.so +0 -0
- data/lib/j_r_r_token/3.0/j_r_r_token.so +0 -0
- data/lib/j_r_r_token/3.1/j_r_r_token.so +0 -0
- data/lib/j_r_r_token/3.2/j_r_r_token.so +0 -0
- data/lib/j_r_r_token/3.3/j_r_r_token.so +0 -0
- data/lib/j_r_r_token/3.4/j_r_r_token.so +0 -0
- data/lib/j_r_r_token/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef0940333ee6efe8d9ce67fa905368a66f3fc0c6edc8ddac8201158444bed1f9
|
4
|
+
data.tar.gz: 0144d3735cdd8321a4212dbbfa0dcef3fbd20bd542cb32c5ebb42906fa71b12b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8cc875e8f0e6529224875121fdde58ea90251effd8d1fc95cc77e8cad590bd3c83e7e1e8be61ca1a25fdd9539d277476ae1956c0c7939405fc9dfc30f93d532
|
7
|
+
data.tar.gz: 57cf59f945b3ec6b2eeebe342b1261b37b9631a27ea63e0e75c4a5f8606bd7be9c1b7f3d92627bb5bfe09f6895c08f227d9be6a7e0253ceaa21e483bf36a0d06
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
---
|
11
|
+
## [1.1.0] - 2025-08-26
|
12
|
+
### New Functionality
|
13
|
+
- Added support for the `gpt-5` model name, which maps to the `o200k_base` tokenizer model.
|
14
|
+
|
15
|
+
#### New contributors
|
16
|
+
- [8edaf40](https://github.com/LoganBresnahan/j_r_r_token/commit/8edaf4021dae4ae41dcfa53fa5fb0fe61d9b0b9c) by [jordanmoore753](https://github.com/jordanmoore753)
|
17
|
+
- [a9738c7](https://github.com/LoganBresnahan/j_r_r_token/commit/a9738c7f0d4e7e691af8b8219e89d09b4a3367c0) by [lsysophia](https://github.com/lsysophia)
|
18
|
+
|
19
|
+
---
|
20
|
+
## [1.0.4] - 2025-08-01
|
21
|
+
### Change
|
22
|
+
- Bump version for RubyGems.
|
23
|
+
|
10
24
|
---
|
11
25
|
## [1.0.3] - 2025-08-01
|
12
26
|
### Fix
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# JRRToken [<img src="https://github.com/LoganBresnahan/j_r_r_token/raw/main/.github/assets/ring.png" width="32px" alt="One ring to rule them all, one ring to find them, One ring to bring them all and in the darkness bind them.">](https://www.youtube.com/watch?v=lemgdzLDYqA)
|
2
2
|
|
3
|
-
(Just Ruby Rust Tokens)
|
3
|
+
(Just Ruby, Rust, & Tokens)
|
4
4
|
|
5
5
|
JRRToken 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.
|
6
6
|
|
@@ -15,16 +15,16 @@ Extensive Model Support: Includes tokenizers for all modern and legacy OpenAI mo
|
|
15
15
|
## Install
|
16
16
|
|
17
17
|
#### Gemfile
|
18
|
-
`gem 'j_r_r_token', '~> 1.
|
18
|
+
`gem 'j_r_r_token', '~> 1.1'`
|
19
19
|
|
20
20
|
#### Command Line
|
21
|
-
`gem install j_r_r_token -v '~> 1.
|
21
|
+
`gem install j_r_r_token -v '~> 1.1'`
|
22
22
|
|
23
23
|
## Use
|
24
24
|
|
25
25
|
### Count tokens for a specific model (the model keyword is required)
|
26
26
|
```Ruby
|
27
|
-
count = JRRToken::Tokenizer.count("hello world!", model: "gpt-
|
27
|
+
count = JRRToken::Tokenizer.count("hello world!", model: "gpt-5")
|
28
28
|
```
|
29
29
|
|
30
30
|
### The gem recognizes many aliases, including older models
|
@@ -42,10 +42,10 @@ If you provide an unsupported model name, the gem will raise an `ArgumentError`.
|
|
42
42
|
## Supported Models
|
43
43
|
The gem automatically maps dozens of model names and prefixes to the correct underlying tokenizer. You don't need to know the tokenizer's base name (e.g., cl100k_base); just use the model name you're working with.
|
44
44
|
|
45
|
-
- o200k_base Models (e.g.,
|
46
|
-
- cl100k_base Models (e.g.,
|
45
|
+
- o200k_base Models (e.g., gpt-5, gpt-4.1, gpt-4o)
|
46
|
+
- cl100k_base Models (e.g., gpt-4, gpt-3.5)
|
47
47
|
- p50k_base Models (e.g., text-davinci-003)
|
48
|
-
- r50k_base Models (e.g.,
|
48
|
+
- r50k_base Models (e.g., gpt-2)
|
49
49
|
- p50k_edit Models
|
50
50
|
|
51
51
|
## Developing JRRToken Locally
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/j_r_r_token/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: j_r_r_token
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: aarch64-linux-musl
|
6
6
|
authors:
|
7
7
|
- Logan Bresnahan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|