33 ModuleConfig ,
44 Multi2VecField ,
55 Ref2VecCentroidConfig ,
6+ Text2MultiVecJinaAIConfig ,
67 Text2VecAWSConfig ,
78 Text2VecAzureOpenAIConfig ,
89 Text2VecCohereConfig ,
@@ -24,9 +25,16 @@ import {
2425 VectorizerConfigType ,
2526} from '../../config/types/index.js' ;
2627import { PrimitiveKeys } from '../../types/internal.js' ;
27- import { VectorIndexConfigCreateType , VectorIndexConfigUpdateType } from './vectorIndex.js' ;
28+ import {
29+ MultiVectorEncodingConfigCreate ,
30+ QuantizerConfigCreate ,
31+ VectorIndexConfigCreateType ,
32+ VectorIndexConfigUpdateType ,
33+ } from './vectorIndex.js' ;
2834
2935export type VectorizerCreateOptions < P , I , V > = {
36+ encoding ?: MultiVectorEncodingConfigCreate ;
37+ quantizer ?: QuantizerConfigCreate ;
3038 sourceProperties ?: P ;
3139 vectorIndexConfig ?: ModuleConfig < I , VectorIndexConfigCreateType < I > > ;
3240 vectorizerConfig ?: ModuleConfig < V , VectorizerConfigType < V > > ;
@@ -72,6 +80,7 @@ export type ConfigureNonTextVectorizerOptions<
7280 V extends Vectorizer
7381> = VectorizerConfigCreateType < V > & {
7482 name ?: N ;
83+ quantizer ?: QuantizerConfigCreate ;
7584 vectorIndexConfig ?: ModuleConfig < I , VectorIndexConfigCreateType < I > > ;
7685} ;
7786
@@ -80,10 +89,25 @@ export type ConfigureTextVectorizerOptions<
8089 N extends string | undefined ,
8190 I extends VectorIndexType ,
8291 V extends Vectorizer
83- > = VectorizerConfigCreateType < V > & {
84- name ?: N ;
92+ > = ConfigureNonTextVectorizerOptions < N , I , V > & {
8593 sourceProperties ?: PrimitiveKeys < T > [ ] ;
86- vectorIndexConfig ?: ModuleConfig < I , VectorIndexConfigCreateType < I > > ;
94+ } ;
95+
96+ export type ConfigureNonTextMultiVectorizerOptions <
97+ N extends string | undefined ,
98+ I extends VectorIndexType ,
99+ V extends Vectorizer
100+ > = ConfigureNonTextVectorizerOptions < N , I , V > & {
101+ encoding ?: MultiVectorEncodingConfigCreate ;
102+ } ;
103+
104+ export type ConfigureTextMultiVectorizerOptions <
105+ T ,
106+ N extends string | undefined ,
107+ I extends VectorIndexType ,
108+ V extends Vectorizer
109+ > = ConfigureTextVectorizerOptions < T , N , I , V > & {
110+ encoding ?: MultiVectorEncodingConfigCreate ;
87111} ;
88112
89113export type Img2VecNeuralConfigCreate = Img2VecNeuralConfig ;
@@ -226,6 +250,8 @@ export type Text2VecVoyageAIConfigCreate = Text2VecVoyageAIConfig;
226250
227251export type Text2VecWeaviateConfigCreate = Text2VecWeaviateConfig ;
228252
253+ export type Text2MultiVecJinaAIConfigCreate = Text2MultiVecJinaAIConfig ;
254+
229255export type VectorizerConfigCreateType < V > = V extends 'img2vec-neural'
230256 ? Img2VecNeuralConfigCreate | undefined
231257 : V extends 'multi2vec-clip'
@@ -278,6 +304,8 @@ export type VectorizerConfigCreateType<V> = V extends 'img2vec-neural'
278304 ? Text2VecVoyageAIConfigCreate | undefined
279305 : V extends 'text2vec-weaviate'
280306 ? Text2VecWeaviateConfigCreate | undefined
307+ : V extends 'text2multivec-jinaai'
308+ ? Text2MultiVecJinaAIConfigCreate | undefined
281309 : V extends 'none'
282310 ? { }
283311 : V extends undefined
0 commit comments