Repository navigation
Bump ChromaDotNet.Client.DependencyInjection from 2.11.0 to 2.18.1 - #2327
Open
dependabot[bot] wants to merge 1 commit into
Open
dependabot[bot] wants to merge 1 commit into
dependabot[bot] wants to merge 1 commit into
Conversation
--- updated-dependencies: - dependency-name: ChromaDotNet.Client.DependencyInjection dependency-version: 2.18.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 2327Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 2327" |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated ChromaDotNet.Client.DependencyInjection from 2.11.0 to 2.18.1.
Release notes
Sourced from ChromaDotNet.Client.DependencyInjection's releases.
2.18.1
ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection 2.18.1, released together: the same code as 2.18.0.
Packages
Packages: ChromaDotNet.Client 2.18.1, ChromaDotNet.Client.DependencyInjection 2.18.1
2.18.0
ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection 2.18.0, released together.
New
ChromaReadRetries.MinDelay: a read never goes again at once. The delay before a new attempt is a random time fromMinDelayto the smaller ofMaxDelayandBaseDelaytimes 2 to the attempts that went again before.new ChromaReadRetries(maxAttempts, minDelay, baseDelay, maxDelay)takes it, from zero to the base; the constructor without it takes 0.8 times the base, the lower bound of the jitter of Azure.Core. The default now waits 40 to 50 ms, then 40 to 100 ms and 40 to 200 ms;ChromaReadRetries.Nonedoes not change.client.GetCollectionClient(name, createIfMissing: true)gets or creates the collection at its first operation, with one request that the operations starting before it ends share, andawait client.GetOrCreateCollectionClientAsync(name)does it at once. Both take aChromaCollectionDefinitiontoo, keep the collection, and create it again, empty, when it is deleted elsewhere.AddChromaClientFromServicesandAddKeyedChromaClientFromServicesmake the options from the services when the client is resolved, so the address can come fromIConfigurationorIOptionsof the application.Fixes
chroma:document, where Chroma keeps the document of a record, throws anArgumentExceptionbefore the request, inAddAsync,UpdateAsyncandUpsertAsync. Such a value, like a number, a Boolean, a list, or a null in an update or an upsert, makes Chroma 1.0.0 to 1.5.9 fail every add and get of the server, on every collection, until it restarts (KD-58). The same holds for the null of a deleted document or the mark thatWithDocumentCopyKeyorWithDocumentDeletionKeywould write under that key.chroma:documentgoes as before and sets the document, also aGuid, a date or abyte[], which the client writes as text. The other keys with the prefixchroma:go as before too.Docs
docs/COMPATIBILITY.md: KD-58.docs/metadata.md: the keychroma:document.docs/errors.md:MinDelay.docs/collections.md: collections created when missing.docs/dependency-injection.md: options made from the services.Nothing breaks for the existing code: every setting of
ChromaReadRetriesthat was valid stays valid.NuGet: https://www.nuget.org/packages/ChromaDotNet.Client/2.18.0 and https://www.nuget.org/packages/ChromaDotNet.Client.DependencyInjection/2.18.0
2.17.0
ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection 2.17.0, released together.
New
ChromaCollectionClient.WithEmbeddingGenerator(generator)takes anIEmbeddingGenerator<string, Embedding<float>>of Microsoft.Extensions.AI. The client of the collection then computes the embeddings, as an embedding function does in the Python client of Chroma:AddAsync,UpdateAsyncandUpsertAsynccompute the embeddings of the records given with documents and without embeddings. Records given with embeddings keep them.QueryAsync(queryText)andQueryTextsAsync(queryTexts)query by text, asquery_textsin the Python client.ChromaCollectionDefinition.EmbeddingGeneratordeclares the default embedding function of Chroma: with a generator whose metadata has the providerchromaand the modelall-MiniLM-L6-v2, a new collection stores the functiondefault, as the Python client does, so the Python client reads it with its default embedding function. Another generator declares nothing.Docs
docs/embeddings.mdis new, anddocs/records.mdlinks it.SECURITY.md: the Cosign command matches the dots of the signing identity as dots, so it accepts only this repository.The API of the client does not break: without a generator, the requests do not change. One change is visible: on .NET 8 and .NET Framework an application that uses a preview of Microsoft.Extensions.AI before 9.5.0 now gets Microsoft.Extensions.AI.Abstractions 9.5.0, the first stable release, and may need the names of that release, like
GenerateVectorAsyncforGenerateEmbeddingVectorAsync.NuGet: https://www.nuget.org/packages/ChromaDotNet.Client/2.17.0 and https://www.nuget.org/packages/ChromaDotNet.Client.DependencyInjection/2.17.0
2.16.0
ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection 2.16.0, released together.
New
ChromaCollectionClient.DeleteAllAsync()deletes every record of the collection, which stays, and returns how many it deleted. It reads a page of ids from the start, as large as the batch size of the server and of Chroma Cloud, deletes them, and goes on until none is left.ChromaWhereDocumentOperator.FromDictionarytakes a filter on the documents written as the dictionary of thewhere_documentof the Chroma API, asChromaWhereOperator.FromDictionarydoes forwhere. Get, query and delete send it as it is; the Search API gets it on#document.AddAsync,UpdateAsyncandUpsertAsync, where it threw anArgumentException: every tested Chroma, 0.4.10 to 1.5.9 and Chroma Cloud, treats the two the same.Fixes
JsonNode. A pattern like^$throws before any request, also in a delete. This holds forChromaWhereOperator.FromDictionaryof 2.15.0 too.DeleteAllAsynclearn the quotas of the reads and of the deletes of Chroma Cloud from its422answer, and read or delete again in smaller batches, without doing a delete twice. Before, a client withWithBatchSplittingabove 300 failed on its first read.$andor$orin a filter given as a dictionary, as JSON or as aList<object>, goes split as the same filter written with the operators (KD-4).ChromaExceptionthat names the pattern, its bytes and the limit. The client still sends every pattern: a tenant can have a higher quota.Docs
docs/records.md,docs/metadata.md,docs/queries-and-filters.mdanddocs/COMPATIBILITY.mdsay all of the above.Nothing breaks for the existing code. One change is visible:
FromDictionarywrites the dictionary to JSON when it gets it, so a value the client cannot write, like a type outside its JSON context under NativeAOT, throws there instead of when the filter goes, and later changes to the dictionary do not change the filter.NuGet: https://www.nuget.org/packages/ChromaDotNet.Client/2.16.0 and https://www.nuget.org/packages/ChromaDotNet.Client.DependencyInjection/2.16.0
2.15.0
ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection 2.15.0, released together.
New
ChromaWhereOperator.FromDictionarytakes a filter already written as the dictionary of thewhereof the Chroma API, as the Python client takes it, and sends it as it is:FromDictionary(new Dictionary<string, object> { ["year"] = new Dictionary<string, object> { ["$gte"] = 2020 } }).&and|join it to the other filters;Notthrows aNotSupportedExceptionon it, as Chroma has no$notand the client does not read the dictionary.Docs
docs/queries-and-filters.mdsays how to useFromDictionary.Nothing changes for the existing code.
NuGet: https://www.nuget.org/packages/ChromaDotNet.Client/2.15.0 and https://www.nuget.org/packages/ChromaDotNet.Client.DependencyInjection/2.15.0
2.14.0
ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection 2.14.0, released together.
New
Reads go again after an error that can pass. Each request of
GetAsync,PeekAsync,QueryAsync,SearchAsyncandCountAsyncgoes again after:429,500,502,503or504, other than a missing collection;So do the reads that a write makes first: the get of
ChromaUpsertStrategy.SkipUnchangedEmbeddings, the get ofWithReadsBeyondKeyQuota()on Chroma Cloud, and the pages of ids thatDeleteCollectionAsyncreads withdeleteRecordsFirst.Before each new attempt the client waits with the exponential backoff with full jitter of AWS: a random time between zero and the smaller of the largest delay and the base delay times 2 to the attempts that went again before. By default, 4 attempts at most, a base delay of 50 ms and a largest delay of 1 second: a read that keeps failing waits 350 ms at most before its error.
ChromaConfigurationOptions.ReadRetriesandWithReadRetries(ChromaReadRetries)set the attempts, withChromaReadRetries.Default, orMaxAttempts,BaseDelayandMaxDelayof your own.ChromaReadRetries.Noneturns them off, as in 2.13.0.Changes
ChromaExceptionthat says it, like "The answer of the server to a get has 1 id and 0 embeddings", instead of anArgumentOutOfRangeException.HttpClientdoes not go again either.MaxAttemptsqueries in all.500after its collection is deleted and created again, that count takes 239 ms with the default, as a median of 20, and 6 ms withChromaReadRetries.None.Docs
docs/errors.mdsays which reads go again, after which errors, and how to change the attempts.NuGet: https://www.nuget.org/packages/ChromaDotNet.Client/2.14.0 and https://www.nuget.org/packages/ChromaDotNet.Client.DependencyInjection/2.14.0
2.13.0
ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection 2.13.0, released together.
New
NullDocumentsDelete, next toWithDocumentCopyKey:WithDocumentDeletionKey(key)writes an empty document withtrueunder a metadata key, and reads it back as null.WithEmptyDocumentDeletions()writes an empty document alone, which reads back as an empty string.ChromaConfigurationOptions.WithReadsBeyondKeyQuota(): on Chroma Cloud, a write with nulls that would take a record beyond the quota of 32 metadata keys reads the record first and sends only the nulls of its keys, instead of throwing. A write of another client between the read and the write can mix with this one.Changes
UpdateAsyncandUpsertAsyncdelete metadata keys, with a null or an empty list, and documents, withNullDocumentsDelete, without reading the records first: the nulls and the empty document go in the same write. Two writes of the same record at the same time now leave the record of one of them. In our measurement of concurrent writes on 300 records, 131 records mixed the two writes with 2.12.0, and none with 2.13.0.A collection client chooses once how it deletes documents:
NullDocumentsDelete, from a client withoutWithDocumentCopyKey,WithDocumentDeletionKeyorWithEmptyDocumentDeletions, throws anArgumentExceptionbefore any request.InvalidOperationException. Up to 2.12.0,WithDocumentCopyKeywith another key replaced the key.NullDocumentsDeletedeletes documents, a record without a document gets the empty document too, so awhere_documentfilter that matches an empty text finds it.On Chroma Cloud, a write with nulls that would take a record beyond the quota of 32 metadata keys throws an
ArgumentExceptionbefore it goes, unlessWithReadsBeyondKeyQuota().On Chroma Cloud, a filter on the documents that gives the wrong records there throws an
ArgumentExceptionbefore the request, in every read and delete:$regexor$not_regexwhose pattern takes an empty text, like^$,^or^.*$, or that the client cannot read as Chroma does (KD-56);$containsor$not_containsof fewer than 3 characters (KD-57).Regex("(?s).")finds the records with a document that is not empty,NotRegex("(?s).")the others, andRegexorNotRegexwith a short text, its special characters escaped, does whatContainsandNotContainswould.Fixes
Endpointis not an http or https URI says so, instead of saying that the endpoint is missing.GetAsyncwith a limit of 0, from a collection client made by name, reads the collection first, so a collection that does not exist throws.Docs
docs/.docs/COMPATIBILITY.mddocuments the limits of Chroma 1.5.9 and Chroma Cloud verified with this client, verifies the known defects again on 10 October 2026, removes KD-2, KD-31 and KD-32, which that verification did not reproduce, and adds KD-52 to KD-57.UpdateAsyncandUpsertAsyncsay what a null document does on each server: Chroma 1.0.0 and later and Chroma Cloud keep the stored document, and every 0.x server deletes it.NuGet: https://www.nuget.org/packages/ChromaDotNet.Client/2.13.0 and https://www.nuget.org/packages/ChromaDotNet.Client.DependencyInjection/2.13.0
2.12.0
ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection 2.12.0, released together.
New
ChromaConfigurationOptions.WithUpsertStrategysays howUpdateAsyncandUpsertAsyncwrite the embeddings of records that exist. Chroma 1.0.21 to 1.5.9, installed on your own servers, may lose a record from the vector index after such a write (KD-49).Server, the default, writes as before.SkipUnchangedEmbeddingsupdates without the embedding a record whose embedding does not change, which does not touch the vector index. It costs a get of the records first, and a record whose embedding changes stays exposed.RAYON_NUM_THREADS=1made Chroma 1.5.9 lose no record in our measurements, with upserts of records that exist about 5 times slower. The README says when to use which.Fixes
get_or_createonce.Docs
docs/COMPATIBILITY.mdadds KD-48 to KD-51: wrong neighbors after records are deleted and written again on 1.0.0 to 1.0.5; records lost by the vector index after updates on 1.0.21 to 1.5.9; the space of a collection that 1.0.0 to 1.0.5 cannot tell; a record missing from a query after some upserts on 0.5.15, 0.5.16, 0.5.20 and 0.6.3, the versions tested.NuGet: https://www.nuget.org/packages/ChromaDotNet.Client/2.12.0 and https://www.nuget.org/packages/ChromaDotNet.Client.DependencyInjection/2.12.0
Commits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)