Skip to content

Commit 817453b

Browse files
committed
Update reconfigure.vectorizer to be deprecated too
1 parent a94914d commit 817453b

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/collections/configure/index.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const configure = {
6060
generative,
6161
reranker,
6262
/**
63-
* @deprecated Use `vectors` or `multiVectors` instead.
63+
* @deprecated Use `vectors` instead.
6464
*/
6565
vectorizer,
6666
vectors: vectorizer,
@@ -223,6 +223,9 @@ const reconfigure = {
223223
: undefined,
224224
};
225225
},
226+
/**
227+
* @deprecated Use `vectors` instead.
228+
*/
226229
vectorizer: {
227230
/**
228231
* Create a `VectorConfigUpdate` object to be used when updating the named vector configuration of Weaviate.
@@ -239,6 +242,22 @@ const reconfigure = {
239242
};
240243
},
241244
},
245+
vectors: {
246+
/**
247+
* Create a `VectorConfigUpdate` object to be used when updating the named vector configuration of Weaviate.
248+
*
249+
* @param {string} name The name of the vector.
250+
* @param {VectorizerOptions} options The options for the named vector.
251+
*/
252+
update: <N extends string | undefined, I extends VectorIndexType>(
253+
options: VectorizerUpdateOptions<N, I>
254+
): VectorConfigUpdate<N, I> => {
255+
return {
256+
name: options?.name as N,
257+
vectorIndex: options.vectorIndexConfig,
258+
};
259+
},
260+
},
242261
/**
243262
* Create a `ReplicationConfigUpdate` object to be used when updating the replication configuration of Weaviate.
244263
*

0 commit comments

Comments
 (0)