Skip to content
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

fix: update the version of chromadb client to 1.10.3 that is compatible with the latest Docker version of chroma (0.6.3) #1608

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

my8bit
Copy link

@my8bit my8bit commented Jan 27, 2025

The version 1.9.2 that is currently in the repo is not compatible with the latest chroma Docker image (0.6.3)

Steps to reproduce:

docker pull chromadb/chroma
docker run -p 8000:8000 chromadb/chroma

then run the example from examples/chromadb

npx ts-node test.ts

side note: first there will be an error regarding the incorrect path do the data.csv file. This fix included to the MR as well, and after that the actual issue:

npx ts-node test.ts
llamaindex was already imported. This breaks constructor checks and will lead to issues!
Loading data from ../data/movie_reviews.csv
(node:73164) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:73164) ExperimentalWarning: CommonJS module /home/my8bit/github/LlamaIndexTS-pikisoft/packages/providers/storage/azure/dist/index.cjs is loading ES Module /home/my8bit/github/LlamaIndexTS-pikisoft/packages/providers/storage/azure/dist/storage.edge-light.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
Creating ChromaDB vector store
Embedding documents and adding to index
Error: Could not connect to tenant default_tenant. Are you sure it exists? Underlying error:
ChromaClientError: Bad request to http://localhost:8000/api/v1/tenants/default_tenant with status: Bad Request
    at validateTenantDatabase (/home/my8bit/github/LlamaIndexTS-pikisoft/node_modules/.pnpm/[email protected]_@[email protected][email protected]_@[email protected]_2xai75z4avcyvpce2vhtfaypoi/node_modules/chromadb/src/utils.ts:61:11)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async ChromaClient.getOrCreateCollection (/home/my8bit/github/LlamaIndexTS-pikisoft/node_modules/.pnpm/[email protected]_@[email protected][email protected]_@[email protected]_2xai75z4avcyvpce2vhtfaypoi/node_modules/chromadb/src/ChromaClient.ts:229:5)
    at async ChromaVectorStore.getCollection (/home/my8bit/github/LlamaIndexTS-pikisoft/packages/llamaindex/dist/cjs/vector-store/ChromaVectorStore.js:33:26)
    at async ChromaVectorStore.add (/home/my8bit/github/LlamaIndexTS-pikisoft/packages/llamaindex/dist/cjs/vector-store/ChromaVectorStore.js:54:28)
    at async addNodesToVectorStores (/home/my8bit/github/LlamaIndexTS-pikisoft/packages/llamaindex/dist/cjs/ingestion/IngestionPipeline.js:115:28)
    at async VectorStoreIndex.insertNodes (/home/my8bit/github/LlamaIndexTS-pikisoft/packages/llamaindex/dist/cjs/indices/vectorStore/index.js:208:9)
    at async VectorStoreIndex.buildIndexFromNodes (/home/my8bit/github/LlamaIndexTS-pikisoft/packages/llamaindex/dist/cjs/indices/vectorStore/index.js:115:9)
    at async Function.init (/home/my8bit/github/LlamaIndexTS-pikisoft/packages/llamaindex/dist/cjs/indices/vectorStore/index.js:65:13)
    at async Function.fromDocuments (/home/my8bit/github/LlamaIndexTS-pikisoft/packages/llamaindex/dist/cjs/indices/vectorStore/index.js:145:20)
    at async main (/home/my8bit/github/LlamaIndexTS-pikisoft/examples/chromadb/test.ts:23:19)

and from Docker image

docker run -p 8000:8000  chromadb/chroma:latest
Starting 'uvicorn chromadb.app:app' with args: --workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --log-config chromadb/log_config.yml --timeout-keep-alive 30
WARNING:  [27-01-2025 14:27:36] chroma_server_nofile is set to 65536, but this is less than current soft limit of 1048576. chroma_server_nofile will not be set.
INFO:     [27-01-2025 14:27:36] Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.
DEBUG:    [27-01-2025 14:27:36] Starting component System
DEBUG:    [27-01-2025 14:27:36] Starting component OpenTelemetryClient
DEBUG:    [27-01-2025 14:27:36] Starting component SqliteDB
DEBUG:    [27-01-2025 14:27:36] Starting component SimpleQuotaEnforcer
DEBUG:    [27-01-2025 14:27:36] Starting component Posthog
DEBUG:    [27-01-2025 14:27:36] Starting component SimpleRateLimitEnforcer
DEBUG:    [27-01-2025 14:27:36] Starting component LocalSegmentManager
DEBUG:    [27-01-2025 14:27:36] Starting component LocalExecutor
DEBUG:    [27-01-2025 14:27:36] Starting component SegmentAPI
DEBUG:    [27-01-2025 14:27:36] Starting component SimpleAsyncRateLimitEnforcer
INFO:     [27-01-2025 14:27:37] Started server process [1]
INFO:     [27-01-2025 14:27:37] Waiting for application startup.
INFO:     [27-01-2025 14:27:37] Application startup complete.
INFO:     [27-01-2025 14:27:37] Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     [27-01-2025 14:29:17] 172.17.0.1:38940 - "GET /api/v1/tenants/default_tenant HTTP/1.1" 400

with the update version from this PR it works as expected.

I didn't include the changeset as was not sure if this should trigger the major bump, so I'd like to ask your guidance on that

Copy link

vercel bot commented Jan 27, 2025

@my8bit is attempting to deploy a commit to the LlamaIndex Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

changeset-bot bot commented Jan 27, 2025

🦋 Changeset detected

Latest commit: 8998d36

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -210,7 +210,6 @@ export class ChromaVectorStore extends BaseVectorStore {
QueryRecordsParams
>{
queryEmbeddings: query.queryEmbedding ?? undefined,
queryTexts: query.queryStr ?? undefined,
nResults: query.similarityTopK,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new client is requiring only one prop so I choose to pass the queryEmbeddings only as we already have them at this stage.

@my8bit my8bit changed the title Update the version of chromadb client to 1.10.3 that is compatible with the latest Docker version of chroma (0.6.3) fix: update the version of chromadb client to 1.10.3 that is compatible with the latest Docker version of chroma (0.6.3) Jan 27, 2025
@@ -43,7 +43,7 @@
"dependencies": {
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"chromadb": "1.9.2",
"chromadb": "1.10.3",
Copy link
Author

@my8bit my8bit Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an alternative approach the latest version (as *) can be specified as well

    "chromadb": "*",
    "chromadb-default-embed": "*"

Copy link
Collaborator

@marcusschiesser marcusschiesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @my8bit - that looks great

Copy link

pkg-pr-new bot commented Jan 30, 2025

Open in Stackblitz

@llamaindex/autotool

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/autotool@1608

@llamaindex/community

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/community@1608

@llamaindex/cloud

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/cloud@1608

@llamaindex/core

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/core@1608

@llamaindex/experimental

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/experimental@1608

llamaindex

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/llamaindex@1608

@llamaindex/env

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/env@1608

@llamaindex/node-parser

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/node-parser@1608

@llamaindex/readers

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/readers@1608

@llamaindex/wasm-tools

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/wasm-tools@1608

@llamaindex/workflow

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/workflow@1608

@llamaindex/anthropic

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/anthropic@1608

@llamaindex/clip

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/clip@1608

@llamaindex/deepinfra

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/deepinfra@1608

@llamaindex/groq

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/groq@1608

@llamaindex/huggingface

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/huggingface@1608

@llamaindex/ollama

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/ollama@1608

@llamaindex/openai

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/openai@1608

@llamaindex/portkey-ai

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/portkey-ai@1608

@llamaindex/replicate

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/replicate@1608

@llamaindex/vercel

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/vercel@1608

@llamaindex/vllm

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/vllm@1608

commit: 8998d36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants