Skip to content

2.19.0

Choose a tag to compare

@Laurianti Laurianti released this 06 Nov 14:26
· 44 commits to main since this release
v2.19.0
8eb9db4

ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection 2.19.0, released together.

New

  • Conditional transactions: collectionClient.RunConditionalTransactionAsync(operation) reads records and writes them only if none of them changed after its reads, as collection.conditional() of the Python and JavaScript clients of Chroma. After a conflict, a stale read or a 429 Backoff, it runs the operation again in a new transaction, up to maxRetries times, 3 by default. BeginConditionalTransaction() gives a transaction to commit without a run, with GetAsync, AddAsync, UpdateAsync, UpsertAsync, DeleteAsync by ids, and CommitAsync. A conflict throws a ChromaConditionalWriteConflictException (409), a stale read a ChromaStaleReadException (412). Distributed Chroma, the one Chroma Cloud runs on, has conditional transactions for the tenants that the configuration of its frontend enables, and so does VecturaDB; Chroma 1.5.9 does not.
  • AddFunctionInputAsync(name, inputCollectionId) adds another input collection to an asynchronous attached function, as AttachedFunction.add_input of the Python client, and says whether the input was added now: on distributed Chroma, the one Chroma Cloud runs on, and on VecturaDB.
  • Writes refused for compaction: distributed Chroma, the one Chroma Cloud runs on, refuses a write to a collection whose log holds too many records not yet compacted, with 429 "log needs compaction before accepting more writes; please backoff exponentially and retry". Each request of AddAsync, UpdateAsync, UpsertAsync, DeleteAsync and DeleteAllAsync now goes again after that refusal only, and the batches that went are not sent again. ChromaWriteRetries.Default makes 12 attempts, with a base delay of 1 second and a largest delay of 10 seconds: from 42.5 to 85 seconds in all. A Retry-After of the refusal is waited instead; VecturaDB sends one. WithWriteRetries sets other attempts and delays, and ChromaWriteRetries.None turns them off. Any other error of a write, also another 429, stands at once.
  • Distributed Chroma, the one Chroma Cloud runs on, installed elsewhere with the Helm chart of Chroma or an operator: WithDistributedChroma(), or Distributed=true in the connection string, says it. The client then throws an ArgumentException before a filter on the documents that distributed Chroma gets wrong (KD-56, KD-57), also in a delete, sends the indexes added with ifSupported without the key quota of Chroma Cloud, and deletes a collection or a database in one request. Chroma Cloud is distributed Chroma whatever the options say, and keeps its quotas. Distributed with a value other than true or false throws an ArgumentException.
  • The server block of pre-flight-checks, as VecturaDB sends it: ChromaPreFlightChecks.Server has its name, version and features. A server that declares sparse_vector_index gets the indexes added with ifSupported, without the key quota of Chroma Cloud. A server that says what it is in that block is what it says, whatever the options say. Chroma and Chroma Cloud send no block, so nothing changes for them.

Fixes

  • The messages, the comments, the README and the docs about the Search API, fork, the fork count, the indexing status, the read levels, the SPANN index, sparse vector indexes, attached functions and conditional transactions now name the servers that have them: distributed Chroma, the one Chroma Cloud runs on, and VecturaDB. They said Chroma Cloud only. The ones on the filters on the documents of KD-56 and KD-57 say that the client throws when it knows the server is distributed Chroma: on Chroma Cloud, or elsewhere with WithDistributedChroma().
  • On nuget.org the README showed the badges of OpenSSF Scorecard, OpenSSF Best Practices and GitHub Codespaces blank: they come from img.shields.io now, which nuget.org shows.
  • THIRD-PARTY-NOTICES.md, in the package of ChromaDotNet.Client, credits Chroma for the port of its BM25 function, with its license, the Apache License 2.0.

Docs

  • docs/conditional-transactions.md: conditional transactions. docs/errors.md: writes refused for compaction and the exceptions of a conditional transaction. docs/chroma-cloud.md: AddFunctionInputAsync and conditional transactions. docs/connecting.md: distributed Chroma.
  • docs/COMPATIBILITY.md: KD-59, a get during concurrent upserts of the same record that returns metadata mixed from two versions on Chroma 1.5.9, the measures of KD-56 and KD-57 on distributed Chroma, and the order of the databases that distributed Chroma lists.
  • docs/embeddings.md and the README: ChromaDotNet.Embeddings, the embeddings of the Python client. The README points to ChromaDotNet.Local.ChromaDB, the package with the engine. docs/about-this-fork.md: the original ChromaDB.Client package is deprecated on NuGet in favor of ChromaDotNet.Client, and the repository left the fork network of ssone95/ChromaDB.Client.

Nothing breaks for the existing code: the public API only gains members. A write refused because the log needs compaction now goes again, and with ChromaWriteRetries.None it throws at once, as before.

NuGet: https://www.nuget.org/packages/ChromaDotNet.Client/2.19.0 and https://www.nuget.org/packages/ChromaDotNet.Client.DependencyInjection/2.19.0