@@ -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 )  { 
@@ -201,16 +201,16 @@ export const legacyVectors = {
201201          Object . keys ( config ) . length  ===  0 
202202            ? undefined 
203203            : { 
204-                  ...config , 
205-                  audioFields : audioFields ?. map ( ( f )  =>  f . name ) , 
206-                  depthFields : depthFields ?. map ( ( f )  =>  f . name ) , 
207-                  imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
208-                  IMUFields : IMUFields ?. map ( ( f )  =>  f . name ) , 
209-                  textFields : textFields ?. map ( ( f )  =>  f . name ) , 
210-                  thermalFields : thermalFields ?. map ( ( f )  =>  f . name ) , 
211-                  videoFields : videoFields ?. map ( ( f )  =>  f . name ) , 
212-                  weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
213-                } , 
204+               ...config , 
205+               audioFields : audioFields ?. map ( ( f )  =>  f . name ) , 
206+               depthFields : depthFields ?. map ( ( f )  =>  f . name ) , 
207+               imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
208+               IMUFields : IMUFields ?. map ( ( f )  =>  f . name ) , 
209+               textFields : textFields ?. map ( ( f )  =>  f . name ) , 
210+               thermalFields : thermalFields ?. map ( ( f )  =>  f . name ) , 
211+               videoFields : videoFields ?. map ( ( f )  =>  f . name ) , 
212+               weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
213+             } , 
214214      } , 
215215    } ) ; 
216216  } , 
@@ -240,11 +240,11 @@ export const legacyVectors = {
240240          Object . keys ( config ) . length  ===  0 
241241            ? undefined 
242242            : { 
243-                  ...config , 
244-                  imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
245-                  textFields : textFields ?. map ( ( f )  =>  f . name ) , 
246-                  weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
247-                } , 
243+               ...config , 
244+               imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
245+               textFields : textFields ?. map ( ( f )  =>  f . name ) , 
246+               weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
247+             } , 
248248      } , 
249249    } ) ; 
250250  } , 
@@ -274,11 +274,11 @@ export const legacyVectors = {
274274          Object . keys ( config ) . length  ===  0 
275275            ? undefined 
276276            : { 
277-                  ...config , 
278-                  imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
279-                  textFields : textFields ?. map ( ( f )  =>  f . name ) , 
280-                  weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
281-                } , 
277+               ...config , 
278+               imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
279+               textFields : textFields ?. map ( ( f )  =>  f . name ) , 
280+               weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
281+             } , 
282282      } , 
283283    } ) ; 
284284  } , 
@@ -309,11 +309,11 @@ export const legacyVectors = {
309309          Object . keys ( config ) . length  ===  0 
310310            ? undefined 
311311            : { 
312-                  ...config , 
313-                  imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
314-                  textFields : textFields ?. map ( ( f )  =>  f . name ) , 
315-                  weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
316-                } , 
312+               ...config , 
313+               imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
314+               textFields : textFields ?. map ( ( f )  =>  f . name ) , 
315+               weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
316+             } , 
317317      } , 
318318    } ) ; 
319319  } , 
@@ -413,11 +413,11 @@ export const legacyVectors = {
413413          Object . keys ( config ) . length  ===  0 
414414            ? undefined 
415415            : { 
416-                  ...config , 
417-                  imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
418-                  textFields : textFields ?. map ( ( f )  =>  f . name ) , 
419-                  weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
420-                } , 
416+               ...config , 
417+               imageFields : imageFields ?. map ( ( f )  =>  f . name ) , 
418+               textFields : textFields ?. map ( ( f )  =>  f . name ) , 
419+               weights : Object . keys ( weights ) . length  ===  0  ? undefined  : weights , 
420+             } , 
421421      } , 
422422    } ) ; 
423423  } , 
@@ -813,8 +813,10 @@ export const legacyVectors = {
813813  } , 
814814} ; 
815815
816- /** __vectors_shaded hide `vectorizeCollectionName` parameter from all constructors in `legacyVectors` where it was previously accepted. 
817-  * 
816+ /** __vectors_shaded modifies some parameters in legacy vectorizer configuration. 
817+   * 
818+   * - Hide `vectorizeCollectionName` parameter from all constructors in `legacyVectors` where it was previously accepted. 
819+   * - Rename `modelId` to `model` for `text2vec-google` and `multi2vec-google` vectorizers. 
818820 * */ 
819821// eslint-disable-next-line @typescript-eslint/naming-convention 
820822const  __vectors_shaded  =  { 
@@ -834,8 +836,11 @@ const __vectors_shaded = {
834836    opts ?: Omit < ConfigureTextVectorizerOptions < T ,  N ,  I ,  'text2vec-voyageai' > ,  'vectorizeCollectionName' > 
835837  )  =>  legacyVectors . text2VecVoyageAI ( opts ) , 
836838  text2VecGoogle : < T ,  N  extends  string  |  undefined  =  undefined ,  I  extends  VectorIndexType  =  'hnsw' > ( 
837-     opts ?: Omit < ConfigureTextVectorizerOptions < T ,  N ,  I ,  'text2vec-google' > ,  'vectorizeCollectionName' > 
838-   )  =>  legacyVectors . text2VecGoogle ( opts ) , 
839+     opts ?: Omit < ConfigureTextVectorizerOptions < T ,  N ,  I ,  'text2vec-google' > ,  'vectorizeCollectionName' >  &  { 
840+       model ?: string ; 
841+       modelId ?: never ;  // hard-deprecated in `vectors` 
842+     } 
843+   )  =>  legacyVectors . text2VecGoogle ( {  ...opts ,  modelId : opts ?. modelId  ||  opts ?. model  } ) , 
839844  text2VecOpenAI : < T ,  N  extends  string  |  undefined  =  undefined ,  I  extends  VectorIndexType  =  'hnsw' > ( 
840845    opts ?: Omit < ConfigureTextVectorizerOptions < T ,  N ,  I ,  'text2vec-openai' > ,  'vectorizeCollectionName' > 
841846  )  =>  legacyVectors . text2VecOpenAI ( opts ) , 
@@ -879,8 +884,11 @@ const __vectors_shaded = {
879884    opts ?: Omit < ConfigureNonTextVectorizerOptions < N ,  I ,  'multi2vec-jinaai' > ,  'vectorizeCollectionName' > 
880885  )  =>  legacyVectors . multi2VecJinaAI ( opts ) , 
881886  multi2VecGoogle : < N  extends  string  |  undefined  =  undefined ,  I  extends  VectorIndexType  =  'hnsw' > ( 
882-     opts : Omit < ConfigureNonTextVectorizerOptions < N ,  I ,  'multi2vec-google' > ,  'vectorizeCollectionName' > 
883-   )  =>  legacyVectors . multi2VecGoogle ( opts ) , 
887+     opts : Omit < ConfigureNonTextVectorizerOptions < N ,  I ,  'multi2vec-google' > ,  'vectorizeCollectionName' >  &  { 
888+       model ?: string ; 
889+       modelId ?: never ;  // hard-deprecated in `vectors` 
890+     } 
891+   )  =>  legacyVectors . multi2VecGoogle ( {  ...opts ,  modelId : opts . modelId  ||  opts . model  } ) , 
884892  multi2VecVoyageAI : < N  extends  string  |  undefined  =  undefined ,  I  extends  VectorIndexType  =  'hnsw' > ( 
885893    opts ?: Omit < ConfigureNonTextVectorizerOptions < N ,  I ,  'multi2vec-voyageai' > ,  'vectorizeCollectionName' > 
886894  )  =>  legacyVectors . multi2VecVoyageAI ( opts ) , 
@@ -891,7 +899,10 @@ const __vectors_shaded = {
891899 * @deprecated  Use `vectors` instead. */ 
892900export  const  vectorizer  =  legacyVectors ; 
893901
894- export  const  vectors  =  {  ...legacyVectors ,  ...__vectors_shaded  } ; 
902+ // Remove deprecated vectorizers and module configuration parameters: 
903+ // - PaLM vectorizers are called -Google now. 
904+ // - __vectors_shaded hide/rename some parameters 
905+ export  const  vectors  =  ( ( {  text2VecPalm,  multi2VecPalm,  ...rest  } )  =>  ( {  ...rest ,  ...__vectors_shaded  } ) ) ( legacyVectors ) ; 
895906
896907export  const  multiVectors  =  { 
897908  /** 
0 commit comments