🎨 make transformers.js esm compatible

This commit is contained in:
Nate Sesti 2024-05-27 11:41:49 -07:00
parent db1457838d
commit 04d4245696
4 changed files with 9 additions and 13652 deletions

5916
binary/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -17,7 +17,14 @@ class EmbeddingsPipeline {
env.allowLocalModels = true;
env.allowRemoteModels = false;
env.localModelPath = path.join(__dirname, "..", "models");
env.localModelPath = path.join(
typeof __dirname === "undefined"
? // @ts-ignore
path.dirname(new URL(import.meta.url).pathname)
: __dirname,
"..",
"models",
);
EmbeddingsPipeline.instance = await pipeline(
EmbeddingsPipeline.task,

View file

@ -1,6 +1,6 @@
{
"name": "@continuedev/core",
"version": "1.0.12",
"version": "1.0.13",
"description": "The Continue Core contains functionality that can be shared across web, VS Code, or Node.js server. It is written in TypeScript and contains much of the functionality that was previously inside of the legacy Continue Python Server.",
"scripts": {
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest ./test/diff.test.ts",

7734
core/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff