diff --git a/libs/langchain-community/package.json b/libs/langchain-community/package.json index bceb60def832..985282258cbe 100644 --- a/libs/langchain-community/package.json +++ b/libs/langchain-community/package.json @@ -134,7 +134,7 @@ "@vercel/postgres": "^0.5.0", "@writerai/writer-sdk": "^0.40.2", "@xata.io/client": "^0.28.0", - "@xenova/transformers": "^2.17.2", + "@huggingface/transformers": "^3.2.3", "@zilliz/milvus2-sdk-node": ">=2.3.5", "apify-client": "^2.7.1", "assemblyai": "^4.6.0", @@ -282,7 +282,7 @@ "@vercel/postgres": "^0.5.0", "@writerai/writer-sdk": "^0.40.2", "@xata.io/client": "^0.28.0", - "@xenova/transformers": "^2.17.2", + "@huggingface/transformers": "^3.2.3", "@zilliz/milvus2-sdk-node": ">=2.3.5", "apify-client": "^2.7.1", "assemblyai": "^4.6.0", @@ -523,7 +523,7 @@ "@xata.io/client": { "optional": true }, - "@xenova/transformers": { + "@huggingface/transformers": { "optional": true }, "@zilliz/milvus2-sdk-node": { diff --git a/libs/langchain-community/src/embeddings/hf_transformers.ts b/libs/langchain-community/src/embeddings/hf_transformers.ts index 08175dccbb7a..8996e477cd40 100644 --- a/libs/langchain-community/src/embeddings/hf_transformers.ts +++ b/libs/langchain-community/src/embeddings/hf_transformers.ts @@ -2,7 +2,7 @@ import type { PretrainedOptions, FeatureExtractionPipelineOptions, FeatureExtractionPipeline, -} from "@xenova/transformers"; +} from "@huggingface/transformers"; import { Embeddings, type EmbeddingsParams } from "@langchain/core/embeddings"; import { chunkArray } from "@langchain/core/utils/chunk_array"; @@ -125,7 +125,7 @@ export class HuggingFaceTransformersEmbeddings private async runEmbedding(texts: string[]) { const pipe = await (this.pipelinePromise ??= ( - await import("@xenova/transformers") + await import("@huggingface/transformers") ).pipeline("feature-extraction", this.model, this.pretrainedOptions)); return this.caller.call(async () => {