Skip to content
Snippets Groups Projects
Unverified Commit 66c26d9c authored by Alex Yang's avatar Alex Yang Committed by GitHub
Browse files

fix: json import (#958)

parent a4060a79
No related branches found
No related tags found
No related merge requests found
// Note: This is using th WASM implementation of tiktoken which is 60x faster // Note: This is using th WASM implementation of tiktoken which is 60x faster
import cl100k_base from "tiktoken/encoders/cl100k_base.json"; import cl100k_base from "tiktoken/encoders/cl100k_base.json" with { type: "json" };
import { Tiktoken } from "tiktoken/lite"; import { Tiktoken } from "tiktoken/lite";
import type { Tokenizer } from "./types.js"; import type { Tokenizer } from "./types.js";
import { Tokenizers } from "./types.js"; import { Tokenizers } from "./types.js";
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"outDir": "./dist/type", "outDir": "./dist/type",
"tsBuildInfoFile": "./dist/.tsbuildinfo", "tsBuildInfoFile": "./dist/.tsbuildinfo",
"emitDeclarationOnly": true, "emitDeclarationOnly": true,
"module": "node16", "module": "nodenext",
"moduleResolution": "node16", "moduleResolution": "node16",
"types": ["node"], "types": ["node"],
"resolveJsonModule": true "resolveJsonModule": true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment