Open deepak-coding-art opened 1 year ago
Looks like the createRequire
function have a different behavior on deno. Anyway using compat mode fixes it:
import tiktoken from "npm:tiktoken-node";
I am using the supabase edge functions and the npm packages are not available in that
Did this package support the cl100k_base encoding for the gpt-turbo-3.5 model
I am trying to load it in deno with the help of esm.sh but it is giving error:
error: Uncaught Error: createRequire only supports 'file://' URLs for the 'filename' parameter. Received 'https://esm.sh/v111/tiktoken-node@0.0.4/deno/tiktoken-node.js' throw new Error( ^ at createRequire (https://deno.land/std@0.177.0/node/module.ts:690:17) at https://esm.sh/v111/tiktoken-node@0.0.4/deno/tiktoken-node.js:2:185
import statement
import tiktoken from "https://esm.sh/tiktoken-node@0.0.4";
Did you try using skypack cdn instead of esm.sh? Sometimes using npm packages with skypack.dev works where esm fails
I am using the supabase edge functions and the npm packages are not available in that
Did this package support the cl100k_base encoding for the gpt-turbo-3.5 model
Did you get this working in the end?
I am trying to load it in deno with the help of esm.sh but it is giving error:
import statement