Skip to content

Commit 84566f6

Browse files
authored
feat: add dimensions property to Text2VecVoyageAIConfig and update tests (#363)
1 parent 92ef31b commit 84566f6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/collections/config/types/vectorizer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,8 @@ export type Text2VecVoyageAIConfig = {
590590
truncate?: boolean;
591591
/** Whether to vectorize the collection name. */
592592
vectorizeCollectionName?: boolean;
593+
/** The number of dimensions for the generated embeddings. */
594+
dimensions?: number;
593595
};
594596

595597
/**

src/collections/configure/unit.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,6 +1546,7 @@ describe('Unit testing of the vectorizer factory class', () => {
15461546
baseURL: 'base-url',
15471547
model: 'model',
15481548
truncate: true,
1549+
dimensions: 256,
15491550
});
15501551
expect(config).toEqual<VectorConfigCreate<never, 'test', 'hnsw', 'text2vec-voyageai'>>({
15511552
name: 'test',
@@ -1559,6 +1560,7 @@ describe('Unit testing of the vectorizer factory class', () => {
15591560
baseURL: 'base-url',
15601561
model: 'model',
15611562
truncate: true,
1563+
dimensions: 256,
15621564
},
15631565
},
15641566
});

0 commit comments

Comments
 (0)