@mastra/fastembed 1.3.1-alpha.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -59
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -7,7 +7,7 @@ This package is a maintained fork of [fastembed-js](https://github.com/Anush008/
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- pnpm add @mastra/fastembed
10
+ npm install @mastra/fastembed
11
11
  ```
12
12
 
13
13
  ## Usage
@@ -24,66 +24,14 @@ const memory = new Memory({
24
24
  });
25
25
  ```
26
26
 
27
- ### Available Models
27
+ ## Documentation
28
28
 
29
- ```typescript
30
- import { fastembed } from '@mastra/fastembed';
31
-
32
- // Default export (bge-small-en-v1.5 with v3 spec)
33
- const embedder = fastembed;
34
-
35
- // Named exports for v3 models
36
- const small = fastembed.small; // bge-small-en-v1.5
37
- const base = fastembed.base; // bge-base-en-v1.5
38
-
39
- // Multilingual E5 (1024 dimensions), one model per role
40
- const e5Query = fastembed.multilingualE5LargeQuery; // multilingual-e5-large-query
41
- const e5Passage = fastembed.multilingualE5LargePassage; // multilingual-e5-large-passage
42
-
43
- // V2 models (for AI SDK v5 compatibility)
44
- const smallV2 = fastembed.smallV2;
45
- const baseV2 = fastembed.baseV2;
46
-
47
- // Legacy v1 models (for backwards compatibility)
48
- const smallLegacy = fastembed.smallLegacy; // bge-small-en-v1.5 (v1 spec)
49
- const baseLegacy = fastembed.baseLegacy; // bge-base-en-v1.5 (v1 spec)
50
- ```
51
-
52
- ### Direct Usage with AI SDK
53
-
54
- ```typescript
55
- import { embed } from 'ai';
56
- import { fastembed } from '@mastra/fastembed';
57
-
58
- const result = await embed({
59
- model: fastembed,
60
- value: 'Text to embed',
61
- });
62
-
63
- console.log(result.embedding); // number[]
64
- ```
65
-
66
- ## Supported Models
67
-
68
- | Model | Dimensions | Description |
69
- | ------------------------------- | ---------- | ---------------------------------------------- |
70
- | `bge-small-en-v1.5` | 384 | Fast, default English model |
71
- | `bge-base-en-v1.5` | 768 | Base English model |
72
- | `bge-small-en` | 384 | Fast English model |
73
- | `bge-base-en` | 768 | Base English model |
74
- | `bge-small-zh-v1.5` | 512 | Fast Chinese model |
75
- | `all-MiniLM-L6-v2` | 384 | Sentence Transformer model |
76
- | `multilingual-e5-large-query` | 1024 | Multilingual model, for embedding search text |
77
- | `multilingual-e5-large-passage` | 1024 | Multilingual model, for embedding indexed text |
29
+ - [Use FastEmbed for local semantic recall](https://mastra.ai/docs/memory/semantic-recall#using-fastembed-local)
78
30
 
79
- ### Using multilingual E5
31
+ ## Changelog
80
32
 
81
- E5 is asymmetric: it applies a `query: ` prefix to search text and a `passage: ` prefix to indexed
82
- text. The two roles are exposed as separate models and must be used as a pair — index your documents
83
- with `multilingualE5LargePassage` and embed searches with `multilingualE5LargeQuery`. Mixing the
84
- roles, or mixing E5 vectors with BGE vectors in one index, silently degrades retrieval quality. The
85
- target vector index must be created with 1024 dimensions.
33
+ See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/packages/fastembed/CHANGELOG.md) for version history and release notes.
86
34
 
87
- ## Attribution
35
+ ## Support
88
36
 
89
- The core embedding engine is forked from [fastembed-js](https://github.com/Anush008/fastembed-js) by [Anush008](https://github.com/Anush008), licensed under MIT. See [LICENSE-fastembed](./LICENSE-fastembed) for the original license.
37
+ We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/fastembed",
3
- "version": "1.3.1-alpha.0",
3
+ "version": "1.3.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -48,11 +48,11 @@
48
48
  "typescript": "^7.0.2",
49
49
  "vitest": "4.1.10",
50
50
  "zod": "^4.4.3",
51
- "@internal/ai-sdk-v4": "0.0.76",
52
- "@internal/ai-sdk-v5": "0.0.76",
53
- "@internal/ai-v6": "0.0.76",
54
- "@internal/lint": "0.0.129",
55
- "@internal/types-builder": "0.0.104"
51
+ "@internal/ai-sdk-v5": "0.0.77",
52
+ "@internal/ai-sdk-v4": "0.0.77",
53
+ "@internal/ai-v6": "0.0.77",
54
+ "@internal/lint": "0.0.130",
55
+ "@internal/types-builder": "0.0.105"
56
56
  },
57
57
  "engines": {
58
58
  "node": ">=22.13.0"