@goliapkg/tiktoken-wasm 3.5.1 → 3.6.0
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.
- package/README.md +6 -4
- package/package.json +1 -1
- package/tiktoken_wasm.js +2 -2
- package/tiktoken_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -128,14 +128,16 @@ List all available encoding names (11 encodings).
|
|
|
128
128
|
|
|
129
129
|
Get a tokenizer by encoding name. Supported:
|
|
130
130
|
- `cl100k_base` — GPT-4, GPT-3.5-turbo
|
|
131
|
-
- `o200k_base` — GPT-4o, GPT-4.1, o1, o3
|
|
131
|
+
- `o200k_base` — GPT-4o, GPT-4.1, GPT-5–5.6, o1, o3, o4-mini
|
|
132
|
+
- `o200k_harmony` — gpt-oss (harmony chat format)
|
|
132
133
|
- `p50k_base` — text-davinci-002/003
|
|
133
134
|
- `p50k_edit` — text-davinci-edit
|
|
134
135
|
- `r50k_base` — GPT-3 (davinci, curie, etc.)
|
|
136
|
+
- `gpt2` — GPT-2 (alias for `r50k_base`)
|
|
135
137
|
- `llama3` — Meta Llama 3/4
|
|
136
138
|
- `deepseek_v3` — DeepSeek V3/R1
|
|
137
139
|
- `qwen2` — Qwen 2/2.5/3
|
|
138
|
-
- `mistral_v3` — Mistral/Codestral/Pixtral
|
|
140
|
+
- `mistral_v3` — Mistral/Codestral/Pixtral (Tekken)
|
|
139
141
|
|
|
140
142
|
### `encodingForModel(model: string): Encoding`
|
|
141
143
|
|
|
@@ -161,7 +163,7 @@ Map a model name to its encoding name without loading the encoding.
|
|
|
161
163
|
|
|
162
164
|
### `estimateCost(modelId, inputTokens, outputTokens): number`
|
|
163
165
|
|
|
164
|
-
Estimate API cost in USD. Supports
|
|
166
|
+
Estimate API cost in USD. Supports 94 models across 7 providers.
|
|
165
167
|
|
|
166
168
|
### `getModelInfo(modelId): ModelInfo`
|
|
167
169
|
|
|
@@ -169,7 +171,7 @@ Get model metadata with full TypeScript typing.
|
|
|
169
171
|
|
|
170
172
|
### `allModels(): ModelInfo[]`
|
|
171
173
|
|
|
172
|
-
List all
|
|
174
|
+
List all 94 supported models with pricing info.
|
|
173
175
|
|
|
174
176
|
### `modelsByProvider(provider): ModelInfo[]`
|
|
175
177
|
|
package/package.json
CHANGED
package/tiktoken_wasm.js
CHANGED
|
@@ -476,11 +476,11 @@ export function modelsByProvider(provider) {
|
|
|
476
476
|
function __wbg_get_imports() {
|
|
477
477
|
const import0 = {
|
|
478
478
|
__proto__: null,
|
|
479
|
-
|
|
479
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
480
480
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
481
481
|
return addHeapObject(ret);
|
|
482
482
|
},
|
|
483
|
-
|
|
483
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
484
484
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
485
485
|
},
|
|
486
486
|
__wbg_modelinfo_new: function(arg0) {
|
package/tiktoken_wasm_bg.wasm
CHANGED
|
Binary file
|