Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ env:
WEAVIATE_127: 1.27.27
WEAVIATE_128: 1.28.16
WEAVIATE_129: 1.29.9
WEAVIATE_130: 1.30.12
WEAVIATE_131: 1.31.5
WEAVIATE_132: 1.32.5
WEAVIATE_133: 1.33.0-rc.1
WEAVIATE_130: 1.30.17
WEAVIATE_131: 1.31.16
WEAVIATE_132: 1.32.10
WEAVIATE_133: 1.33.0

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion src/alias/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface Aliases {
* delete the alias and create a new one.
*
* @param {string} args.alias Alias to update.
* @param {string} args.collection New collection the alias should point to.
* @param {string} args.newTargetCollection New collection the alias should point to.
* @return {Promise<void>} Awaitable promise.
*/
update: (args: UpdateAliasArgs) => Promise<void>;
Expand Down
5 changes: 3 additions & 2 deletions src/collections/backup/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('Integration testing of backups', () => {
.then(testCollectionWaitForCompletion)
.then(testCollectionNoWaitForCompletion));

requireAtLeast(1, 32, 3).describe('overwrite alias', () => {
requireAtLeast(1, 32, 0).describe('overwrite alias', () => {
test('overwriteAlias=true', async () => {
const client = await clientPromise;

Expand Down Expand Up @@ -153,7 +153,8 @@ describe('Integration testing of backups', () => {
expect(alias.collection).toEqual(things.name);
});

test('overwriteAlias=false', async () => {
// Skip until server regression is fixed for overwriteAlias=false backups
test.skip('overwriteAlias=false', async () => {
const client = await clientPromise;

const things = await client.collections.create({ name: 'ThingsFalse' });
Expand Down
43 changes: 43 additions & 0 deletions src/collections/config/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ModuleConfig,
MultiTenancyConfig,
PropertyConfig,
RQConfig,
RerankerCohereConfig,
VectorIndexConfigDynamic,
VectorIndexConfigHNSW,
Expand Down Expand Up @@ -877,4 +878,46 @@ describe('Testing of the collection.config namespace', () => {
);
});
});

requireAtLeast(1, 32, 0).it(
'should be able to create a collection with RQ quantizer bits=8 option',
async () => {
const collectionName = 'TestCollectionRQQuantizer8Bits';
const collection = await client.collections.create({
name: collectionName,
vectorizers: weaviate.configure.vectors.selfProvided({
quantizer: weaviate.configure.vectorIndex.quantizer.rq({ bits: 8, rescoreLimit: 10 }),
}),
});
await collection.config.get().then((config) => {
console.log(JSON.stringify(config, null, 2));
const indexConfig = config.vectorizers.default.indexConfig as VectorIndexConfigHNSW;
expect(indexConfig.quantizer).toBeDefined();
expect(indexConfig.quantizer?.type).toEqual('rq');
expect((indexConfig.quantizer as RQConfig).bits).toEqual(8);
expect((indexConfig.quantizer as RQConfig).rescoreLimit).toEqual(10);
});
}
);

requireAtLeast(1, 33, 0).it(
'should be able to create a collection with RQ quantizer bits=1 option',
async () => {
const collectionName = 'TestCollectionRQQuantizer1Bits';
const collection = await client.collections.create({
name: collectionName,
vectorizers: weaviate.configure.vectors.selfProvided({
quantizer: weaviate.configure.vectorIndex.quantizer.rq({ bits: 1, rescoreLimit: 10 }),
}),
});
await collection.config.get().then((config) => {
console.log(JSON.stringify(config, null, 2));
const indexConfig = config.vectorizers.default.indexConfig as VectorIndexConfigHNSW;
expect(indexConfig.quantizer).toBeDefined();
expect(indexConfig.quantizer?.type).toEqual('rq');
expect((indexConfig.quantizer as RQConfig).bits).toEqual(1);
expect((indexConfig.quantizer as RQConfig).rescoreLimit).toEqual(10);
});
}
);
});
1 change: 1 addition & 0 deletions src/collections/config/types/generative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type GenerativeAWSConfig = {
service: string;
model?: string;
endpoint?: string;
maxTokens?: number;
};

export type GenerativeAnthropicConfig = {
Expand Down
45 changes: 45 additions & 0 deletions src/collections/config/types/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ export type Vectorizer =
| 'text2vec-nvidia'
| 'text2vec-mistral'
| 'text2vec-model2vec'
| 'text2vec-morph'
| 'text2vec-ollama'
| 'text2vec-openai'
| Text2VecPalmVectorizer
| 'text2vec-google'
| 'text2vec-google-ai-studio'
| 'text2vec-transformers'
| 'text2vec-voyageai'
| 'text2vec-weaviate'
Expand Down Expand Up @@ -93,6 +95,30 @@ export type Multi2VecNvidiaConfig = {
};
};

/** The configuration for multi-media vectorization using the AWS module.
*
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/aws/embeddings-multimodal) for detailed usage.
*/
export type Multi2VecAWSConfig = {
/** The dimensionality of the vector once embedded. */
dimensions?: number;
/** The model to use. */
model?: string;
/** The AWS region where the model runs. */
region?: string;
/** The image fields used when vectorizing. */
imageFields?: string[];
/** The text fields used when vectorizing. */
textFields?: string[];
/** The weights of the fields used for vectorization. */
weights?: {
/** The weights of the image fields. */
imageFields?: number[];
/** The weights of the text fields. */
textFields?: number[];
};
};

/** The configuration for multi-media vectorization using the CLIP module.
*
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/transformers/embeddings-multimodal) for detailed usage.
Expand Down Expand Up @@ -504,6 +530,8 @@ export type Text2VecPalmConfig = Text2VecGoogleConfig;
export type Text2VecGoogleConfig = {
/** The API endpoint to use without a leading scheme such as `http://`. */
apiEndpoint?: string;
/** The dimensionality of the vector once embedded. */
dimensions?: number;
/** The model ID to use. */
model?: string;
/** The model ID to use.
Expand All @@ -517,6 +545,13 @@ export type Text2VecGoogleConfig = {
vectorizeCollectionName?: boolean;
};

export type Text2VecGoogleAiStudioConfig = {
/** The model ID to use. */
model?: string;
/** The Weaviate property name for the `gecko-002` or `gecko-003` model to use as the title. */
titleProperty?: string;
};

/**
* The configuration for text vectorization using the Transformers module.
*
Expand Down Expand Up @@ -579,10 +614,18 @@ export type Text2VecModel2Vec = {
vectorizeCollectionName?: boolean;
};

export type Text2VecMorphConfig = {
/** The base URL to use where API requests should go. */
baseURL?: string;
/** The model to use. */
model?: string;
};

export type NoVectorizerConfig = {};

export type VectorizerConfig =
| Img2VecNeuralConfig
| Multi2VecAWSConfig
| Multi2VecClipConfig
| Multi2VecBindConfig
| Multi2VecGoogleConfig
Expand Down Expand Up @@ -652,6 +695,8 @@ export type VectorizerConfigType<V> = V extends 'img2vec-neural'
? Text2VecMistralConfig | undefined
: V extends 'text2vec-model2vec'
? Text2VecModel2Vec | undefined
: V extends 'text2vec-morph'
? Text2VecMorphConfig | undefined
: V extends 'text2vec-ollama'
? Text2VecOllamaConfig | undefined
: V extends 'text2vec-openai'
Expand Down
Loading