tiktoken_ruby 0.0.8-x86_64-linux-musl → 0.0.9-x86_64-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34a2818779ff0903c9b7bdf5e7132440cbee1980475b83dc899ecc019c353cc6
4
- data.tar.gz: 42f9069dca45fc54ae7d2ee9711dc8028a2d305f6caeb7db6024b139371bffbd
3
+ metadata.gz: 68ab7cf30658d5a38c8a7f8cceb40cb7a5e99da1df56cea9d2eb660fcd7d3608
4
+ data.tar.gz: 748226cd09b35adc810cc381404c5a6745f84c353314416c55a798e55ebbc4a9
5
5
  SHA512:
6
- metadata.gz: dd60905cfe30d24ef26c00f46604da82530d58fc24262da51d0db6b81fba92c66b935cb570d84879c463a0adeb4c7e2bf1bbfad89fd951cd4fa68429af0b2a87
7
- data.tar.gz: c952a88e2bce633514d77ce0f5bb380d1a8d622225beab41ea3e29053658f27f4774761224f45d8c963068583274f32f6d66e8b06dec1ef9d267e4e8b9a3c80f
6
+ metadata.gz: 8ffc23202ec430374c113b3aaa57b7c3ece7da8f192b0b722b6454dae52191932a4ca10ce30f2d580b23806170b5996b2c345cb00f4c8a1f71d425f69c02cc84
7
+ data.tar.gz: 904623d818d68385ca1c4cba8108331a85758fab54f1e2ba2597ee4fbde1fd20205c711607fc6e7cd85924acbc1e237e47868e8b58d411e01b146dac57fb538f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tiktoken_ruby (0.0.8)
4
+ tiktoken_ruby (0.0.9)
5
5
  rb_sys (= 0.9.87)
6
6
 
7
7
  GEM
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tiktoken
4
- VERSION = "0.0.8"
4
+ VERSION = "0.0.9"
5
5
  end
data/lib/tiktoken_ruby.rb CHANGED
@@ -64,13 +64,15 @@ module Tiktoken
64
64
  :r50k_base,
65
65
  :p50k_base,
66
66
  :p50k_edit,
67
- :cl100k_base
67
+ :cl100k_base,
68
+ :o200k_base
68
69
  ]
69
70
 
70
71
  # taken from the python library here https://github.com/openai/tiktoken/blob/main/tiktoken/model.py
71
72
  # that is also MIT licensed but by OpenAI
72
73
  MODEL_TO_ENCODING_NAME = {
73
74
  # chat
75
+ "gpt-4o": "o200k_base",
74
76
  "gpt-4": "cl100k_base",
75
77
  "gpt-3.5-turbo": "cl100k_base",
76
78
  "gpt-35-turbo": "cl100k_base", # Azure deployment name
@@ -120,6 +122,7 @@ module Tiktoken
120
122
 
121
123
  MODEL_PREFIX_TO_ENCODING = {
122
124
  # chat
125
+ "gpt-4o-": "o200k_base", # e.g., gpt-4o-2024-05-13, etc.
123
126
  "gpt-4-": "cl100k_base", # e.g., gpt-4-0314, etc., plus gpt-4-32k
124
127
  "gpt-3.5-turbo-": "cl100k_base", # e.g, gpt-3.5-turbo-0301, -0401, etc.
125
128
  "gpt-35-turbo-": "cl100k_base", # Azure deployment name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiktoken_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: x86_64-linux-musl
6
6
  authors:
7
7
  - IAPark
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-04 00:00:00.000000000 Z
11
+ date: 2024-05-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: An unofficial Ruby wrapper for Tiktoken, a BPE tokenizer written by and
14
14
  used by OpenAI. It can be used to count the number of tokens in text before sending