tiktoken_ruby 0.0.8-aarch64-linux → 0.0.9-aarch64-linux

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: e157d10a1f0f5d11875496ebac5945fe51202aa6abc7da2a1d85297f0e793e69
4
- data.tar.gz: fe5ee65444abe465c70dfaf8408aea4573cff82099ed1ee5e0b2b19c04177b41
3
+ metadata.gz: 046704f021259f1292da499bbcf2e8707d0d191350fb0e4386ed06c6d893a1b0
4
+ data.tar.gz: 62906b1be45ff6ae8709a337935926d1cbc39de4edad2d41552ca0c896e71ba2
5
5
  SHA512:
6
- metadata.gz: 9e0bccf87a5aa5b9b58d1910e28ec58988b1e5c82d45e3b6fcd7f48d7cb4d71066376f6e308136d8e67969dae7f177044fb3db05f48dc03adad2147302c23281
7
- data.tar.gz: 514cabd057bc8524d628c667363884bead42fd9e84581b8f5ec07c521efee3b6646eb268b06adfbb06c0e8f97a1039b978de77114aa081dc9856a570f39142ab
6
+ metadata.gz: 1f752aac415ce552017560c5b636d39ecf7829e824f34a898c4f3db8e1fd1bb015f8fb0125182fc6486aa02ab8268e32f111379dbeb9fd34368065daca794db8
7
+ data.tar.gz: 3ac9fd3efc816235fed8f7edaebe68e7175346ee260ea825e0acc71221d5bb48ff9a1f1718b259d5a8cb8d2b467dcef7a194aa7648d00c73be609df20dec6908
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: aarch64-linux
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