Skip to content

Dev/1.30 #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 58 commits into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
6bdad50
Add support for defining generative config at query-time (dynamic RAG)
tsmith023 Mar 7, 2025
a50f56f
Fix unit test
tsmith023 Mar 7, 2025
5eb09da
Again fix unit test
tsmith023 Mar 7, 2025
61c1d49
Merge branch 'main' of https://github.com/weaviate/typescript-client …
tsmith023 Mar 7, 2025
c16cbd3
Add concurrency limit to CI on a per branch basis to cancel old runs
tsmith023 Mar 7, 2025
befa2af
Add test of string-only usage with runtime generative
tsmith023 Mar 10, 2025
c688c83
Add factory to produce user friendly gen runtime config objects
tsmith023 Mar 10, 2025
98a932b
Remove `it.only` from test
tsmith023 Mar 10, 2025
f533aaa
Update CI images
tsmith023 Mar 17, 2025
c5c93d9
Update name of version checker method
tsmith023 Mar 17, 2025
72f1f22
Update to use latest proto with optional model fix in openai
tsmith023 Mar 17, 2025
1a11acd
Fix unit test
tsmith023 Mar 17, 2025
47c232b
Merge branch 'dev/1.30' of https://github.com/weaviate/typescript-cli…
tsmith023 Mar 17, 2025
150718b
Merge pull request #268 from weaviate/1.30/support-for-runtime-generate
tsmith023 Mar 17, 2025
fcc34b4
Update CI images
tsmith023 Mar 17, 2025
402f64a
merge
tsmith023 Mar 17, 2025
4d16a06
Merge branch 'dev/1.30' of https://github.com/weaviate/typescript-cli…
tsmith023 Mar 17, 2025
87501e0
Add ability to define tenant-level perms for `data` and `tenants` perms
tsmith023 Mar 17, 2025
54225ec
Merge pull request #274 from weaviate/1.30/rbac-tenant-filtering
tsmith023 Mar 18, 2025
525cc27
Make the next publish job push a next tag (add bash script to do this…
tsmith023 Mar 18, 2025
2fcb05f
3.5.0-beta.0
tsmith023 Mar 18, 2025
69ae2c4
Fix action typo, add generic to catch this in future
tsmith023 Mar 19, 2025
ccf14ed
3.5.0-beta.1
tsmith023 Mar 19, 2025
3eb52ed
Fix broken add/remove permissions method
tsmith023 Mar 21, 2025
25d0f81
3.5.0-beta.2
tsmith023 Mar 21, 2025
43bbb92
Make fixes in response to user feedback
tsmith023 Mar 31, 2025
6751bd1
Merge branch 'main' of https://github.com/weaviate/typescript-client …
tsmith023 Mar 31, 2025
184f8d6
Improvements: (#279)
tsmith023 Apr 1, 2025
c933263
Merge branch 'main' of https://github.com/weaviate/typescript-client …
tsmith023 Apr 1, 2025
0abc234
Use REST instead of gRPC for `tenants.getByName` when available due t…
tsmith023 Apr 1, 2025
1d62717
Add back tests of unsupported error throwing for <1.25
tsmith023 Apr 1, 2025
2c53fd2
Merge pull request #281 from weaviate/1.30/refactor-tenants-get-by-na…
tsmith023 Apr 2, 2025
2ab5781
chore: update OpenAPI schema
bevzzz Mar 31, 2025
1929a22
feat: enable dynamic user management, add db/oidc namespaces
bevzzz Mar 31, 2025
a9cf76c
refactor: re-use common code snippets
bevzzz Mar 31, 2025
fd3ff06
test: extend integration test suite
bevzzz Mar 31, 2025
b1ece85
refactor(test): use concise Promise.all
bevzzz Mar 31, 2025
d61c30f
feat(breaking): include user types in user assignments
bevzzz Mar 31, 2025
795fdb7
chore: format and lint
bevzzz Apr 1, 2025
5562ec9
test: activate test case for 'oidc' users
bevzzz Apr 1, 2025
6733882
chore: lint and format
bevzzz Apr 1, 2025
df010a2
refactor: replace .reduce with .map where possible
bevzzz Apr 1, 2025
dffc2c1
test: use valid tenant name
bevzzz Apr 1, 2025
29f3cfc
refactor: collect optional parameters in an object
bevzzz Apr 1, 2025
d32ac42
test: add test case w/ includePermissions=true
bevzzz Apr 1, 2025
5bc5b08
chore: lint and format
bevzzz Apr 1, 2025
ef70fc2
Add missing modules and module params for
tsmith023 Apr 2, 2025
53049e3
fix: expect no response for /activate and /deactivate
bevzzz Apr 2, 2025
c0ca1ef
fix: allow expected code only for instances of WeaviateUnexpectedStat…
bevzzz Apr 2, 2025
28c3897
refactor: declare types in **/types.ts
bevzzz Apr 2, 2025
84aac0d
test: await on all expectations which should resolve/reject
bevzzz Apr 2, 2025
2e71143
refactor: replace postNoBody with a more explicit postReturn<null, R>
bevzzz Apr 2, 2025
bf294e9
chore: add documentation for dynamic user management
bevzzz Apr 2, 2025
67b675e
chore: lint and format
bevzzz Apr 2, 2025
aa04c92
test: use different port binding for backup/unit.test.ts
bevzzz Apr 3, 2025
a140c53
feat: add revokeKey option to /deactivate
bevzzz Apr 3, 2025
c204752
Merge pull request #278 from weaviate/feat/dynamic-user-management
tsmith023 Apr 3, 2025
3af2083
Remove `--tag next` from CI publish in preparation for merging
tsmith023 Apr 3, 2025
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
26 changes: 16 additions & 10 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ on:

env:
WEAVIATE_124: 1.24.26
WEAVIATE_125: 1.25.30
WEAVIATE_126: 1.26.14
WEAVIATE_127: 1.27.11
WEAVIATE_128: 1.28.4
WEAVIATE_129: 1.29.0
WEAVIATE_125: 1.25.34
WEAVIATE_126: 1.26.17
WEAVIATE_127: 1.27.15
WEAVIATE_128: 1.28.11
WEAVIATE_129: 1.29.1
WEAVIATE_130: 1.30.0-rc.0-6b9a01c

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
checks:
Expand Down Expand Up @@ -41,9 +46,10 @@ jobs:
{ node: "22.x", weaviate: $WEAVIATE_126},
{ node: "22.x", weaviate: $WEAVIATE_127},
{ node: "22.x", weaviate: $WEAVIATE_128},
{ node: "18.x", weaviate: $WEAVIATE_129},
{ node: "20.x", weaviate: $WEAVIATE_129},
{ node: "22.x", weaviate: $WEAVIATE_129}
{ node: "22.x", weaviate: $WEAVIATE_129},
{ node: "18.x", weaviate: $WEAVIATE_130},
{ node: "20.x", weaviate: $WEAVIATE_130},
{ node: "22.x", weaviate: $WEAVIATE_130}
]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -74,7 +80,7 @@ jobs:
fail-fast: false
matrix:
versions: [
{ node: "22.x", weaviate: $WEAVIATE_129}
{ node: "22.x", weaviate: $WEAVIATE_130}
]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -133,4 +139,4 @@ jobs:
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
draft: true
draft: true
Empty file modified ci/compose.sh
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions ci/docker-compose-rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ services:
AUTHORIZATION_RBAC_ENABLED: "true"
AUTHORIZATION_ADMIN_USERS: "admin-user"
AUTHORIZATION_VIEWER_USERS: "viewer-user"
AUTHENTICATION_DB_USERS_ENABLED: "true"
AUTHENTICATION_OIDC_ENABLED: "true"
AUTHENTICATION_OIDC_CLIENT_ID: "wcs"
AUTHENTICATION_OIDC_ISSUER: "https://auth.wcs.api.weaviate.io/auth/realms/SeMI"
AUTHENTICATION_OIDC_USERNAME_CLAIM: "email"
AUTHENTICATION_OIDC_GROUPS_CLAIM: "groups"
...
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weaviate-client",
"version": "3.4.2",
"version": "3.5.0-beta.2",
"description": "JS/TS client for Weaviate",
"main": "dist/node/cjs/index.js",
"type": "module",
Expand Down
6 changes: 3 additions & 3 deletions src/collections/backup/unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ describe('Mock testing of backup cancellation', () => {
let mock: CancelMock;

beforeAll(async () => {
mock = await CancelMock.use('1.27.0', 8958, 8959);
client = await weaviate.connectToLocal({ port: 8958, grpcPort: 8959 });
mock = await CancelMock.use('1.27.0', 8912, 8913);
client = await weaviate.connectToLocal({ port: 8912, grpcPort: 8913 });
});

it('should throw while waiting for creation if backup is cancelled in the meantime', async () => {
Expand All @@ -133,7 +133,7 @@ describe('Mock testing of backup cancellation', () => {
});

it('should return false if creation backup does not exist', async () => {
const success = await client.backup.cancel({ backupId: `${BACKUP_ID}4`, backend: BACKEND });
const success = await client.backup.cancel({ backupId: `${BACKUP_ID}-unknown`, backend: BACKEND });
expect(success).toBe(false);
});

Expand Down
8 changes: 8 additions & 0 deletions src/collections/config/types/generative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type GenerativeAWSConfig = {
};

export type GenerativeAnthropicConfig = {
baseURL?: string;
maxTokens?: number;
model?: string;
stopSequences?: string[];
Expand Down Expand Up @@ -58,6 +59,13 @@ export type GenerativeMistralConfig = {
temperature?: number;
};

export type GenerativeNvidiaConfig = {
baseURL?: string;
maxTokens?: number;
model?: string;
temperature?: number;
};

export type GenerativeOllamaConfig = {
apiEndpoint?: string;
model?: string;
Expand Down
23 changes: 23 additions & 0 deletions src/collections/config/types/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export type Vectorizer =
| 'text2vec-gpt4all'
| 'text2vec-huggingface'
| 'text2vec-jinaai'
| 'text2vec-nvidia'
| 'text2vec-mistral'
| 'text2vec-ollama'
| 'text2vec-openai'
Expand Down Expand Up @@ -169,6 +170,8 @@ export type Multi2VecGoogleConfig = {
textFields?: string[];
/** The video fields used when vectorizing. */
videoFields?: string[];
/** Length of a video interval in seconds. */
videoIntervalSeconds?: number;
/** The model ID in use. */
modelId?: string;
/** The dimensionality of the vector once embedded. */
Expand Down Expand Up @@ -223,6 +226,8 @@ export type Multi2VecVoyageAIConfig = {
imageFields?: string[];
/** The model to use. */
model?: string;
/** How the output from the model should be encoded on return. */
outputEncoding?: string;
/** The text fields used when vectorizing. */
textFields?: string[];
/** Whether the input should be truncated to fit in the context window. */
Expand Down Expand Up @@ -363,6 +368,22 @@ export type Text2VecJinaAIConfig = {
/** @deprecated Use `Text2VecJinaAIConfig` instead. */
export type Text2VecJinaConfig = Text2VecJinaAIConfig;

/**
* The configuration for text vectorization using the Nvidia module.
*
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/nvidia/embeddings) for detailed usage.
*/
export type Text2VecNvidiaConfig = {
/** The base URL to use where API requests should go. */
baseURL?: string;
/** The model to use. */
model?: string;
/** Whether to truncate when vectorising. */
truncate?: boolean;
/** Whether to vectorize the collection name. */
vectorizeCollectionName?: boolean;
};

/**
* The configuration for text vectorization using the Mistral module.
*
Expand Down Expand Up @@ -541,6 +562,8 @@ export type VectorizerConfigType<V> = V extends 'img2vec-neural'
? Text2VecHuggingFaceConfig | undefined
: V extends 'text2vec-jinaai'
? Text2VecJinaAIConfig | undefined
: V extends 'text2vec-nvidia'
? Text2VecNvidiaConfig | undefined
: V extends 'text2vec-mistral'
? Text2VecMistralConfig | undefined
: V extends 'text2vec-ollama'
Expand Down
18 changes: 18 additions & 0 deletions src/collections/configure/generative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
GenerativeFriendliAIConfig,
GenerativeGoogleConfig,
GenerativeMistralConfig,
GenerativeNvidiaConfig,
GenerativeOllamaConfig,
GenerativeOpenAIConfig,
GenerativePaLMConfig,
Expand All @@ -22,6 +23,7 @@ import {
GenerativeDatabricksConfigCreate,
GenerativeFriendliAIConfigCreate,
GenerativeMistralConfigCreate,
GenerativeNvidiaConfigCreate,
GenerativeOllamaConfigCreate,
GenerativeOpenAIConfigCreate,
GenerativePaLMConfigCreate,
Expand Down Expand Up @@ -169,6 +171,22 @@ export default {
config,
};
},
/**
* Create a `ModuleConfig<'generative-nvidia', GenerativeNvidiaConfig | undefined>` object for use when performing AI generation using the `generative-mistral` module.
*
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/nvidia/generative) for detailed usage.
*
* @param {GenerativeNvidiaConfigCreate} [config] The configuration for the `generative-nvidia` module.
* @returns {ModuleConfig<'generative-nvidia', GenerativeNvidiaConfig | undefined>} The configuration object.
*/
nvidia(
config?: GenerativeNvidiaConfigCreate
): ModuleConfig<'generative-nvidia', GenerativeNvidiaConfig | undefined> {
return {
name: 'generative-nvidia',
config,
};
},
/**
* Create a `ModuleConfig<'generative-ollama', GenerativeOllamaConfig | undefined>` object for use when performing AI generation using the `generative-ollama` module.
*
Expand Down
6 changes: 6 additions & 0 deletions src/collections/configure/types/generative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
GenerativeDatabricksConfig,
GenerativeFriendliAIConfig,
GenerativeMistralConfig,
GenerativeNvidiaConfig,
GenerativeOllamaConfig,
GenerativePaLMConfig,
} from '../../index.js';
Expand Down Expand Up @@ -44,6 +45,8 @@ export type GenerativeFriendliAIConfigCreate = GenerativeFriendliAIConfig;

export type GenerativeMistralConfigCreate = GenerativeMistralConfig;

export type GenerativeNvidiaConfigCreate = GenerativeNvidiaConfig;

export type GenerativeOllamaConfigCreate = GenerativeOllamaConfig;

export type GenerativeOpenAIConfigCreate = GenerativeOpenAIConfigBaseCreate & {
Expand All @@ -61,6 +64,7 @@ export type GenerativeConfigCreate =
| GenerativeDatabricksConfigCreate
| GenerativeFriendliAIConfigCreate
| GenerativeMistralConfigCreate
| GenerativeNvidiaConfigCreate
| GenerativeOllamaConfigCreate
| GenerativeOpenAIConfigCreate
| GenerativePaLMConfigCreate
Expand All @@ -81,6 +85,8 @@ export type GenerativeConfigCreateType<G> = G extends 'generative-anthropic'
? GenerativeFriendliAIConfigCreate
: G extends 'generative-mistral'
? GenerativeMistralConfigCreate
: G extends 'generative-nvidia'
? GenerativeNvidiaConfigCreate
: G extends 'generative-ollama'
? GenerativeOllamaConfigCreate
: G extends 'generative-openai'
Expand Down
5 changes: 5 additions & 0 deletions src/collections/configure/types/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Text2VecHuggingFaceConfig,
Text2VecJinaAIConfig,
Text2VecMistralConfig,
Text2VecNvidiaConfig,
Text2VecOllamaConfig,
Text2VecOpenAIConfig,
Text2VecTransformersConfig,
Expand Down Expand Up @@ -198,6 +199,8 @@ export type Text2VecHuggingFaceConfigCreate = Text2VecHuggingFaceConfig;

export type Text2VecJinaAIConfigCreate = Text2VecJinaAIConfig;

export type Text2VecNvidiaConfigCreate = Text2VecNvidiaConfig;

export type Text2VecMistralConfigCreate = Text2VecMistralConfig;

export type Text2VecOllamaConfigCreate = Text2VecOllamaConfig;
Expand Down Expand Up @@ -247,6 +250,8 @@ export type VectorizerConfigCreateType<V> = V extends 'img2vec-neural'
? Text2VecHuggingFaceConfigCreate | undefined
: V extends 'text2vec-jinaai'
? Text2VecJinaAIConfigCreate | undefined
: V extends 'text2vec-nvidia'
? Text2VecNvidiaConfigCreate | undefined
: V extends 'text2vec-mistral'
? Text2VecMistralConfigCreate | undefined
: V extends 'text2vec-ollama'
Expand Down
41 changes: 41 additions & 0 deletions src/collections/configure/unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,47 @@ describe('Unit testing of the vectorizer factory class', () => {
});
});

it('should create the correct Text2VecNvidiaConfig type with defaults', () => {
const config = configure.vectorizer.text2VecNvidia();
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'text2vec-nvidia'>>({
name: undefined,
vectorIndex: {
name: 'hnsw',
config: undefined,
},
vectorizer: {
name: 'text2vec-nvidia',
config: undefined,
},
});
});

it('should create the correct Text2VecNvidiaConfig type with all values', () => {
const config = configure.vectorizer.text2VecNvidia({
name: 'test',
baseURL: 'base-url',
model: 'model',
truncate: true,
vectorizeCollectionName: true,
});
expect(config).toEqual<VectorConfigCreate<never, 'test', 'hnsw', 'text2vec-nvidia'>>({
name: 'test',
vectorIndex: {
name: 'hnsw',
config: undefined,
},
vectorizer: {
name: 'text2vec-nvidia',
config: {
baseURL: 'base-url',
model: 'model',
truncate: true,
vectorizeCollectionName: true,
},
},
});
});

it('should create the correct Text2VecMistralConfig type with defaults', () => {
const config = configure.vectorizer.text2VecMistral();
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'text2vec-mistral'>>({
Expand Down
13 changes: 13 additions & 0 deletions src/collections/configure/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,19 @@ export const vectorizer = {
},
});
},
text2VecNvidia: <T, N extends string | undefined = undefined, I extends VectorIndexType = 'hnsw'>(
opts?: ConfigureTextVectorizerOptions<T, N, I, 'text2vec-nvidia'>
): VectorConfigCreate<PrimitiveKeys<T>, N, I, 'text2vec-nvidia'> => {
const { name, sourceProperties, vectorIndexConfig, ...config } = opts || {};
return makeVectorizer(name, {
sourceProperties,
vectorIndexConfig,
vectorizerConfig: {
name: 'text2vec-nvidia',
config: Object.keys(config).length === 0 ? undefined : config,
},
});
},
/**
* Create a `VectorConfigCreate` object with the vectorizer set to `'text2vec-mistral'`.
*
Expand Down
Loading