Skip to content

v2.9.0

Choose a tag to compare

@Laurianti Laurianti released this 05 Oct 15:13
· 92 commits to main since this release

Minor release of ChromaDotNet.Client and ChromaDotNet.Client.DependencyInjection: the settings of a new collection, the indexes of a schema, and numbers and texts that reach the server as written.

dotnet add package ChromaDotNet.Client

New

  • The settings of a new collection, in ChromaCollectionDefinition.Configuration:

    • Hnsw, the index of a single Chroma server: EfConstruction, EfSearch, MaxNeighbors, ResizeFactor, SyncThreshold, BatchSize and NumThreads;
    • Spann, the index of Chroma Cloud, also with the settings that Chroma takes only in a schema;
    • EmbeddingFunction, the embedding function the collection declares, which ModifyConfigurationAsync can now change too.

    The client sends each setting where Chroma applies it: the HNSW settings as the hnsw: metadata, the SPANN settings and the embedding function in the configuration of the request, and all of them in the schema when there is one. Hnsw and Spann together throw an ArgumentException, and a server that ignores the settings of the other index gives a ChromaException.

  • The indexes of the values in a schema, as create_index and delete_index of the Python client: WithIndex and WithoutIndex with a ChromaSchemaIndex, for one metadata key or for all of them, and for the full-text search index of the documents.

  • On Chroma Cloud: ChromaSparseIndexAlgorithm.MaxScore for a sparse vector index, read back in ChromaSparseVectorIndex.Algorithm, and a customer-managed key of Google Cloud KMS, WithGcpCmek.

  • ChromaCollection.Dimension, Version and LogPosition, as the server reports them.

Fixed

  • Numbers:
    • Doubles and floats go with the fewest digits that read back as them, the same on every build, and whole ones as floats (2.0, not 2). Before, Chroma stored a whole double as an integer, and ChromaWhereOperator.In("k", 0.0, 2.25) went as [0, 2.25], which Chroma rejects.
    • The HNSW settings that Chroma takes only as integers, hnsw:M, hnsw:construction_ef, hnsw:search_ef, hnsw:num_threads, hnsw:batch_size and hnsw:sync_threshold, go as integers also when the metadata has a whole double. Another number there throws an ArgumentException, where Chroma would answer 400.
    • On .NET Framework, the doubles of the answers are read right and -0.0 keeps its sign.
  • What a server would store changed or drop throws an ArgumentException before the request:
    • a text with a lone half of a surrogate pair;
    • a ulong above long.MaxValue;
    • an empty list in the metadata of a record, or any list in the metadata of a collection;
    • a name that the path of a URL drops, like ..;
    • an HNSW index with fewer than 2 neighbors, on which Chroma 1.5.9 crashes or misses the nearest records.
  • .NET 6 and 7: the netstandard2.0 build takes the 8.0 packages of System.Text.Json and System.Diagnostics.DiagnosticSource, as in 2.7.1, so these applications build with no warnings.

Packages

  • The ChromaDotNet icon, and the vector-database tag.
  • The README has a section on collections and records.