All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkiverse.langchain4j.chroma.runtime.CreateCollectionRequest Maven / Gradle / Ivy

There is a newer version: 0.21.0
Show newest version
package io.quarkiverse.langchain4j.chroma.runtime;

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

import io.quarkus.runtime.annotations.RegisterForReflection;

@RegisterForReflection
public class CreateCollectionRequest {

    private final String name;
    private final Map metadata;

    /**
     * Currently, cosine distance is always used as the distance method for chroma implementation
     */
    public CreateCollectionRequest(String name) {
        this.name = name;
        HashMap metadata = new HashMap<>();
        metadata.put("hnsw:space", "cosine");
        this.metadata = metadata;
    }

    public String getName() {
        return name;
    }

    public Map getMetadata() {
        return metadata;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy