Skip to content

Commit 12702c1

Browse files
committed
chore: lint & format
1 parent 7869378 commit 12702c1

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

src/collections/configure/vectorizer.ts

Lines changed: 43 additions & 43 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) {
@@ -184,16 +184,16 @@ export const vectors = {
184184
Object.keys(config).length === 0
185185
? undefined
186186
: {
187-
...config,
188-
audioFields: audioFields?.map((f) => f.name),
189-
depthFields: depthFields?.map((f) => f.name),
190-
imageFields: imageFields?.map((f) => f.name),
191-
IMUFields: IMUFields?.map((f) => f.name),
192-
textFields: textFields?.map((f) => f.name),
193-
thermalFields: thermalFields?.map((f) => f.name),
194-
videoFields: videoFields?.map((f) => f.name),
195-
weights: Object.keys(weights).length === 0 ? undefined : weights,
196-
},
187+
...config,
188+
audioFields: audioFields?.map((f) => f.name),
189+
depthFields: depthFields?.map((f) => f.name),
190+
imageFields: imageFields?.map((f) => f.name),
191+
IMUFields: IMUFields?.map((f) => f.name),
192+
textFields: textFields?.map((f) => f.name),
193+
thermalFields: thermalFields?.map((f) => f.name),
194+
videoFields: videoFields?.map((f) => f.name),
195+
weights: Object.keys(weights).length === 0 ? undefined : weights,
196+
},
197197
},
198198
});
199199
},
@@ -223,11 +223,11 @@ export const vectors = {
223223
Object.keys(config).length === 0
224224
? undefined
225225
: {
226-
...config,
227-
imageFields: imageFields?.map((f) => f.name),
228-
textFields: textFields?.map((f) => f.name),
229-
weights: Object.keys(weights).length === 0 ? undefined : weights,
230-
},
226+
...config,
227+
imageFields: imageFields?.map((f) => f.name),
228+
textFields: textFields?.map((f) => f.name),
229+
weights: Object.keys(weights).length === 0 ? undefined : weights,
230+
},
231231
},
232232
});
233233
},
@@ -257,11 +257,11 @@ export const vectors = {
257257
Object.keys(config).length === 0
258258
? undefined
259259
: {
260-
...config,
261-
imageFields: imageFields?.map((f) => f.name),
262-
textFields: textFields?.map((f) => f.name),
263-
weights: Object.keys(weights).length === 0 ? undefined : weights,
264-
},
260+
...config,
261+
imageFields: imageFields?.map((f) => f.name),
262+
textFields: textFields?.map((f) => f.name),
263+
weights: Object.keys(weights).length === 0 ? undefined : weights,
264+
},
265265
},
266266
});
267267
},
@@ -292,11 +292,11 @@ export const vectors = {
292292
Object.keys(config).length === 0
293293
? undefined
294294
: {
295-
...config,
296-
imageFields: imageFields?.map((f) => f.name),
297-
textFields: textFields?.map((f) => f.name),
298-
weights: Object.keys(weights).length === 0 ? undefined : weights,
299-
},
295+
...config,
296+
imageFields: imageFields?.map((f) => f.name),
297+
textFields: textFields?.map((f) => f.name),
298+
weights: Object.keys(weights).length === 0 ? undefined : weights,
299+
},
300300
},
301301
});
302302
},
@@ -396,11 +396,11 @@ export const vectors = {
396396
Object.keys(config).length === 0
397397
? undefined
398398
: {
399-
...config,
400-
imageFields: imageFields?.map((f) => f.name),
401-
textFields: textFields?.map((f) => f.name),
402-
weights: Object.keys(weights).length === 0 ? undefined : weights,
403-
},
399+
...config,
400+
imageFields: imageFields?.map((f) => f.name),
401+
textFields: textFields?.map((f) => f.name),
402+
weights: Object.keys(weights).length === 0 ? undefined : weights,
403+
},
404404
},
405405
});
406406
},

0 commit comments

Comments
 (0)