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: 6 additions & 2 deletions docs/modules/chromadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ These examples use the following libraries:

npm install chromadb

- [ollama](https://www.npmjs.com/package/ollama)
- [@chroma-core/default-embed](https://www.npmjs.com/package/@chroma-core/default-embed)

npm install ollama
npm install @chroma-core/default-embed

- [@chroma-core/ollama](https://www.npmjs.com/package/@chroma-core/ollama)

npm install @chroma-core/ollama

Choose an image from the [container registry](https://hub.docker.com/r/chromadb/chroma) and substitute `IMAGE`.

Expand Down
5,809 changes: 3,042 additions & 2,767 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@
"check-compiles": "npm run build --ignore-scripts --ws -- --project tsconfig.json --noEmit"
},
"devDependencies": {
"@eslint/js": "^9.31.0",
"@eslint/json": "^0.13.0",
"@eslint/js": "^9.32.0",
"@eslint/json": "^0.13.1",
"@vitest/coverage-v8": "^3.2.4",
"eslint": "^9.31.0",
"eslint": "^9.32.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.3",
"eslint-plugin-prettier": "^5.5.4",
"husky": "^9.1.7",
"lint-staged": "^16.1.2",
"lint-staged": "^16.1.4",
"ls-engines": "^0.9.3",
"npm-check-updates": "^18.0.1",
"npm-check-updates": "^18.0.2",
"prettier": "^3.6.2",
"prettier-plugin-organize-imports": "^4.1.0",
"prettier-plugin-organize-imports": "^4.2.0",
"shx": "^0.4.0",
"ts-node": "^10.9.2",
"typescript": "^5.8.3",
"typescript-eslint": "^8.37.0",
"typescript": "^5.9.2",
"typescript-eslint": "^8.39.0",
"vitest": "^3.1.3"
},
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/azurecosmosdb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"@azure/cosmos": "^4.4.1"
"@azure/cosmos": "^4.5.0"
},
"dependencies": {
"testcontainers": "^11.5.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/azurite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM mcr.microsoft.com/azure-storage/azurite:3.34.0
FROM mcr.microsoft.com/azure-storage/azurite:3.35.0
4 changes: 2 additions & 2 deletions packages/modules/azurite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"@azure/data-tables": "^13.3.1",
"@azure/storage-blob": "^12.27.0",
"@azure/storage-queue": "^12.26.0"
"@azure/storage-blob": "^12.28.0",
"@azure/storage-queue": "^12.27.0"
}
}
5 changes: 3 additions & 2 deletions packages/modules/chromadb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"chromadb": "^2.4.6",
"ollama": "^0.5.16"
"@chroma-core/default-embed": "^0.1.8",
"@chroma-core/ollama": "^0.1.7",
"chromadb": "^3.0.10"
},
"dependencies": {
"testcontainers": "^11.5.0"
Expand Down
36 changes: 18 additions & 18 deletions packages/modules/chromadb/src/chromadb-container.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AdminClient, ChromaClient, OllamaEmbeddingFunction } from "chromadb";
import { OllamaEmbeddingFunction } from "@chroma-core/ollama";
import { AdminClient, ChromaClient } from "chromadb";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
Expand All @@ -12,15 +13,15 @@ const OLLAMA_IMAGE = getImage(__dirname, 1);
describe("ChromaDBContainer", { timeout: 360_000 }, () => {
it("should connect", async () => {
await using container = await new ChromaDBContainer(IMAGE).start();
const client = new ChromaClient({ path: container.getHttpUrl() });
const client = new ChromaClient({ ssl: false, host: container.getHost(), port: container.getMappedPort(8000) });
expect(await client.heartbeat()).toBeDefined();
});

it("should create collection and get data", async () => {
// chromaCreateCollection {
await using container = await new ChromaDBContainer(IMAGE).start();

const client = new ChromaClient({ path: container.getHttpUrl() });
const client = new ChromaClient({ ssl: false, host: container.getHost(), port: container.getMappedPort(8000) });
const collection = await client.createCollection({ name: "test", metadata: { "hnsw:space": "cosine" } });
expect(collection.name).toBe("test");

Expand All @@ -39,9 +40,9 @@ describe("ChromaDBContainer", { timeout: 360_000 }, () => {

await using ollama = await new GenericContainer(OLLAMA_IMAGE).withExposedPorts(11434).start();
await ollama.exec(["ollama", "pull", "nomic-embed-text"]);
const client = new ChromaClient({ path: container.getHttpUrl() });
const client = new ChromaClient({ ssl: false, host: container.getHost(), port: container.getMappedPort(8000) });
const embedder = new OllamaEmbeddingFunction({
url: `http://${ollama.getHost()}:${ollama.getMappedPort(11434)}/api/embeddings`,
url: `http://${ollama.getHost()}:${ollama.getMappedPort(11434)}`,
model: "nomic-embed-text",
});

Expand Down Expand Up @@ -74,7 +75,7 @@ describe("ChromaDBContainer", { timeout: 360_000 }, () => {
.withBindMounts([{ source: sourcePath, target: "/data" }])
.start();

const client = new ChromaClient({ path: container.getHttpUrl() });
const client = new ChromaClient({ ssl: false, host: container.getHost(), port: container.getMappedPort(8000) });
const collection = await client.createCollection({ name: "test", metadata: { "hnsw:space": "cosine" } });
expect(collection.name).toBe("test");

Expand Down Expand Up @@ -104,26 +105,25 @@ describe("ChromaDBContainer", { timeout: 360_000 }, () => {
.start();

const adminClient = new AdminClient({
tenant: tenant,
auth: {
provider: "token",
credentials: key,
tokenHeaderType: "X_CHROMA_TOKEN",
ssl: false,
host: container.getHost(),
port: container.getMappedPort(8000),
headers: {
"X-Chroma-Token": key,
},
path: container.getHttpUrl(),
});

await adminClient.createTenant({ name: tenant });
await adminClient.createDatabase({ name: database, tenantName: tenant });
await adminClient.createDatabase({ name: database, tenant: tenant });

const dbClient = new ChromaClient({
tenant,
auth: {
provider: "token",
credentials: key,
tokenHeaderType: "X_CHROMA_TOKEN",
ssl: false,
host: container.getHost(),
port: container.getMappedPort(8000),
headers: {
"X-Chroma-Token": key,
},
path: container.getHttpUrl(),
database,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/modules/clickhouse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"@clickhouse/client": "^1.11.2"
"@clickhouse/client": "^1.12.0"
},
"dependencies": {
"testcontainers": "^11.5.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/cockroachdb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"@types/pg": "^8.15.4",
"@types/pg": "^8.15.5",
"pg": "^8.16.3"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/elasticsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"@elastic/elasticsearch": "^9.0.3"
"@elastic/elasticsearch": "^9.1.0"
},
"dependencies": {
"testcontainers": "^11.5.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/modules/gcloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
"testcontainers": "^11.5.0"
},
"devDependencies": {
"@google-cloud/bigquery": "^8.1.0",
"@google-cloud/bigquery": "^8.1.1",
"@google-cloud/datastore": "^9.2.1",
"@google-cloud/firestore": "7.11.3",
"@google-cloud/pubsub": "^5.1.0",
"@google-cloud/spanner": "^8.0.0",
"@google-cloud/spanner": "^8.1.0",
"@google-cloud/storage": "^7.16.0",
"firebase-admin": "13.4.0",
"msw": "^2.7.3"
Expand Down
5 changes: 5 additions & 0 deletions packages/modules/gcloud/src/spanner-emulator-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export class SpannerEmulatorHelper {
apiEndpoint: this.emulator.getHost(),
port: this.emulator.getGrpcPort(),
sslCreds: this.emulator.getSslCredentials(),
// Provide fake credentials so the auth library never tries metadata
credentials: {
client_email: "[email protected]",
private_key: "not-a-real-key",
},
});
return this.clientInstance;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/hivemq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"mqtt": "^5.13.3"
"mqtt": "^5.14.0"
},
"dependencies": {
"testcontainers": "^11.5.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/localstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"testcontainers": "^11.5.0"
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.848.0"
"@aws-sdk/client-s3": "^3.859.0"
}
}
2 changes: 1 addition & 1 deletion packages/modules/mariadb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"testcontainers": "^11.5.0"
},
"devDependencies": {
"mariadb": "^3.4.4"
"mariadb": "^3.4.5"
}
}
2 changes: 1 addition & 1 deletion packages/modules/mockserver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@types/superagent": "^8.1.9",
"mockserver-client": "^5.15.0",
"superagent": "^10.2.2"
"superagent": "^10.2.3"
}
}
2 changes: 1 addition & 1 deletion packages/modules/mongodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"mongoose": "^8.16.4"
"mongoose": "^8.17.0"
},
"dependencies": {
"compare-versions": "^6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/mysql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"mysql2": "^3.14.2"
"mysql2": "^3.14.3"
},
"dependencies": {
"testcontainers": "^11.5.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/postgresql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"@types/pg": "^8.15.4",
"@types/pg": "^8.15.5",
"pg": "^8.16.3"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"redis": "^5.6.0"
"redis": "^5.8.0"
},
"dependencies": {
"testcontainers": "^11.5.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/valkey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"redis": "^5.6.0"
"redis": "^5.8.0"
},
"dependencies": {
"testcontainers": "^11.5.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/testcontainers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"properties-reader": "^2.3.0",
"ssh-remote-port-forward": "^1.0.4",
"tar-fs": "^3.1.0",
"tmp": "^0.2.3",
"undici": "^7.12.0"
"tmp": "^0.2.4",
"undici": "^7.13.0"
},
"devDependencies": {
"@types/archiver": "^6.0.3",
Expand Down
Loading