🐛 fix windows path to transformers.js model
This commit is contained in:
parent
2cc54f9cd0
commit
d774b75ffa
3 changed files with 5 additions and 3 deletions
|
|
@ -4,13 +4,14 @@ import {
|
|||
pipeline,
|
||||
} from "../../vendor/node_modules/@xenova/transformers";
|
||||
|
||||
import path from "path";
|
||||
import BaseEmbeddingsProvider from "./BaseEmbeddingsProvider";
|
||||
|
||||
env.allowLocalModels = true;
|
||||
env.allowRemoteModels = false;
|
||||
if (typeof window === "undefined") {
|
||||
// The embeddings provider should just never be called in the browser
|
||||
env.localModelPath = `${__dirname}/../models`;
|
||||
env.localModelPath = path.join(__dirname, "..", "models");
|
||||
}
|
||||
|
||||
class EmbeddingsPipeline {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import path from "path";
|
||||
import {
|
||||
env,
|
||||
pipeline,
|
||||
|
|
@ -9,7 +10,7 @@ env.allowLocalModels = true;
|
|||
env.allowRemoteModels = false;
|
||||
if (typeof window === "undefined") {
|
||||
// The embeddings provider should just never be called in the browser
|
||||
env.localModelPath = `${__dirname}/../models`;
|
||||
env.localModelPath = path.join(__dirname, "..", "models");
|
||||
}
|
||||
|
||||
class EmbeddingsPipeline {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"version": "0.9.67",
|
||||
"version": "0.9.72",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue