From 840ba41e9281b9c4606cb8c34f7d26a7b1a354d7 Mon Sep 17 00:00:00 2001 From: JP Hwang Date: Mon, 17 Nov 2025 17:33:53 +0000 Subject: [PATCH] feat: add dimensions property to Text2VecVoyageAIConfig and update tests --- src/collections/config/types/vectorizer.ts | 2 ++ src/collections/configure/unit.test.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/collections/config/types/vectorizer.ts b/src/collections/config/types/vectorizer.ts index ed75f606..0c403531 100644 --- a/src/collections/config/types/vectorizer.ts +++ b/src/collections/config/types/vectorizer.ts @@ -586,6 +586,8 @@ export type Text2VecVoyageAIConfig = { truncate?: boolean; /** Whether to vectorize the collection name. */ vectorizeCollectionName?: boolean; + /** The number of dimensions for the generated embeddings. */ + dimensions?: number; }; /** diff --git a/src/collections/configure/unit.test.ts b/src/collections/configure/unit.test.ts index 30ec320d..76018fb8 100644 --- a/src/collections/configure/unit.test.ts +++ b/src/collections/configure/unit.test.ts @@ -1542,6 +1542,7 @@ describe('Unit testing of the vectorizer factory class', () => { baseURL: 'base-url', model: 'model', truncate: true, + dimensions: 256, }); expect(config).toEqual>({ name: 'test', @@ -1555,6 +1556,7 @@ describe('Unit testing of the vectorizer factory class', () => { baseURL: 'base-url', model: 'model', truncate: true, + dimensions: 256, }, }, });