Repository navigation
2.19.0
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, ascollection.conditional()of the Python and JavaScript clients of Chroma. After a conflict, a stale read or a429Backoff, it runs the operation again in a new transaction, up tomaxRetriestimes, 3 by default.BeginConditionalTransaction()gives a transaction to commit without a run, withGetAsync,AddAsync,UpdateAsync,UpsertAsync,DeleteAsyncby ids, andCommitAsync. A conflict throws aChromaConditionalWriteConflictException(409), a stale read aChromaStaleReadException(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, asAttachedFunction.add_inputof 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 ofAddAsync,UpdateAsync,UpsertAsync,DeleteAsyncandDeleteAllAsyncnow goes again after that refusal only, and the batches that went are not sent again.ChromaWriteRetries.Defaultmakes 12 attempts, with a base delay of 1 second and a largest delay of 10 seconds: from 42.5 to 85 seconds in all. ARetry-Afterof the refusal is waited instead; VecturaDB sends one.WithWriteRetriessets other attempts and delays, andChromaWriteRetries.Noneturns them off. Any other error of a write, also another429, stands at once. - Distributed Chroma, the one Chroma Cloud runs on, installed elsewhere with the Helm chart of Chroma or an operator:
WithDistributedChroma(), orDistributed=truein the connection string, says it. The client then throws anArgumentExceptionbefore a filter on the documents that distributed Chroma gets wrong (KD-56, KD-57), also in a delete, sends the indexes added withifSupportedwithout 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.Distributedwith a value other thantrueorfalsethrows anArgumentException. - The server block of
pre-flight-checks, as VecturaDB sends it:ChromaPreFlightChecks.Serverhas its name, version and features. A server that declaressparse_vector_indexgets the indexes added withifSupported, 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:AddFunctionInputAsyncand conditional transactions.docs/connecting.md: distributed Chroma.docs/COMPATIBILITY.md: KD-59, agetduring 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.mdand 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