@mastra/chroma 0.0.0-trigger-playground-ui-package-20250506151043 → 0.0.0-update-stores-peerDeps-20250723031338
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.
- package/CHANGELOG.md +346 -4
- package/LICENSE.md +12 -4
- package/dist/_tsup-dts-rollup.d.cts +49 -22
- package/dist/_tsup-dts-rollup.d.ts +49 -22
- package/dist/index.cjs +214 -75
- package/dist/index.js +213 -74
- package/package.json +13 -10
- package/src/vector/filter.test.ts +24 -19
- package/src/vector/filter.ts +35 -4
- package/src/vector/index.test.ts +89 -138
- package/src/vector/index.ts +229 -110
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,338 @@
|
|
|
1
1
|
# @mastra/chroma
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-update-stores-peerDeps-20250723031338
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d85b71d: Update mastra core peer dep version
|
|
8
|
+
|
|
9
|
+
## 0.11.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 8a3bfd2: Update peerdeps to latest core
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 144eb0b: [MASTRA-3669] Metadata Filter Types
|
|
18
|
+
- 0e17048: Throw mastra errors in storage packages
|
|
19
|
+
- Updated dependencies [15e9d26]
|
|
20
|
+
- Updated dependencies [d1baedb]
|
|
21
|
+
- Updated dependencies [d8f2d19]
|
|
22
|
+
- Updated dependencies [4d21bf2]
|
|
23
|
+
- Updated dependencies [07d6d88]
|
|
24
|
+
- Updated dependencies [9d52b17]
|
|
25
|
+
- Updated dependencies [2097952]
|
|
26
|
+
- Updated dependencies [792c4c0]
|
|
27
|
+
- Updated dependencies [5d74aab]
|
|
28
|
+
- Updated dependencies [a8b194f]
|
|
29
|
+
- Updated dependencies [4fb0cc2]
|
|
30
|
+
- Updated dependencies [d2a7a31]
|
|
31
|
+
- Updated dependencies [502fe05]
|
|
32
|
+
- Updated dependencies [144eb0b]
|
|
33
|
+
- Updated dependencies [8ba1b51]
|
|
34
|
+
- Updated dependencies [4efcfa0]
|
|
35
|
+
- Updated dependencies [0e17048]
|
|
36
|
+
- @mastra/core@0.10.7
|
|
37
|
+
|
|
38
|
+
## 0.11.0-alpha.2
|
|
39
|
+
|
|
40
|
+
### Minor Changes
|
|
41
|
+
|
|
42
|
+
- 8a3bfd2: Update peerdeps to latest core
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [792c4c0]
|
|
47
|
+
- Updated dependencies [502fe05]
|
|
48
|
+
- Updated dependencies [4efcfa0]
|
|
49
|
+
- @mastra/core@0.10.7-alpha.3
|
|
50
|
+
|
|
51
|
+
## 0.10.4-alpha.1
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- 144eb0b: [MASTRA-3669] Metadata Filter Types
|
|
56
|
+
- Updated dependencies [15e9d26]
|
|
57
|
+
- Updated dependencies [07d6d88]
|
|
58
|
+
- Updated dependencies [5d74aab]
|
|
59
|
+
- Updated dependencies [144eb0b]
|
|
60
|
+
- @mastra/core@0.10.7-alpha.2
|
|
61
|
+
|
|
62
|
+
## 0.10.4-alpha.0
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- 0e17048: Throw mastra errors in storage packages
|
|
67
|
+
- Updated dependencies [d1baedb]
|
|
68
|
+
- Updated dependencies [4d21bf2]
|
|
69
|
+
- Updated dependencies [2097952]
|
|
70
|
+
- Updated dependencies [4fb0cc2]
|
|
71
|
+
- Updated dependencies [d2a7a31]
|
|
72
|
+
- Updated dependencies [0e17048]
|
|
73
|
+
- @mastra/core@0.10.7-alpha.1
|
|
74
|
+
|
|
75
|
+
## 0.10.3
|
|
76
|
+
|
|
77
|
+
### Patch Changes
|
|
78
|
+
|
|
79
|
+
- 63f6b7d: dependencies updates:
|
|
80
|
+
- Updated dependency [`chromadb@^2.4.6` ↗︎](https://www.npmjs.com/package/chromadb/v/2.4.6) (from `^2.2.0`, in `dependencies`)
|
|
81
|
+
- Updated dependencies [63f6b7d]
|
|
82
|
+
- Updated dependencies [12a95fc]
|
|
83
|
+
- Updated dependencies [4b0f8a6]
|
|
84
|
+
- Updated dependencies [51264a5]
|
|
85
|
+
- Updated dependencies [8e6f677]
|
|
86
|
+
- Updated dependencies [d70c420]
|
|
87
|
+
- Updated dependencies [ee9af57]
|
|
88
|
+
- Updated dependencies [36f1c36]
|
|
89
|
+
- Updated dependencies [2a16996]
|
|
90
|
+
- Updated dependencies [10d352e]
|
|
91
|
+
- Updated dependencies [9589624]
|
|
92
|
+
- Updated dependencies [53d3c37]
|
|
93
|
+
- Updated dependencies [751c894]
|
|
94
|
+
- Updated dependencies [577ce3a]
|
|
95
|
+
- Updated dependencies [9260b3a]
|
|
96
|
+
- @mastra/core@0.10.6
|
|
97
|
+
|
|
98
|
+
## 0.10.3-alpha.0
|
|
99
|
+
|
|
100
|
+
### Patch Changes
|
|
101
|
+
|
|
102
|
+
- 63f6b7d: dependencies updates:
|
|
103
|
+
- Updated dependency [`chromadb@^2.4.6` ↗︎](https://www.npmjs.com/package/chromadb/v/2.4.6) (from `^2.2.0`, in `dependencies`)
|
|
104
|
+
- Updated dependencies [63f6b7d]
|
|
105
|
+
- Updated dependencies [36f1c36]
|
|
106
|
+
- Updated dependencies [10d352e]
|
|
107
|
+
- Updated dependencies [53d3c37]
|
|
108
|
+
- @mastra/core@0.10.6-alpha.0
|
|
109
|
+
|
|
110
|
+
## 0.10.2
|
|
111
|
+
|
|
112
|
+
### Patch Changes
|
|
113
|
+
|
|
114
|
+
- 66f4424: Update peerdeps
|
|
115
|
+
- Updated dependencies [d1ed912]
|
|
116
|
+
- Updated dependencies [f6fd25f]
|
|
117
|
+
- Updated dependencies [dffb67b]
|
|
118
|
+
- Updated dependencies [f1f1f1b]
|
|
119
|
+
- Updated dependencies [925ab94]
|
|
120
|
+
- Updated dependencies [f9816ae]
|
|
121
|
+
- Updated dependencies [82090c1]
|
|
122
|
+
- Updated dependencies [1b443fd]
|
|
123
|
+
- Updated dependencies [ce97900]
|
|
124
|
+
- Updated dependencies [f1309d3]
|
|
125
|
+
- Updated dependencies [14a2566]
|
|
126
|
+
- Updated dependencies [f7f8293]
|
|
127
|
+
- Updated dependencies [48eddb9]
|
|
128
|
+
- @mastra/core@0.10.4
|
|
129
|
+
|
|
130
|
+
## 0.10.2-alpha.0
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- 66f4424: Update peerdeps
|
|
135
|
+
|
|
136
|
+
## 0.10.1
|
|
137
|
+
|
|
138
|
+
### Patch Changes
|
|
139
|
+
|
|
140
|
+
- f0d559f: Fix peerdeps for alpha channel
|
|
141
|
+
- Updated dependencies [ee77e78]
|
|
142
|
+
- Updated dependencies [592a2db]
|
|
143
|
+
- Updated dependencies [e5dc18d]
|
|
144
|
+
- Updated dependencies [ab5adbe]
|
|
145
|
+
- Updated dependencies [1e8bb40]
|
|
146
|
+
- Updated dependencies [1b5fc55]
|
|
147
|
+
- Updated dependencies [195c428]
|
|
148
|
+
- Updated dependencies [f73e11b]
|
|
149
|
+
- Updated dependencies [37643b8]
|
|
150
|
+
- Updated dependencies [99fd6cf]
|
|
151
|
+
- Updated dependencies [c5bf1ce]
|
|
152
|
+
- Updated dependencies [add596e]
|
|
153
|
+
- Updated dependencies [8dc94d8]
|
|
154
|
+
- Updated dependencies [ecebbeb]
|
|
155
|
+
- Updated dependencies [79d5145]
|
|
156
|
+
- Updated dependencies [12b7002]
|
|
157
|
+
- Updated dependencies [2901125]
|
|
158
|
+
- @mastra/core@0.10.2
|
|
159
|
+
|
|
160
|
+
## 0.10.1-alpha.0
|
|
161
|
+
|
|
162
|
+
### Patch Changes
|
|
163
|
+
|
|
164
|
+
- f0d559f: Fix peerdeps for alpha channel
|
|
165
|
+
- Updated dependencies [1e8bb40]
|
|
166
|
+
- @mastra/core@0.10.2-alpha.2
|
|
167
|
+
|
|
168
|
+
## 0.10.0
|
|
169
|
+
|
|
170
|
+
### Minor Changes
|
|
171
|
+
|
|
172
|
+
- 83da932: Move @mastra/core to peerdeps
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- d0ee3c6: Change all public functions and constructors in vector stores to use named args and prepare to phase out positional args
|
|
177
|
+
- a7292b0: BREAKING(@mastra/core, all vector stores): Vector store breaking changes (remove deprecated functions and positional arguments)
|
|
178
|
+
- Updated dependencies [b3a3d63]
|
|
179
|
+
- Updated dependencies [344f453]
|
|
180
|
+
- Updated dependencies [0a3ae6d]
|
|
181
|
+
- Updated dependencies [95911be]
|
|
182
|
+
- Updated dependencies [f53a6ac]
|
|
183
|
+
- Updated dependencies [5eb5a99]
|
|
184
|
+
- Updated dependencies [7e632c5]
|
|
185
|
+
- Updated dependencies [1e9fbfa]
|
|
186
|
+
- Updated dependencies [eabdcd9]
|
|
187
|
+
- Updated dependencies [90be034]
|
|
188
|
+
- Updated dependencies [99f050a]
|
|
189
|
+
- Updated dependencies [d0ee3c6]
|
|
190
|
+
- Updated dependencies [b2ae5aa]
|
|
191
|
+
- Updated dependencies [23f258c]
|
|
192
|
+
- Updated dependencies [a7292b0]
|
|
193
|
+
- Updated dependencies [0dcb9f0]
|
|
194
|
+
- Updated dependencies [2672a05]
|
|
195
|
+
- @mastra/core@0.10.0
|
|
196
|
+
|
|
197
|
+
## 0.3.0-alpha.1
|
|
198
|
+
|
|
199
|
+
### Minor Changes
|
|
200
|
+
|
|
201
|
+
- 83da932: Move @mastra/core to peerdeps
|
|
202
|
+
|
|
203
|
+
### Patch Changes
|
|
204
|
+
|
|
205
|
+
- a7292b0: BREAKING(@mastra/core, all vector stores): Vector store breaking changes (remove deprecated functions and positional arguments)
|
|
206
|
+
- Updated dependencies [b3a3d63]
|
|
207
|
+
- Updated dependencies [344f453]
|
|
208
|
+
- Updated dependencies [0a3ae6d]
|
|
209
|
+
- Updated dependencies [95911be]
|
|
210
|
+
- Updated dependencies [5eb5a99]
|
|
211
|
+
- Updated dependencies [7e632c5]
|
|
212
|
+
- Updated dependencies [1e9fbfa]
|
|
213
|
+
- Updated dependencies [b2ae5aa]
|
|
214
|
+
- Updated dependencies [a7292b0]
|
|
215
|
+
- Updated dependencies [0dcb9f0]
|
|
216
|
+
- @mastra/core@0.10.0-alpha.1
|
|
217
|
+
|
|
218
|
+
## 0.2.16-alpha.0
|
|
219
|
+
|
|
220
|
+
### Patch Changes
|
|
221
|
+
|
|
222
|
+
- d0ee3c6: Change all public functions and constructors in vector stores to use named args and prepare to phase out positional args
|
|
223
|
+
- Updated dependencies [f53a6ac]
|
|
224
|
+
- Updated dependencies [eabdcd9]
|
|
225
|
+
- Updated dependencies [90be034]
|
|
226
|
+
- Updated dependencies [99f050a]
|
|
227
|
+
- Updated dependencies [d0ee3c6]
|
|
228
|
+
- Updated dependencies [23f258c]
|
|
229
|
+
- Updated dependencies [2672a05]
|
|
230
|
+
- @mastra/core@0.9.5-alpha.0
|
|
231
|
+
|
|
232
|
+
## 0.2.15
|
|
233
|
+
|
|
234
|
+
### Patch Changes
|
|
235
|
+
|
|
236
|
+
- c3bd795: [MASTRA-3358] Deprecate updateIndexById and deleteIndexById
|
|
237
|
+
- Updated dependencies [396be50]
|
|
238
|
+
- Updated dependencies [ab80e7e]
|
|
239
|
+
- Updated dependencies [c3bd795]
|
|
240
|
+
- Updated dependencies [da082f8]
|
|
241
|
+
- Updated dependencies [a5810ce]
|
|
242
|
+
- Updated dependencies [3e9c131]
|
|
243
|
+
- Updated dependencies [3171b5b]
|
|
244
|
+
- Updated dependencies [973e5ac]
|
|
245
|
+
- Updated dependencies [daf942f]
|
|
246
|
+
- Updated dependencies [0b8b868]
|
|
247
|
+
- Updated dependencies [9e1eff5]
|
|
248
|
+
- Updated dependencies [6fa1ad1]
|
|
249
|
+
- Updated dependencies [c28d7a0]
|
|
250
|
+
- Updated dependencies [edf1e88]
|
|
251
|
+
- @mastra/core@0.9.4
|
|
252
|
+
|
|
253
|
+
## 0.2.15-alpha.4
|
|
254
|
+
|
|
255
|
+
### Patch Changes
|
|
256
|
+
|
|
257
|
+
- Updated dependencies [3e9c131]
|
|
258
|
+
- @mastra/core@0.9.4-alpha.4
|
|
259
|
+
|
|
260
|
+
## 0.2.15-alpha.3
|
|
261
|
+
|
|
262
|
+
### Patch Changes
|
|
263
|
+
|
|
264
|
+
- c3bd795: [MASTRA-3358] Deprecate updateIndexById and deleteIndexById
|
|
265
|
+
- Updated dependencies [396be50]
|
|
266
|
+
- Updated dependencies [c3bd795]
|
|
267
|
+
- Updated dependencies [da082f8]
|
|
268
|
+
- Updated dependencies [a5810ce]
|
|
269
|
+
- @mastra/core@0.9.4-alpha.3
|
|
270
|
+
|
|
271
|
+
## 0.2.15-alpha.2
|
|
272
|
+
|
|
273
|
+
### Patch Changes
|
|
274
|
+
|
|
275
|
+
- Updated dependencies [3171b5b]
|
|
276
|
+
- Updated dependencies [973e5ac]
|
|
277
|
+
- Updated dependencies [9e1eff5]
|
|
278
|
+
- @mastra/core@0.9.4-alpha.2
|
|
279
|
+
|
|
280
|
+
## 0.2.15-alpha.1
|
|
281
|
+
|
|
282
|
+
### Patch Changes
|
|
283
|
+
|
|
284
|
+
- Updated dependencies [ab80e7e]
|
|
285
|
+
- Updated dependencies [6fa1ad1]
|
|
286
|
+
- Updated dependencies [c28d7a0]
|
|
287
|
+
- Updated dependencies [edf1e88]
|
|
288
|
+
- @mastra/core@0.9.4-alpha.1
|
|
289
|
+
|
|
290
|
+
## 0.2.15-alpha.0
|
|
291
|
+
|
|
292
|
+
### Patch Changes
|
|
293
|
+
|
|
294
|
+
- Updated dependencies [daf942f]
|
|
295
|
+
- Updated dependencies [0b8b868]
|
|
296
|
+
- @mastra/core@0.9.4-alpha.0
|
|
297
|
+
|
|
298
|
+
## 0.2.14
|
|
299
|
+
|
|
300
|
+
### Patch Changes
|
|
301
|
+
|
|
302
|
+
- 9cd1a46: [MASTRA-3338] update naming scheme for embedding index based on vector store rules and added duplicate index checks
|
|
303
|
+
- Updated dependencies [e450778]
|
|
304
|
+
- Updated dependencies [8902157]
|
|
305
|
+
- Updated dependencies [ca0dc88]
|
|
306
|
+
- Updated dependencies [526c570]
|
|
307
|
+
- Updated dependencies [d7a6a33]
|
|
308
|
+
- Updated dependencies [9cd1a46]
|
|
309
|
+
- Updated dependencies [b5d2de0]
|
|
310
|
+
- Updated dependencies [644f8ad]
|
|
311
|
+
- Updated dependencies [70dbf51]
|
|
312
|
+
- @mastra/core@0.9.3
|
|
313
|
+
|
|
314
|
+
## 0.2.14-alpha.1
|
|
315
|
+
|
|
316
|
+
### Patch Changes
|
|
317
|
+
|
|
318
|
+
- 9cd1a46: [MASTRA-3338] update naming scheme for embedding index based on vector store rules and added duplicate index checks
|
|
319
|
+
- Updated dependencies [e450778]
|
|
320
|
+
- Updated dependencies [8902157]
|
|
321
|
+
- Updated dependencies [ca0dc88]
|
|
322
|
+
- Updated dependencies [9cd1a46]
|
|
323
|
+
- Updated dependencies [70dbf51]
|
|
324
|
+
- @mastra/core@0.9.3-alpha.1
|
|
325
|
+
|
|
326
|
+
## 0.2.14-alpha.0
|
|
327
|
+
|
|
328
|
+
### Patch Changes
|
|
329
|
+
|
|
330
|
+
- Updated dependencies [526c570]
|
|
331
|
+
- Updated dependencies [b5d2de0]
|
|
332
|
+
- Updated dependencies [644f8ad]
|
|
333
|
+
- @mastra/core@0.9.3-alpha.0
|
|
334
|
+
|
|
335
|
+
## 0.2.13
|
|
4
336
|
|
|
5
337
|
### Patch Changes
|
|
6
338
|
|
|
@@ -18,8 +350,20 @@
|
|
|
18
350
|
- Updated dependencies [17826a9]
|
|
19
351
|
- Updated dependencies [7d8b7c7]
|
|
20
352
|
- Updated dependencies [fba031f]
|
|
353
|
+
- Updated dependencies [3a5f1e1]
|
|
21
354
|
- Updated dependencies [51e6923]
|
|
22
|
-
|
|
355
|
+
- Updated dependencies [8398d89]
|
|
356
|
+
- @mastra/core@0.9.2
|
|
357
|
+
|
|
358
|
+
## 0.2.13-alpha.6
|
|
359
|
+
|
|
360
|
+
### Patch Changes
|
|
361
|
+
|
|
362
|
+
- Updated dependencies [6052aa6]
|
|
363
|
+
- Updated dependencies [7d8b7c7]
|
|
364
|
+
- Updated dependencies [3a5f1e1]
|
|
365
|
+
- Updated dependencies [8398d89]
|
|
366
|
+
- @mastra/core@0.9.2-alpha.6
|
|
23
367
|
|
|
24
368
|
## 0.2.13-alpha.5
|
|
25
369
|
|
|
@@ -1029,7 +1373,6 @@
|
|
|
1029
1373
|
### Minor Changes
|
|
1030
1374
|
|
|
1031
1375
|
- 684d5d1: Move Chroma package from `@mastra/vector-chroma` to `@mastra/chroma`.
|
|
1032
|
-
|
|
1033
1376
|
- Move package to `stores/chroma`
|
|
1034
1377
|
- Reorganize source files into `src/vector`
|
|
1035
1378
|
- Add deprecation notice to old package
|
|
@@ -1363,7 +1706,6 @@
|
|
|
1363
1706
|
### Minor Changes
|
|
1364
1707
|
|
|
1365
1708
|
- 684d5d1: Move Chroma package from `@mastra/vector-chroma` to `@mastra/chroma`.
|
|
1366
|
-
|
|
1367
1709
|
- Move package to `stores/chroma`
|
|
1368
1710
|
- Reorganize source files into `src/vector`
|
|
1369
1711
|
- Add deprecation notice to old package
|
package/LICENSE.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
# Apache License 2.0
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Copyright (c) 2025 Kepler Software, Inc.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { BaseFilterTranslator } from '@mastra/core/vector/filter';
|
|
2
|
+
import type { BlacklistedRootOperators } from '@mastra/core/vector/filter';
|
|
2
3
|
import type { CreateIndexParams } from '@mastra/core/vector';
|
|
4
|
+
import type { DeleteIndexParams } from '@mastra/core/vector';
|
|
5
|
+
import type { DeleteVectorParams } from '@mastra/core/vector';
|
|
6
|
+
import type { DescribeIndexParams } from '@mastra/core/vector';
|
|
3
7
|
import type { IndexStats } from '@mastra/core/vector';
|
|
8
|
+
import type { LogicalOperatorValueMap } from '@mastra/core/vector/filter';
|
|
4
9
|
import { MastraVector } from '@mastra/core/vector';
|
|
5
10
|
import type { OperatorSupport } from '@mastra/core/vector/filter';
|
|
6
|
-
import type {
|
|
11
|
+
import type { OperatorValueMap } from '@mastra/core/vector/filter';
|
|
7
12
|
import type { QueryResult } from '@mastra/core/vector';
|
|
8
|
-
import type { QueryVectorArgs } from '@mastra/core/vector';
|
|
9
13
|
import type { QueryVectorParams } from '@mastra/core/vector';
|
|
10
|
-
import type {
|
|
14
|
+
import type { UpdateVectorParams } from '@mastra/core/vector';
|
|
11
15
|
import type { UpsertVectorParams } from '@mastra/core/vector';
|
|
12
16
|
import type { VectorFilter } from '@mastra/core/vector/filter';
|
|
13
17
|
|
|
@@ -19,31 +23,37 @@ declare const CHROMA_PROMPT = "When querying Chroma, you can ONLY use the operat
|
|
|
19
23
|
export { CHROMA_PROMPT }
|
|
20
24
|
export { CHROMA_PROMPT as CHROMA_PROMPT_alias_1 }
|
|
21
25
|
|
|
26
|
+
declare type ChromaBlacklisted = BlacklistedRootOperators | '$nor' | '$not';
|
|
27
|
+
|
|
28
|
+
declare type ChromaDocumentBlacklisted = Exclude<ChromaBlacklisted, '$contains'>;
|
|
29
|
+
|
|
30
|
+
declare type ChromaDocumentOperatorValueMap = ChromaOperatorValueMap;
|
|
31
|
+
|
|
22
32
|
/**
|
|
23
33
|
* Translator for Chroma filter queries.
|
|
24
34
|
* Maintains MongoDB-compatible syntax while ensuring proper validation
|
|
25
35
|
* and normalization of values.
|
|
26
36
|
*/
|
|
27
|
-
export declare class ChromaFilterTranslator extends BaseFilterTranslator {
|
|
37
|
+
export declare class ChromaFilterTranslator extends BaseFilterTranslator<ChromaVectorFilter> {
|
|
28
38
|
protected getSupportedOperators(): OperatorSupport;
|
|
29
|
-
translate(filter?:
|
|
39
|
+
translate(filter?: ChromaVectorFilter): ChromaVectorFilter;
|
|
30
40
|
private translateNode;
|
|
31
41
|
private translateOperator;
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
declare type
|
|
44
|
+
declare type ChromaLogicalOperatorValueMap = Omit<LogicalOperatorValueMap, '$nor' | '$not'>;
|
|
35
45
|
|
|
36
|
-
declare
|
|
37
|
-
documentFilter?: VectorFilter;
|
|
38
|
-
}
|
|
46
|
+
declare type ChromaOperatorValueMap = Omit<OperatorValueMap, '$exists' | '$elemMatch' | '$regex' | '$options'>;
|
|
39
47
|
|
|
40
|
-
declare
|
|
48
|
+
declare interface ChromaQueryVectorParams extends QueryVectorParams<ChromaVectorFilter> {
|
|
49
|
+
documentFilter?: ChromaVectorDocumentFilter;
|
|
50
|
+
}
|
|
41
51
|
|
|
42
52
|
declare interface ChromaUpsertVectorParams extends UpsertVectorParams {
|
|
43
53
|
documents?: string[];
|
|
44
54
|
}
|
|
45
55
|
|
|
46
|
-
declare class ChromaVector extends MastraVector {
|
|
56
|
+
declare class ChromaVector extends MastraVector<ChromaVectorFilter> {
|
|
47
57
|
private client;
|
|
48
58
|
private collections;
|
|
49
59
|
constructor({ path, auth, }: {
|
|
@@ -55,21 +65,38 @@ declare class ChromaVector extends MastraVector {
|
|
|
55
65
|
});
|
|
56
66
|
getCollection(indexName: string, throwIfNotExists?: boolean): Promise<any>;
|
|
57
67
|
private validateVectorDimensions;
|
|
58
|
-
upsert(
|
|
68
|
+
upsert({ indexName, vectors, metadata, ids, documents }: ChromaUpsertVectorParams): Promise<string[]>;
|
|
59
69
|
private HnswSpaceMap;
|
|
60
|
-
createIndex(
|
|
61
|
-
transformFilter(filter?:
|
|
62
|
-
query(
|
|
70
|
+
createIndex({ indexName, dimension, metric }: CreateIndexParams): Promise<void>;
|
|
71
|
+
transformFilter(filter?: ChromaVectorFilter): ChromaVectorFilter;
|
|
72
|
+
query({ indexName, queryVector, topK, filter, includeVector, documentFilter, }: ChromaQueryVectorParams): Promise<QueryResult[]>;
|
|
63
73
|
listIndexes(): Promise<string[]>;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves statistics about a vector index.
|
|
76
|
+
*
|
|
77
|
+
* @param {string} indexName - The name of the index to describe
|
|
78
|
+
* @returns A promise that resolves to the index statistics including dimension, count and metric
|
|
79
|
+
*/
|
|
80
|
+
describeIndex({ indexName }: DescribeIndexParams): Promise<IndexStats>;
|
|
81
|
+
deleteIndex({ indexName }: DeleteIndexParams): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Updates a vector by its ID with the provided vector and/or metadata.
|
|
84
|
+
* @param indexName - The name of the index containing the vector.
|
|
85
|
+
* @param id - The ID of the vector to update.
|
|
86
|
+
* @param update - An object containing the vector and/or metadata to update.
|
|
87
|
+
* @param update.vector - An optional array of numbers representing the new vector.
|
|
88
|
+
* @param update.metadata - An optional record containing the new metadata.
|
|
89
|
+
* @returns A promise that resolves when the update is complete.
|
|
90
|
+
* @throws Will throw an error if no updates are provided or if the update operation fails.
|
|
91
|
+
*/
|
|
92
|
+
updateVector({ indexName, id, update }: UpdateVectorParams): Promise<void>;
|
|
93
|
+
deleteVector({ indexName, id }: DeleteVectorParams): Promise<void>;
|
|
71
94
|
}
|
|
72
95
|
export { ChromaVector }
|
|
73
96
|
export { ChromaVector as ChromaVector_alias_1 }
|
|
74
97
|
|
|
98
|
+
export declare type ChromaVectorDocumentFilter = VectorFilter<keyof ChromaDocumentOperatorValueMap, ChromaDocumentOperatorValueMap, ChromaLogicalOperatorValueMap, ChromaDocumentBlacklisted>;
|
|
99
|
+
|
|
100
|
+
export declare type ChromaVectorFilter = VectorFilter<keyof ChromaOperatorValueMap, ChromaOperatorValueMap, ChromaLogicalOperatorValueMap, ChromaBlacklisted>;
|
|
101
|
+
|
|
75
102
|
export { }
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { BaseFilterTranslator } from '@mastra/core/vector/filter';
|
|
2
|
+
import type { BlacklistedRootOperators } from '@mastra/core/vector/filter';
|
|
2
3
|
import type { CreateIndexParams } from '@mastra/core/vector';
|
|
4
|
+
import type { DeleteIndexParams } from '@mastra/core/vector';
|
|
5
|
+
import type { DeleteVectorParams } from '@mastra/core/vector';
|
|
6
|
+
import type { DescribeIndexParams } from '@mastra/core/vector';
|
|
3
7
|
import type { IndexStats } from '@mastra/core/vector';
|
|
8
|
+
import type { LogicalOperatorValueMap } from '@mastra/core/vector/filter';
|
|
4
9
|
import { MastraVector } from '@mastra/core/vector';
|
|
5
10
|
import type { OperatorSupport } from '@mastra/core/vector/filter';
|
|
6
|
-
import type {
|
|
11
|
+
import type { OperatorValueMap } from '@mastra/core/vector/filter';
|
|
7
12
|
import type { QueryResult } from '@mastra/core/vector';
|
|
8
|
-
import type { QueryVectorArgs } from '@mastra/core/vector';
|
|
9
13
|
import type { QueryVectorParams } from '@mastra/core/vector';
|
|
10
|
-
import type {
|
|
14
|
+
import type { UpdateVectorParams } from '@mastra/core/vector';
|
|
11
15
|
import type { UpsertVectorParams } from '@mastra/core/vector';
|
|
12
16
|
import type { VectorFilter } from '@mastra/core/vector/filter';
|
|
13
17
|
|
|
@@ -19,31 +23,37 @@ declare const CHROMA_PROMPT = "When querying Chroma, you can ONLY use the operat
|
|
|
19
23
|
export { CHROMA_PROMPT }
|
|
20
24
|
export { CHROMA_PROMPT as CHROMA_PROMPT_alias_1 }
|
|
21
25
|
|
|
26
|
+
declare type ChromaBlacklisted = BlacklistedRootOperators | '$nor' | '$not';
|
|
27
|
+
|
|
28
|
+
declare type ChromaDocumentBlacklisted = Exclude<ChromaBlacklisted, '$contains'>;
|
|
29
|
+
|
|
30
|
+
declare type ChromaDocumentOperatorValueMap = ChromaOperatorValueMap;
|
|
31
|
+
|
|
22
32
|
/**
|
|
23
33
|
* Translator for Chroma filter queries.
|
|
24
34
|
* Maintains MongoDB-compatible syntax while ensuring proper validation
|
|
25
35
|
* and normalization of values.
|
|
26
36
|
*/
|
|
27
|
-
export declare class ChromaFilterTranslator extends BaseFilterTranslator {
|
|
37
|
+
export declare class ChromaFilterTranslator extends BaseFilterTranslator<ChromaVectorFilter> {
|
|
28
38
|
protected getSupportedOperators(): OperatorSupport;
|
|
29
|
-
translate(filter?:
|
|
39
|
+
translate(filter?: ChromaVectorFilter): ChromaVectorFilter;
|
|
30
40
|
private translateNode;
|
|
31
41
|
private translateOperator;
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
declare type
|
|
44
|
+
declare type ChromaLogicalOperatorValueMap = Omit<LogicalOperatorValueMap, '$nor' | '$not'>;
|
|
35
45
|
|
|
36
|
-
declare
|
|
37
|
-
documentFilter?: VectorFilter;
|
|
38
|
-
}
|
|
46
|
+
declare type ChromaOperatorValueMap = Omit<OperatorValueMap, '$exists' | '$elemMatch' | '$regex' | '$options'>;
|
|
39
47
|
|
|
40
|
-
declare
|
|
48
|
+
declare interface ChromaQueryVectorParams extends QueryVectorParams<ChromaVectorFilter> {
|
|
49
|
+
documentFilter?: ChromaVectorDocumentFilter;
|
|
50
|
+
}
|
|
41
51
|
|
|
42
52
|
declare interface ChromaUpsertVectorParams extends UpsertVectorParams {
|
|
43
53
|
documents?: string[];
|
|
44
54
|
}
|
|
45
55
|
|
|
46
|
-
declare class ChromaVector extends MastraVector {
|
|
56
|
+
declare class ChromaVector extends MastraVector<ChromaVectorFilter> {
|
|
47
57
|
private client;
|
|
48
58
|
private collections;
|
|
49
59
|
constructor({ path, auth, }: {
|
|
@@ -55,21 +65,38 @@ declare class ChromaVector extends MastraVector {
|
|
|
55
65
|
});
|
|
56
66
|
getCollection(indexName: string, throwIfNotExists?: boolean): Promise<any>;
|
|
57
67
|
private validateVectorDimensions;
|
|
58
|
-
upsert(
|
|
68
|
+
upsert({ indexName, vectors, metadata, ids, documents }: ChromaUpsertVectorParams): Promise<string[]>;
|
|
59
69
|
private HnswSpaceMap;
|
|
60
|
-
createIndex(
|
|
61
|
-
transformFilter(filter?:
|
|
62
|
-
query(
|
|
70
|
+
createIndex({ indexName, dimension, metric }: CreateIndexParams): Promise<void>;
|
|
71
|
+
transformFilter(filter?: ChromaVectorFilter): ChromaVectorFilter;
|
|
72
|
+
query({ indexName, queryVector, topK, filter, includeVector, documentFilter, }: ChromaQueryVectorParams): Promise<QueryResult[]>;
|
|
63
73
|
listIndexes(): Promise<string[]>;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves statistics about a vector index.
|
|
76
|
+
*
|
|
77
|
+
* @param {string} indexName - The name of the index to describe
|
|
78
|
+
* @returns A promise that resolves to the index statistics including dimension, count and metric
|
|
79
|
+
*/
|
|
80
|
+
describeIndex({ indexName }: DescribeIndexParams): Promise<IndexStats>;
|
|
81
|
+
deleteIndex({ indexName }: DeleteIndexParams): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Updates a vector by its ID with the provided vector and/or metadata.
|
|
84
|
+
* @param indexName - The name of the index containing the vector.
|
|
85
|
+
* @param id - The ID of the vector to update.
|
|
86
|
+
* @param update - An object containing the vector and/or metadata to update.
|
|
87
|
+
* @param update.vector - An optional array of numbers representing the new vector.
|
|
88
|
+
* @param update.metadata - An optional record containing the new metadata.
|
|
89
|
+
* @returns A promise that resolves when the update is complete.
|
|
90
|
+
* @throws Will throw an error if no updates are provided or if the update operation fails.
|
|
91
|
+
*/
|
|
92
|
+
updateVector({ indexName, id, update }: UpdateVectorParams): Promise<void>;
|
|
93
|
+
deleteVector({ indexName, id }: DeleteVectorParams): Promise<void>;
|
|
71
94
|
}
|
|
72
95
|
export { ChromaVector }
|
|
73
96
|
export { ChromaVector as ChromaVector_alias_1 }
|
|
74
97
|
|
|
98
|
+
export declare type ChromaVectorDocumentFilter = VectorFilter<keyof ChromaDocumentOperatorValueMap, ChromaDocumentOperatorValueMap, ChromaLogicalOperatorValueMap, ChromaDocumentBlacklisted>;
|
|
99
|
+
|
|
100
|
+
export declare type ChromaVectorFilter = VectorFilter<keyof ChromaOperatorValueMap, ChromaOperatorValueMap, ChromaLogicalOperatorValueMap, ChromaBlacklisted>;
|
|
101
|
+
|
|
75
102
|
export { }
|