Skip to content

Commit 3a6760a

Browse files
committed
Rename from jina to jinaai
1 parent ce5ec5d commit 3a6760a

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

src/collections/config/types/vectorizer.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export type Vectorizer =
2424
| 'multi2vec-bind'
2525
| Multi2VecPalmVectorizer
2626
| 'multi2vec-google'
27-
| 'multi2vec-jina'
27+
| 'multi2vec-jinaai'
2828
| 'multi2vec-voyageai'
2929
| 'ref2vec-centroid'
3030
| 'text2vec-aws'
@@ -190,7 +190,7 @@ export type Multi2VecGoogleConfig = {
190190
*
191191
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/jinaai/embeddings-multimodal) for detailed usage.
192192
*/
193-
export type Multi2VecJinaConfig = {
193+
export type Multi2VecJinaAIConfig = {
194194
/** The base URL to use where API requests should go. */
195195
baseURL?: string;
196196
/** The dimensionality of the vector once embedded. */
@@ -476,6 +476,7 @@ export type VectorizerConfig =
476476
| Multi2VecClipConfig
477477
| Multi2VecBindConfig
478478
| Multi2VecGoogleConfig
479+
| Multi2VecJinaAIConfig
479480
| Multi2VecPalmConfig
480481
| Multi2VecVoyageAIConfig
481482
| Ref2VecCentroidConfig
@@ -505,8 +506,8 @@ export type VectorizerConfigType<V> = V extends 'img2vec-neural'
505506
? Multi2VecBindConfig | undefined
506507
: V extends 'multi2vec-google'
507508
? Multi2VecGoogleConfig
508-
: V extends 'multi2vec-jina'
509-
? Multi2VecJinaConfig | undefined
509+
: V extends 'multi2vec-jinaai'
510+
? Multi2VecJinaAIConfig | undefined
510511
: V extends Multi2VecPalmVectorizer
511512
? Multi2VecPalmConfig
512513
: V extends 'multi2vec-voyageai'

src/collections/configure/types/vectorizer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export type Multi2VecCohereConfigCreate = {
127127
vectorizeCollectionName?: boolean;
128128
};
129129

130-
export type Multi2VecJinaConfigCreate = {
130+
export type Multi2VecJinaAIConfigCreate = {
131131
/** The base URL to use where API requests should go. */
132132
baseURL?: string;
133133
/** The dimensionality of the vector once embedded. */
@@ -213,8 +213,8 @@ export type VectorizerConfigCreateType<V> = V extends 'img2vec-neural'
213213
? Multi2VecCohereConfigCreate | undefined
214214
: V extends 'multi2vec-bind'
215215
? Multi2VecBindConfigCreate | undefined
216-
: V extends 'multi2vec-jina'
217-
? Multi2VecJinaConfigCreate | undefined
216+
: V extends 'multi2vec-jinaai'
217+
? Multi2VecJinaAIConfigCreate | undefined
218218
: V extends 'multi2vec-palm'
219219
? Multi2VecPalmConfigCreate
220220
: V extends 'multi2vec-google'

src/collections/configure/unit.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -621,22 +621,22 @@ describe('Unit testing of the vectorizer factory class', () => {
621621
},
622622
});
623623
});
624-
it('should create the correct Multi2VecJinaConfig type with defaults', () => {
625-
const config = configure.vectorizer.multi2VecJina();
626-
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'multi2vec-jina'>>({
624+
it('should create the correct Multi2VecJinaAIConfig type with defaults', () => {
625+
const config = configure.vectorizer.multi2VecJinaAI();
626+
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'multi2vec-jinaai'>>({
627627
name: undefined,
628628
vectorIndex: {
629629
name: 'hnsw',
630630
config: undefined,
631631
},
632632
vectorizer: {
633-
name: 'multi2vec-jina',
633+
name: 'multi2vec-jinaai',
634634
config: undefined,
635635
},
636636
});
637637
});
638-
it('should create the correct Multi2VecJinaConfig type with all values and weights', () => {
639-
const config = configure.vectorizer.multi2VecJina({
638+
it('should create the correct Multi2VecJinaAIConfig type with all values and weights', () => {
639+
const config = configure.vectorizer.multi2VecJinaAI({
640640
name: 'test',
641641
imageFields: [
642642
{ name: 'field1', weight: 0.1 },
@@ -648,14 +648,14 @@ describe('Unit testing of the vectorizer factory class', () => {
648648
],
649649
vectorizeCollectionName: true,
650650
});
651-
expect(config).toEqual<VectorConfigCreate<never, 'test', 'hnsw', 'multi2vec-jina'>>({
651+
expect(config).toEqual<VectorConfigCreate<never, 'test', 'hnsw', 'multi2vec-jinaai'>>({
652652
name: 'test',
653653
vectorIndex: {
654654
name: 'hnsw',
655655
config: undefined,
656656
},
657657
vectorizer: {
658-
name: 'multi2vec-jina',
658+
name: 'multi2vec-jinaai',
659659
config: {
660660
imageFields: ['field1', 'field2'],
661661
textFields: ['field3', 'field4'],

src/collections/configure/vectorizer.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,16 @@ export const vectorizer = {
197197
});
198198
},
199199
/**
200-
* Create a `VectorConfigCreate` object with the vectorizer set to `'multi2vec-jina'`.
200+
* Create a `VectorConfigCreate` object with the vectorizer set to `'multi2vec-jinaai'`.
201201
*
202202
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/jinaai/embeddings-multimodal) for detailed usage.
203203
*
204-
* @param {ConfigureNonTextVectorizerOptions<N, I, 'multi2vec-jina'>} [opts] The configuration options for the `multi2vec-jina` vectorizer.
205-
* @returns {VectorConfigCreate<PrimitiveKeys<T>[], N, I, 'multi2vec-jina'>} The configuration object.
204+
* @param {ConfigureNonTextVectorizerOptions<N, I, 'multi2vec-jinaai'>} [opts] The configuration options for the `multi2vec-jinaai` vectorizer.
205+
* @returns {VectorConfigCreate<PrimitiveKeys<T>[], N, I, 'multi2vec-jinaai'>} The configuration object.
206206
*/
207-
multi2VecJina: <N extends string | undefined = undefined, I extends VectorIndexType = 'hnsw'>(
208-
opts?: ConfigureNonTextVectorizerOptions<N, I, 'multi2vec-jina'>
209-
): VectorConfigCreate<never, N, I, 'multi2vec-jina'> => {
207+
multi2VecJinaAI: <N extends string | undefined = undefined, I extends VectorIndexType = 'hnsw'>(
208+
opts?: ConfigureNonTextVectorizerOptions<N, I, 'multi2vec-jinaai'>
209+
): VectorConfigCreate<never, N, I, 'multi2vec-jinaai'> => {
210210
const { name, vectorIndexConfig, ...config } = opts || {};
211211
const imageFields = config.imageFields?.map(mapMulti2VecField);
212212
const textFields = config.textFields?.map(mapMulti2VecField);
@@ -216,7 +216,7 @@ export const vectorizer = {
216216
return makeVectorizer(name, {
217217
vectorIndexConfig,
218218
vectorizerConfig: {
219-
name: 'multi2vec-jina',
219+
name: 'multi2vec-jinaai',
220220
config:
221221
Object.keys(config).length === 0
222222
? undefined

0 commit comments

Comments
 (0)