tiktoken_ruby 0.0.8-arm-linux → 0.0.9-arm-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: 6c8bb1d2e78442a762f320c0afe73b3fb0f9caa696a68d38710f4fab16aa15ad
4
- data.tar.gz: fe7e0b30a686934ea9d08e023ed5153e9137dae356b43afbf00af1c61993b608
3
+ metadata.gz: da4ac893803fed2e1f7feac48216d4f6b5e26a2b1f82ac390140e5b6ad713da9
4
+ data.tar.gz: 75ead5e389c6f94477cb010d1e128985f27419ca544909ab3bec2ae125c41a45
5
5
  SHA512:
6
- metadata.gz: 53baa4247f588e925697fad52fc6ab2e950d5f84c6032a1dd02cf0086ffdf0475d31a6f8965f7d32603b99d6808867802b87ba5d814ac7986f7af4993c49c06e
7
- data.tar.gz: dd96bec21478a1333af3b0a17e62da65aee4865e434bb5f75c30954a8393cbab65df0ad1d7b49e335a487dd4217abacc63f70bbef7289558f9fe20bf19e37d8d
6
+ metadata.gz: e7c804a4af5e895f86d5ef485768f6a94f8411447e0015f7f796cbd83b1ccb18f2fa2a58a627dc000a8c01724c57ad4ef8f00524e39e99f245d3f934027c1051
7
+ data.tar.gz: a498b685977f163fe6892fac2d429997ba76659df18c829fa688ea60258d5648c7bb98a86f2ab42959e9d9c2914dcaec143bfcc06dbf79ad0f38756b25259ddb
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: arm-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