chromadb-java-client icon indicating copy to clipboard operation
chromadb-java-client copied to clipboard

Metadata Builder

Open tazarov opened this issue 6 months ago • 0 comments

Example:

package tech.amikos.chromadb;

import java.util.HashMap;
import java.util.Map;

public class MetadataBuilder {
    private final Map<String, Object> metadata = new HashMap<String, Object>();

    private MetadataBuilder() {
    }

    public static MetadataBuilder create() {
        return new MetadataBuilder();
    }

    public MetadataBuilder forValue(String key, Object value) {
        metadata.put(key, value);
        return this;
    }

    public Map<String, Object> build() {
        return metadata;
    }
}

tazarov avatar Aug 14 '24 12:08 tazarov