Skip to content

Commit e668b7f

Browse files
committed
chore: lint & format
1 parent 9f8b52c commit e668b7f

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

src/collections/configure/unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
RerankerVoyageAIConfig,
2121
VectorConfigCreate,
2222
} from '../types/index.js';
23-
import { configure, vectorizer } from './index.js';
23+
import { configure } from './index.js';
2424
import {
2525
InvertedIndexConfigCreate,
2626
MultiTenancyConfigCreate,

src/collections/configure/vectorizer.ts

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ const makeVectorIndex = (opts?: {
3737
}
3838
conf = conf
3939
? {
40-
...conf,
41-
multiVector: conf.multiVector
42-
? {
43-
...conf.multiVector,
44-
encoding: conf.multiVector.encoding
45-
? { ...conf.multiVector.encoding, ...opts.encoding }
46-
: opts.encoding,
47-
}
48-
: vectorIndex.multiVector.multiVector({ encoding: opts.encoding }),
49-
}
40+
...conf,
41+
multiVector: conf.multiVector
42+
? {
43+
...conf.multiVector,
44+
encoding: conf.multiVector.encoding
45+
? { ...conf.multiVector.encoding, ...opts.encoding }
46+
: opts.encoding,
47+
}
48+
: vectorIndex.multiVector.multiVector({ encoding: opts.encoding }),
49+
}
5050
: {
51-
multiVector: vectorIndex.multiVector.multiVector({ encoding: opts.encoding }),
52-
type: 'hnsw',
53-
};
51+
multiVector: vectorIndex.multiVector.multiVector({ encoding: opts.encoding }),
52+
type: 'hnsw',
53+
};
5454
}
5555
if (opts?.quantizer) {
5656
if (!conf) {
@@ -117,8 +117,8 @@ const formatMulti2VecFields = (
117117
/** Previously all text-based vectorizers accepted `vectorizeCollectionName` parameter, which was meaningless for some modules and caused others to produce confusing results (see details below). Moving forward, we want to deprecate the usage of this parameter.
118118
*
119119
* Collections with `vectorizeCollectionName: true` generate embeddings even if they have no vectorizeable properties. This means all generated embeddings would embed the collection name itself, which makes them rather meaningless.
120-
*
121-
* @deprecated Use `vectors` instead.
120+
*
121+
* @deprecated Use `vectors` instead.
122122
* */
123123
export const legacyVectors = {
124124
/**
@@ -190,16 +190,16 @@ export const legacyVectors = {
190190
Object.keys(config).length === 0
191191
? undefined
192192
: {
193-
...config,
194-
audioFields: audioFields?.map((f) => f.name),
195-
depthFields: depthFields?.map((f) => f.name),
196-
imageFields: imageFields?.map((f) => f.name),
197-
IMUFields: IMUFields?.map((f) => f.name),
198-
textFields: textFields?.map((f) => f.name),
199-
thermalFields: thermalFields?.map((f) => f.name),
200-
videoFields: videoFields?.map((f) => f.name),
201-
weights: Object.keys(weights).length === 0 ? undefined : weights,
202-
},
193+
...config,
194+
audioFields: audioFields?.map((f) => f.name),
195+
depthFields: depthFields?.map((f) => f.name),
196+
imageFields: imageFields?.map((f) => f.name),
197+
IMUFields: IMUFields?.map((f) => f.name),
198+
textFields: textFields?.map((f) => f.name),
199+
thermalFields: thermalFields?.map((f) => f.name),
200+
videoFields: videoFields?.map((f) => f.name),
201+
weights: Object.keys(weights).length === 0 ? undefined : weights,
202+
},
203203
},
204204
});
205205
},
@@ -229,11 +229,11 @@ export const legacyVectors = {
229229
Object.keys(config).length === 0
230230
? undefined
231231
: {
232-
...config,
233-
imageFields: imageFields?.map((f) => f.name),
234-
textFields: textFields?.map((f) => f.name),
235-
weights: Object.keys(weights).length === 0 ? undefined : weights,
236-
},
232+
...config,
233+
imageFields: imageFields?.map((f) => f.name),
234+
textFields: textFields?.map((f) => f.name),
235+
weights: Object.keys(weights).length === 0 ? undefined : weights,
236+
},
237237
},
238238
});
239239
},
@@ -263,11 +263,11 @@ export const legacyVectors = {
263263
Object.keys(config).length === 0
264264
? undefined
265265
: {
266-
...config,
267-
imageFields: imageFields?.map((f) => f.name),
268-
textFields: textFields?.map((f) => f.name),
269-
weights: Object.keys(weights).length === 0 ? undefined : weights,
270-
},
266+
...config,
267+
imageFields: imageFields?.map((f) => f.name),
268+
textFields: textFields?.map((f) => f.name),
269+
weights: Object.keys(weights).length === 0 ? undefined : weights,
270+
},
271271
},
272272
});
273273
},
@@ -298,11 +298,11 @@ export const legacyVectors = {
298298
Object.keys(config).length === 0
299299
? undefined
300300
: {
301-
...config,
302-
imageFields: imageFields?.map((f) => f.name),
303-
textFields: textFields?.map((f) => f.name),
304-
weights: Object.keys(weights).length === 0 ? undefined : weights,
305-
},
301+
...config,
302+
imageFields: imageFields?.map((f) => f.name),
303+
textFields: textFields?.map((f) => f.name),
304+
weights: Object.keys(weights).length === 0 ? undefined : weights,
305+
},
306306
},
307307
});
308308
},
@@ -402,11 +402,11 @@ export const legacyVectors = {
402402
Object.keys(config).length === 0
403403
? undefined
404404
: {
405-
...config,
406-
imageFields: imageFields?.map((f) => f.name),
407-
textFields: textFields?.map((f) => f.name),
408-
weights: Object.keys(weights).length === 0 ? undefined : weights,
409-
},
405+
...config,
406+
imageFields: imageFields?.map((f) => f.name),
407+
textFields: textFields?.map((f) => f.name),
408+
weights: Object.keys(weights).length === 0 ? undefined : weights,
409+
},
410410
},
411411
});
412412
},

0 commit comments

Comments
 (0)