@goliapkg/tiktoken-wasm 3.2.0 → 3.2.1

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 CHANGED
@@ -193,13 +193,23 @@ Filter models by provider: `"OpenAI"`, `"Anthropic"`, `"Google"`, `"Meta"`, `"De
193
193
  | Anthropic | claude-opus-4, claude-sonnet-4, claude-4.5-sonnet, claude-4.5-haiku, claude-4.6-sonnet, claude-4.6-opus, claude-4.6-haiku, claude-3.5-haiku, claude-3.5-sonnet, claude-3-opus, claude-3-haiku |
194
194
  | Google | gemini-2.5-pro, gemini-2.5-flash, gemini-2.0-flash, gemini-1.5-pro, gemini-1.5-flash |
195
195
  | Meta | llama-4-scout, llama-4-maverick, llama-3.3-70b, llama-3.1-405b, llama-3.1-70b, llama-3.1-8b |
196
- | DeepSeek | deepseek-r1, deepseek-v3, deepseek-chat |
196
+ | DeepSeek | deepseek-r1, deepseek-v3 |
197
197
  | Qwen | qwen3-235b, qwen3-32b, qwen3-30b-a3b, qwen3-14b, qwen-2.5-72b, qwen-2.5-coder-32b, qwen-turbo |
198
198
  | Mistral | mistral-large, mistral-medium, mistral-small, codestral, pixtral-large |
199
199
 
200
+ ## Notes
201
+
202
+ ### Initialization
203
+
204
+ Call `await init()` once before any other API calls. This loads and compiles the WASM module. Subsequent calls are a no-op.
205
+
206
+ ### Memory Management
207
+
208
+ `Encoding` instances hold references to globally cached data and are lightweight. Calling `.free()` releases the JS wrapper — the underlying encoding data remains cached for reuse. In short-lived scripts you can skip `.free()`; in long-running apps, call it when you're done with the instance.
209
+
200
210
  ## Demo
201
211
 
202
- See [`examples/react-app`](../examples/react-app/) for a complete Vite + React demo application.
212
+ See [`examples/react-app`](../tiktoken/examples/react-app/) for a complete Vite + React demo application.
203
213
 
204
214
  ## License
205
215
 
package/package.json CHANGED
@@ -2,12 +2,15 @@
2
2
  "name": "@goliapkg/tiktoken-wasm",
3
3
  "type": "module",
4
4
  "description": "WASM bindings for the tiktoken BPE tokenizer",
5
- "version": "3.2.0",
5
+ "version": "3.2.1",
6
6
  "license": "MIT",
7
+ "author": "GOLIA <dev@golia.co>",
8
+ "homepage": "https://github.com/goliajp/airs/tree/main/crates/tiktoken-wasm",
7
9
  "repository": {
8
10
  "type": "git",
9
11
  "url": "https://github.com/goliajp/airs"
10
12
  },
13
+ "keywords": ["tokenizer", "tiktoken", "wasm", "bpe", "openai", "llm"],
11
14
  "files": [
12
15
  "tiktoken_wasm_bg.wasm",
13
16
  "tiktoken_wasm.js",
@@ -18,4 +21,4 @@
18
21
  "sideEffects": [
19
22
  "./snippets/*"
20
23
  ]
21
- }
24
+ }
@@ -131,7 +131,7 @@ export function getModelInfo(model_id: string): ModelInfo;
131
131
  *
132
132
  * Returns an array of strings: `["cl100k_base", "o200k_base", ...]`
133
133
  */
134
- export function listEncodings(): any[];
134
+ export function listEncodings(): string[];
135
135
 
136
136
  /**
137
137
  * Map a model name to its encoding name without loading the encoding.
package/tiktoken_wasm.js CHANGED
@@ -332,7 +332,7 @@ export function getModelInfo(model_id) {
332
332
  * List all available encoding names.
333
333
  *
334
334
  * Returns an array of strings: `["cl100k_base", "o200k_base", ...]`
335
- * @returns {any[]}
335
+ * @returns {string[]}
336
336
  */
337
337
  export function listEncodings() {
338
338
  const ret = wasm.listEncodings();
Binary file