chromadb-client 0.3.26.dev10__tar.gz → 0.3.27.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. chromadb-client-0.3.27.dev0/.github/workflows/chroma-client-integration-test.yml +29 -0
  2. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.pre-commit-config.yaml +13 -8
  3. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.vscode/settings.json +2 -1
  4. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/PKG-INFO +1 -1
  5. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/__init__.py +8 -5
  6. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/api/__init__.py +6 -8
  7. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/api/fastapi.py +27 -5
  8. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/api/local.py +29 -7
  9. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/api/types.py +33 -16
  10. chromadb-client-0.3.27.dev0/chromadb/config.py +210 -0
  11. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/db/__init__.py +12 -13
  12. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/db/base.py +55 -12
  13. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/db/clickhouse.py +54 -26
  14. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/db/duckdb.py +63 -26
  15. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/db/impl/sqlite.py +59 -16
  16. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/db/migrations.py +1 -1
  17. chromadb-client-0.3.27.dev0/chromadb/db/mixins/embeddings_queue.py +270 -0
  18. chromadb-client-0.3.27.dev0/chromadb/db/mixins/sysdb.py +441 -0
  19. chromadb-client-0.3.27.dev0/chromadb/db/system.py +85 -0
  20. chromadb-client-0.3.27.dev0/chromadb/ingest/__init__.py +110 -0
  21. chromadb-client-0.3.27.dev0/chromadb/segment/__init__.py +97 -0
  22. chromadb-client-0.3.27.dev0/chromadb/segment/impl/manager/local.py +127 -0
  23. chromadb-client-0.3.27.dev0/chromadb/segment/impl/metadata/sqlite.py +504 -0
  24. chromadb-client-0.3.27.dev0/chromadb/segment/impl/vector/local_hnsw.py +363 -0
  25. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/telemetry/__init__.py +2 -1
  26. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/telemetry/posthog.py +3 -0
  27. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/conftest.py +55 -27
  28. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/db/test_migrations.py +3 -1
  29. chromadb-client-0.3.27.dev0/chromadb/test/db/test_system.py +317 -0
  30. chromadb-client-0.3.27.dev0/chromadb/test/ingest/test_producer_consumer.py +259 -0
  31. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/property/invariants.py +86 -63
  32. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/property/strategies.py +185 -100
  33. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/property/test_add.py +19 -11
  34. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/property/test_cross_version_persist.py +34 -22
  35. chromadb-client-0.3.27.dev0/chromadb/test/property/test_embeddings.py +302 -0
  36. chromadb-client-0.3.27.dev0/chromadb/test/property/test_filtering.py +261 -0
  37. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/property/test_persist.py +27 -16
  38. chromadb-client-0.3.27.dev0/chromadb/test/segment/test_metadata.py +500 -0
  39. chromadb-client-0.3.27.dev0/chromadb/test/segment/test_vector.py +402 -0
  40. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/test_api.py +10 -11
  41. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/test_chroma.py +4 -3
  42. chromadb-client-0.3.27.dev0/chromadb/test/test_config.py +191 -0
  43. chromadb-client-0.3.27.dev0/chromadb/test/utils/test_messagid.py +93 -0
  44. chromadb-client-0.3.27.dev0/chromadb/types.py +145 -0
  45. chromadb-client-0.3.27.dev0/chromadb/utils/messageid.py +80 -0
  46. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb_client.egg-info/PKG-INFO +1 -1
  47. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb_client.egg-info/SOURCES.txt +24 -1
  48. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/DEVELOP.md +1 -1
  49. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/package.json +3 -2
  50. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/ChromaClient.ts +5 -1
  51. chromadb-client-0.3.27.dev0/clients/js/src/embeddings/WebAIEmbeddingFunction.ts +101 -0
  52. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/types.ts +2 -2
  53. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/get.collection.test.ts +11 -0
  54. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/python/build_python_thin_client.sh +14 -10
  55. chromadb-client-0.3.27.dev0/clients/python/integration-test.sh +30 -0
  56. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/docker-compose.test.yml +1 -1
  57. chromadb-client-0.3.27.dev0/migrations/embeddings_queue/00001-embeddings.sqlite.sql +10 -0
  58. chromadb-client-0.3.27.dev0/migrations/metadb/00001-embedding-metadata.sqlite.sql +24 -0
  59. chromadb-client-0.3.27.dev0/migrations/sysdb/00001-collections.sqlite.sql +14 -0
  60. chromadb-client-0.3.27.dev0/migrations/sysdb/00002-segments.sqlite.sql +16 -0
  61. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/requirements.txt +3 -2
  62. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/requirements_dev.txt +1 -0
  63. chromadb-client-0.3.26.dev10/chromadb/config.py +0 -126
  64. chromadb-client-0.3.26.dev10/chromadb/test/property/test_embeddings.py +0 -272
  65. chromadb-client-0.3.26.dev10/chromadb/test/property/test_filtering.py +0 -201
  66. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.dockerignore +0 -0
  67. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
  68. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
  69. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.github/ISSUE_TEMPLATE/installation_trouble.yaml +0 -0
  70. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.github/workflows/chroma-integration-test.yml +0 -0
  71. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.github/workflows/chroma-release-python-client.yml +0 -0
  72. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.github/workflows/chroma-release.yml +0 -0
  73. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.github/workflows/chroma-test.yml +0 -0
  74. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.github/workflows/pr-review-checklist.yml +0 -0
  75. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/.gitignore +0 -0
  76. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/DEVELOP.md +0 -0
  77. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/Dockerfile +0 -0
  78. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/LICENSE +0 -0
  79. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/README.md +0 -0
  80. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/RELEASE_PROCESS.md +0 -0
  81. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/backup.sh +0 -0
  82. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/build +0 -0
  83. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/docker_entrypoint.sh +0 -0
  84. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/generate_cloudformation.py +0 -0
  85. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/integration-test +0 -0
  86. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/restore.sh +0 -0
  87. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/setup_linux.sh +0 -0
  88. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/setup_mac.sh +0 -0
  89. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/templates/docker-compose.yml +0 -0
  90. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/test-package.sh +0 -0
  91. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/test-remote +0 -0
  92. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/test.py +0 -0
  93. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/bin/version +0 -0
  94. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/api/models/Collection.py +0 -0
  95. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/app.py +0 -0
  96. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/db/impl/__init__.py +0 -0
  97. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/db/index/__init__.py +0 -0
  98. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/db/index/hnswlib.py +0 -0
  99. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/errors.py +0 -0
  100. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/is_thin_client.py +0 -0
  101. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/server/__init__.py +0 -0
  102. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/server/fastapi/__init__.py +0 -0
  103. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/server/fastapi/types.py +0 -0
  104. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/telemetry/events.py +0 -0
  105. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/db/migrations/00001-migration-1.psql.sql +0 -0
  106. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/db/migrations/00001-migration-1.sqlite.sql +0 -0
  107. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/db/migrations/00002-migration-2.psql.sql +0 -0
  108. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/db/migrations/00002-migration-2.sqlite.sql +0 -0
  109. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/db/migrations/00003-migration-3.psql.sql +0 -0
  110. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/db/migrations/00003-migration-3.sqlite.sql +0 -0
  111. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/db/test_base.py +0 -0
  112. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/hnswlib/test_hnswlib.py +0 -0
  113. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/test/property/test_collections.py +0 -0
  114. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/utils/__init__.py +0 -0
  115. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb/utils/embedding_functions.py +0 -0
  116. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb_client.egg-info/dependency_links.txt +0 -0
  117. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb_client.egg-info/requires.txt +0 -0
  118. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/chromadb_client.egg-info/top_level.txt +0 -0
  119. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/.gitignore +0 -0
  120. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/.prettierignore +0 -0
  121. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/.prettierrc.json +0 -0
  122. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/LICENSE +0 -0
  123. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/README.md +0 -0
  124. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/config.yml +0 -0
  125. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/browser/README.md +0 -0
  126. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/browser/app.ts +0 -0
  127. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/browser/index.html +0 -0
  128. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/browser/package.json +0 -0
  129. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/browser/yarn.lock +0 -0
  130. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/node/README.md +0 -0
  131. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/node/app.js +0 -0
  132. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/node/package-lock.json +0 -0
  133. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/node/package.json +0 -0
  134. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/examples/node/yarn.lock +0 -0
  135. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/genapi.sh +0 -0
  136. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/jest.config.ts +0 -0
  137. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/openapitools.json +0 -0
  138. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/package-lock.json +0 -0
  139. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/Collection.ts +0 -0
  140. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/embeddings/CohereEmbeddingFunction.ts +0 -0
  141. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/embeddings/IEmbeddingFunction.ts +0 -0
  142. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/embeddings/OpenAIEmbeddingFunction.ts +0 -0
  143. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/generated/README.md +0 -0
  144. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/generated/api.ts +0 -0
  145. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/generated/configuration.ts +0 -0
  146. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/generated/index.ts +0 -0
  147. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/generated/models.ts +0 -0
  148. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/generated/runtime.ts +0 -0
  149. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/index.ts +0 -0
  150. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/src/utils.ts +0 -0
  151. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/add.collections.test.ts +0 -0
  152. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/client.test.ts +0 -0
  153. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/collection.client.test.ts +0 -0
  154. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/collection.test.ts +0 -0
  155. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/data.ts +0 -0
  156. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/delete.collection.test.ts +0 -0
  157. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/initClient.ts +0 -0
  158. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/peek.collection.test.ts +0 -0
  159. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/query.collection.test.ts +0 -0
  160. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/update.collection.test.ts +0 -0
  161. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/test/upsert.collections.test.ts +0 -0
  162. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/tsconfig.json +0 -0
  163. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/tsconfig.module.json +0 -0
  164. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/js/yarn.lock +0 -0
  165. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/python/README.md +0 -0
  166. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/python/is_thin_client.py +0 -0
  167. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/clients/python/pyproject.toml +0 -0
  168. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/config/backup_disk.xml +0 -0
  169. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/config/chroma_users.xml +0 -0
  170. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/docker-compose.server.example.yml +0 -0
  171. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/docker-compose.yml +0 -0
  172. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/examples/alternative_embeddings.ipynb +0 -0
  173. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/examples/deployments/google-cloud-compute/README.md +0 -0
  174. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/examples/deployments/google-cloud-compute/chroma.tf +0 -0
  175. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/examples/deployments/google-cloud-compute/main.tf +0 -0
  176. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/examples/deployments/google-cloud-compute/startup.sh +0 -0
  177. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/examples/deployments/google-cloud-compute/variables.tf +0 -0
  178. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/examples/local_persistence.ipynb +0 -0
  179. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/examples/where_filtering.ipynb +0 -0
  180. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/log_config.yml +0 -0
  181. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/pull_request_template.md +0 -0
  182. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/pyproject.toml +0 -0
  183. {chromadb-client-0.3.26.dev10 → chromadb-client-0.3.27.dev0}/setup.cfg +0 -0
@@ -0,0 +1,29 @@
1
+ name: Chroma Client Integration Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ test:
13
+ timeout-minutes: 90
14
+ strategy:
15
+ matrix:
16
+ python: ['3.7', '3.8', '3.9', '3.10']
17
+ platform: [ubuntu-latest]
18
+ runs-on: ${{ matrix.platform }}
19
+ steps:
20
+ - name: Checkout
21
+ uses: actions/checkout@v3
22
+ - name: Set up Python ${{ matrix.python }}
23
+ uses: actions/setup-python@v4
24
+ with:
25
+ python-version: ${{ matrix.python }}
26
+ - name: Install test dependencies
27
+ run: python -m pip install -r requirements.txt && python -m pip install -r requirements_dev.txt
28
+ - name: Test
29
+ run: clients/python/integration-test.sh
@@ -13,15 +13,12 @@ repos:
13
13
  - id: check-case-conflict
14
14
  - id: check-docstring-first
15
15
 
16
-
17
16
  - repo: https://github.com/psf/black
18
17
  # https://github.com/psf/black/issues/2493
19
- rev: 'refs/tags/23.3.0:refs/tags/23.3.0'
18
+ rev: "refs/tags/23.3.0:refs/tags/23.3.0"
20
19
  hooks:
21
20
  - id: black
22
21
 
23
-
24
-
25
22
  - repo: https://github.com/PyCQA/flake8
26
23
  rev: 6.0.0
27
24
  hooks:
@@ -31,8 +28,16 @@ repos:
31
28
  - "--max-line-length=88"
32
29
 
33
30
  - repo: https://github.com/pre-commit/mirrors-mypy
34
- rev: 'v1.2.0'
31
+ rev: "v1.2.0"
35
32
  hooks:
36
- - id: mypy
37
- args: [--strict, --ignore-missing-imports, --follow-imports=silent]
38
- additional_dependencies: ["types-requests", "pydantic", "overrides", "hypothesis", "pytest"]
33
+ - id: mypy
34
+ args: [--strict, --ignore-missing-imports, --follow-imports=silent, --disable-error-code=type-abstract]
35
+ additional_dependencies:
36
+ [
37
+ "types-requests",
38
+ "pydantic",
39
+ "overrides",
40
+ "hypothesis",
41
+ "pytest",
42
+ "numpy",
43
+ ]
@@ -33,6 +33,7 @@
33
33
  "--ignore-missing-imports",
34
34
  "--show-column-numbers",
35
35
  "--no-pretty",
36
- "--strict"
36
+ "--strict",
37
+ "--disable-error-code=type-abstract"
37
38
  ]
38
39
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chromadb-client
3
- Version: 0.3.26.dev10
3
+ Version: 0.3.27.dev0
4
4
  Summary: Chroma Client.
5
5
  Author-email: Jeff Huber <jeff@trychroma.com>, Anton Troynikov <anton@trychroma.com>
6
6
  Project-URL: Homepage, https://github.com/chroma-core/chroma
@@ -1,6 +1,7 @@
1
1
  import chromadb.config
2
2
  import logging
3
3
  from chromadb.telemetry.events import ClientStartEvent
4
+ from chromadb.telemetry import Telemetry
4
5
  from chromadb.config import Settings, System
5
6
  from chromadb.api import API
6
7
 
@@ -8,7 +9,7 @@ logger = logging.getLogger(__name__)
8
9
 
9
10
  __settings = Settings()
10
11
 
11
- __version__ = "0.3.25"
12
+ __version__ = "0.3.26"
12
13
 
13
14
 
14
15
  def configure(**kwargs) -> None: # type: ignore
@@ -22,14 +23,16 @@ def get_settings() -> Settings:
22
23
 
23
24
 
24
25
  def Client(settings: Settings = __settings) -> API:
25
- """Return a chroma.API instance based on the provided or environmental
26
- settings, optionally overriding the DB instance."""
26
+ """Return a running chroma.API instance"""
27
27
 
28
28
  system = System(settings)
29
29
 
30
- telemetry_client = system.get_telemetry()
30
+ telemetry_client = system.instance(Telemetry)
31
+ api = system.instance(API)
32
+
33
+ system.start()
31
34
 
32
35
  # Submit event for client start
33
36
  telemetry_client.capture(ClientStartEvent())
34
37
 
35
- return system.get_api()
38
+ return api
@@ -16,15 +16,12 @@ from chromadb.api.types import (
16
16
  GetResult,
17
17
  WhereDocument,
18
18
  )
19
+ from chromadb.config import Component
19
20
  import chromadb.utils.embedding_functions as ef
20
- from chromadb.telemetry import Telemetry
21
+ from overrides import override
21
22
 
22
23
 
23
- class API(ABC):
24
- @abstractmethod
25
- def __init__(self, telemetry_client: Telemetry):
26
- pass
27
-
24
+ class API(Component, ABC):
28
25
  @abstractmethod
29
26
  def heartbeat(self) -> int:
30
27
  """Returns the current server time in nanoseconds to check if the server is alive
@@ -289,15 +286,16 @@ class API(ABC):
289
286
  """
290
287
  pass
291
288
 
289
+ @override
292
290
  @abstractmethod
293
- def reset(self) -> bool:
291
+ def reset(self) -> None:
294
292
  """Resets the database
295
293
  ⚠️ This is destructive and will delete all data in the database.
296
294
  Args:
297
295
  None
298
296
 
299
297
  Returns:
300
- True if the reset was successful
298
+ None
301
299
  """
302
300
  pass
303
301
 
@@ -22,22 +22,27 @@ from typing import Sequence
22
22
  from chromadb.api.models.Collection import Collection
23
23
  import chromadb.errors as errors
24
24
  from uuid import UUID
25
+ from chromadb.telemetry import Telemetry
26
+ from overrides import override
25
27
 
26
28
 
27
29
  class FastAPI(API):
28
30
  def __init__(self, system: System):
31
+ super().__init__(system)
29
32
  url_prefix = "https" if system.settings.chroma_server_ssl_enabled else "http"
30
33
  system.settings.require("chroma_server_host")
31
34
  system.settings.require("chroma_server_http_port")
32
35
  self._api_url = f"{url_prefix}://{system.settings.chroma_server_host}:{system.settings.chroma_server_http_port}/api/v1"
33
- self._telemetry_client = system.get_telemetry()
36
+ self._telemetry_client = self.require(Telemetry)
34
37
 
38
+ @override
35
39
  def heartbeat(self) -> int:
36
40
  """Returns the current server time in nanoseconds to check if the server is alive"""
37
41
  resp = requests.get(self._api_url)
38
42
  raise_chroma_error(resp)
39
43
  return int(resp.json()["nanosecond heartbeat"])
40
44
 
45
+ @override
41
46
  def list_collections(self) -> Sequence[Collection]:
42
47
  """Returns a list of all collections"""
43
48
  resp = requests.get(self._api_url + "/collections")
@@ -49,6 +54,7 @@ class FastAPI(API):
49
54
 
50
55
  return collections
51
56
 
57
+ @override
52
58
  def create_collection(
53
59
  self,
54
60
  name: str,
@@ -73,6 +79,7 @@ class FastAPI(API):
73
79
  metadata=resp_json["metadata"],
74
80
  )
75
81
 
82
+ @override
76
83
  def get_collection(
77
84
  self,
78
85
  name: str,
@@ -90,6 +97,7 @@ class FastAPI(API):
90
97
  metadata=resp_json["metadata"],
91
98
  )
92
99
 
100
+ @override
93
101
  def get_or_create_collection(
94
102
  self,
95
103
  name: str,
@@ -102,6 +110,7 @@ class FastAPI(API):
102
110
  name, metadata, embedding_function, get_or_create=True
103
111
  )
104
112
 
113
+ @override
105
114
  def _modify(
106
115
  self,
107
116
  id: UUID,
@@ -115,11 +124,13 @@ class FastAPI(API):
115
124
  )
116
125
  raise_chroma_error(resp)
117
126
 
127
+ @override
118
128
  def delete_collection(self, name: str) -> None:
119
129
  """Deletes a collection"""
120
130
  resp = requests.delete(self._api_url + "/collections/" + name)
121
131
  raise_chroma_error(resp)
122
132
 
133
+ @override
123
134
  def _count(self, collection_id: UUID) -> int:
124
135
  """Returns the number of embeddings in the database"""
125
136
  resp = requests.get(
@@ -128,13 +139,15 @@ class FastAPI(API):
128
139
  raise_chroma_error(resp)
129
140
  return cast(int, resp.json())
130
141
 
131
- def _peek(self, collection_id: UUID, limit: int = 10) -> GetResult:
142
+ @override
143
+ def _peek(self, collection_id: UUID, n: int = 10) -> GetResult:
132
144
  return self._get(
133
145
  collection_id,
134
- limit=limit,
146
+ limit=n,
135
147
  include=["embeddings", "documents", "metadatas"],
136
148
  )
137
149
 
150
+ @override
138
151
  def _get(
139
152
  self,
140
153
  collection_id: UUID,
@@ -177,6 +190,7 @@ class FastAPI(API):
177
190
  documents=body.get("documents", None),
178
191
  )
179
192
 
193
+ @override
180
194
  def _delete(
181
195
  self,
182
196
  collection_id: UUID,
@@ -196,6 +210,7 @@ class FastAPI(API):
196
210
  raise_chroma_error(resp)
197
211
  return cast(IDs, resp.json())
198
212
 
213
+ @override
199
214
  def _add(
200
215
  self,
201
216
  ids: IDs,
@@ -227,6 +242,7 @@ class FastAPI(API):
227
242
  raise_chroma_error(resp)
228
243
  return True
229
244
 
245
+ @override
230
246
  def _update(
231
247
  self,
232
248
  collection_id: UUID,
@@ -255,6 +271,7 @@ class FastAPI(API):
255
271
  resp.raise_for_status()
256
272
  return True
257
273
 
274
+ @override
258
275
  def _upsert(
259
276
  self,
260
277
  collection_id: UUID,
@@ -285,6 +302,7 @@ class FastAPI(API):
285
302
  resp.raise_for_status()
286
303
  return True
287
304
 
305
+ @override
288
306
  def _query(
289
307
  self,
290
308
  collection_id: UUID,
@@ -320,18 +338,20 @@ class FastAPI(API):
320
338
  documents=body.get("documents", None),
321
339
  )
322
340
 
323
- def reset(self) -> bool:
341
+ @override
342
+ def reset(self) -> None:
324
343
  """Resets the database"""
325
344
  resp = requests.post(self._api_url + "/reset")
326
345
  raise_chroma_error(resp)
327
- return cast(bool, resp.json())
328
346
 
347
+ @override
329
348
  def persist(self) -> bool:
330
349
  """Persists the database"""
331
350
  resp = requests.post(self._api_url + "/persist")
332
351
  raise_chroma_error(resp)
333
352
  return cast(bool, resp.json())
334
353
 
354
+ @override
335
355
  def raw_sql(self, sql: str) -> pd.DataFrame:
336
356
  """Runs a raw SQL query against the database"""
337
357
  resp = requests.post(
@@ -340,6 +360,7 @@ class FastAPI(API):
340
360
  raise_chroma_error(resp)
341
361
  return pd.DataFrame.from_dict(resp.json())
342
362
 
363
+ @override
343
364
  def create_index(self, collection_name: str) -> bool:
344
365
  """Creates an index for the given space key"""
345
366
  resp = requests.post(
@@ -348,6 +369,7 @@ class FastAPI(API):
348
369
  raise_chroma_error(resp)
349
370
  return cast(bool, resp.json())
350
371
 
372
+ @override
351
373
  def get_version(self) -> str:
352
374
  """Returns the version of the server"""
353
375
  resp = requests.get(self._api_url + "/version")
@@ -27,6 +27,8 @@ import re
27
27
 
28
28
  from chromadb.telemetry import Telemetry
29
29
  from chromadb.telemetry.events import CollectionAddEvent, CollectionDeleteEvent
30
+ from overrides import override
31
+ import pandas as pd
30
32
 
31
33
 
32
34
  # mimics s3 bucket requirements for naming
@@ -55,9 +57,11 @@ class LocalAPI(API):
55
57
  _telemetry_client: Telemetry
56
58
 
57
59
  def __init__(self, system: System):
58
- self._db = system.get_db()
59
- self._telemetry_client = system.get_telemetry()
60
+ super().__init__(system)
61
+ self._db = self.require(DB)
62
+ self._telemetry_client = self.require(Telemetry)
60
63
 
64
+ @override
61
65
  def heartbeat(self) -> int:
62
66
  """Ping the database to ensure it is alive
63
67
 
@@ -70,6 +74,7 @@ class LocalAPI(API):
70
74
  #
71
75
  # COLLECTION METHODS
72
76
  #
77
+ @override
73
78
  def create_collection(
74
79
  self,
75
80
  name: str,
@@ -111,6 +116,7 @@ class LocalAPI(API):
111
116
  metadata=res[0][2],
112
117
  )
113
118
 
119
+ @override
114
120
  def get_or_create_collection(
115
121
  self,
116
122
  name: str,
@@ -136,6 +142,7 @@ class LocalAPI(API):
136
142
  name, metadata, embedding_function, get_or_create=True
137
143
  )
138
144
 
145
+ @override
139
146
  def get_collection(
140
147
  self,
141
148
  name: str,
@@ -169,6 +176,7 @@ class LocalAPI(API):
169
176
  metadata=res[0][2],
170
177
  )
171
178
 
179
+ @override
172
180
  def list_collections(self) -> Sequence[Collection]:
173
181
  """List all collections.
174
182
  Returns:
@@ -193,17 +201,19 @@ class LocalAPI(API):
193
201
  )
194
202
  return collections
195
203
 
204
+ @override
196
205
  def _modify(
197
206
  self,
198
207
  id: UUID,
199
208
  new_name: Optional[str] = None,
200
- new_metadata: Optional[Metadata] = None,
209
+ new_metadata: Optional[CollectionMetadata] = None,
201
210
  ) -> None:
202
211
  if new_name is not None:
203
212
  check_index_name(new_name)
204
213
 
205
214
  self._db.update_collection(id, new_name, new_metadata)
206
215
 
216
+ @override
207
217
  def delete_collection(self, name: str) -> None:
208
218
  """Delete a collection with the given name.
209
219
  Args:
@@ -222,6 +232,7 @@ class LocalAPI(API):
222
232
  #
223
233
  # ITEM METHODS
224
234
  #
235
+ @override
225
236
  def _add(
226
237
  self,
227
238
  ids: IDs,
@@ -251,6 +262,7 @@ class LocalAPI(API):
251
262
  self._telemetry_client.capture(CollectionAddEvent(str(collection_id), len(ids)))
252
263
  return True # NIT: should this return the ids of the succesfully added items?
253
264
 
265
+ @override
254
266
  def _update(
255
267
  self,
256
268
  collection_id: UUID,
@@ -262,6 +274,7 @@ class LocalAPI(API):
262
274
  self._db.update(collection_id, ids, embeddings, metadatas, documents)
263
275
  return True
264
276
 
277
+ @override
265
278
  def _upsert(
266
279
  self,
267
280
  collection_id: UUID,
@@ -323,6 +336,7 @@ class LocalAPI(API):
323
336
 
324
337
  return True
325
338
 
339
+ @override
326
340
  def _get(
327
341
  self,
328
342
  collection_id: UUID,
@@ -390,6 +404,7 @@ class LocalAPI(API):
390
404
  get_result["ids"].append(entry[column_index["id"]])
391
405
  return get_result
392
406
 
407
+ @override
393
408
  def _delete(
394
409
  self,
395
410
  collection_id: UUID,
@@ -415,10 +430,12 @@ class LocalAPI(API):
415
430
 
416
431
  return deleted_uuids
417
432
 
433
+ @override
418
434
  def _count(self, collection_id: UUID) -> int:
419
435
  return self._db.count(collection_id)
420
436
 
421
- def reset(self) -> bool:
437
+ @override
438
+ def reset(self) -> None:
422
439
  """Reset the database. This will delete all collections and items.
423
440
 
424
441
  Returns:
@@ -426,8 +443,8 @@ class LocalAPI(API):
426
443
 
427
444
  """
428
445
  self._db.reset()
429
- return True
430
446
 
447
+ @override
431
448
  def _query(
432
449
  self,
433
450
  collection_id: UUID,
@@ -498,14 +515,17 @@ class LocalAPI(API):
498
515
 
499
516
  return query_result
500
517
 
501
- def raw_sql(self, raw_sql: str): # type: ignore
502
- return self._db.raw_sql(raw_sql) # type: ignore
518
+ @override
519
+ def raw_sql(self, sql: str) -> pd.DataFrame:
520
+ return self._db.raw_sql(sql) # type: ignore
503
521
 
522
+ @override
504
523
  def create_index(self, collection_name: str) -> bool:
505
524
  collection_uuid = self._db.get_collection_uuid_from_name(collection_name)
506
525
  self._db.create_index(collection_uuid=collection_uuid)
507
526
  return True
508
527
 
528
+ @override
509
529
  def _peek(self, collection_id: UUID, n: int = 10) -> GetResult:
510
530
  return self._get(
511
531
  collection_id=collection_id,
@@ -513,6 +533,7 @@ class LocalAPI(API):
513
533
  include=["embeddings", "documents", "metadatas"],
514
534
  )
515
535
 
536
+ @override
516
537
  def persist(self) -> bool:
517
538
  """Persist the database to disk.
518
539
 
@@ -523,6 +544,7 @@ class LocalAPI(API):
523
544
  self._db.persist()
524
545
  return True
525
546
 
547
+ @override
526
548
  def get_version(self) -> str:
527
549
  """Get the version of Chroma.
528
550
 
@@ -1,16 +1,27 @@
1
1
  from typing import Any, Optional, Union, Dict, Sequence, TypeVar, List
2
2
  from typing_extensions import Literal, TypedDict, Protocol
3
3
  import chromadb.errors as errors
4
+ from chromadb.types import (
5
+ Metadata,
6
+ Vector,
7
+ LiteralValue,
8
+ LogicalOperator,
9
+ WhereOperator,
10
+ OperatorExpression,
11
+ Where,
12
+ WhereDocumentOperator,
13
+ WhereDocument,
14
+ )
15
+
16
+ # Re-export types from chromadb.types
17
+ __all__ = ["Metadata", "Where", "WhereDocument"]
4
18
 
5
19
  ID = str
6
20
  IDs = List[ID]
7
21
 
8
- Number = Union[int, float]
9
- Embedding = List[Number]
22
+ Embedding = Vector
10
23
  Embeddings = List[Embedding]
11
24
 
12
-
13
- Metadata = Dict[str, Union[str, int, float]]
14
25
  Metadatas = List[Metadata]
15
26
 
16
27
  CollectionMetadata = Dict[Any, Any]
@@ -22,20 +33,24 @@ Parameter = TypeVar("Parameter", Embedding, Document, Metadata, ID)
22
33
  T = TypeVar("T")
23
34
  OneOrMany = Union[T, List[T]]
24
35
 
25
- Include = List[Literal["documents", "embeddings", "metadatas", "distances"]]
26
-
27
- # Grammar for where expressions
28
- LiteralValue = Union[str, int, float]
29
- LogicalOperator = Literal["$and", "$or"]
30
- WhereOperator = Literal["$gt", "$gte", "$lt", "$lte", "$ne", "$eq"]
31
- OperatorExpression = Dict[Union[WhereOperator, LogicalOperator], LiteralValue]
32
-
33
- Where = Dict[
34
- Union[str, LogicalOperator], Union[LiteralValue, OperatorExpression, List["Where"]]
36
+ # This should ust be List[Literal["documents", "embeddings", "metadatas", "distances"]]
37
+ # However, this provokes an incompatibility with the Overrides library and Python 3.7
38
+ Include = List[
39
+ Union[
40
+ Literal["documents"],
41
+ Literal["embeddings"],
42
+ Literal["metadatas"],
43
+ Literal["distances"],
44
+ ]
35
45
  ]
36
46
 
37
- WhereDocumentOperator = Literal["$contains", LogicalOperator]
38
- WhereDocument = Dict[WhereDocumentOperator, Union[str, List["WhereDocument"]]]
47
+ # Re-export types from chromadb.types
48
+ LiteralValue = LiteralValue
49
+ LogicalOperator = LogicalOperator
50
+ WhereOperator = WhereOperator
51
+ OperatorExpression = OperatorExpression
52
+ Where = Where
53
+ WhereDocumentOperator = WhereDocumentOperator
39
54
 
40
55
 
41
56
  class GetResult(TypedDict):
@@ -135,6 +150,8 @@ def validate_where(where: Where) -> Where:
135
150
  """
136
151
  if not isinstance(where, dict):
137
152
  raise ValueError(f"Expected where to be a dict, got {where}")
153
+ if len(where) != 1:
154
+ raise ValueError(f"Expected where to have exactly one operator, got {where}")
138
155
  for key, value in where.items():
139
156
  if not isinstance(key, str):
140
157
  raise ValueError(f"Expected where key to be a str, got {key}")